5.7 RS232C/MIDI INTERFACE
5.7.1 The RS232C/MIDI interface is implemented using the Port A Data
Store in the sound generator chip IC32. The data store is a
special register at octal address 16 which accesses an 8-bit
bi-directional port A7-AO. The port occupies the same I/O space as
the sound generator registers and is accessed in much the same way.
The addition of a read cycle at I/O address FFFD^ allows the Z80 to
input data.
5.7.2 The port direction is determined by a control bit written to
register R7 on bus line D6. When D6 is low the port is configured
as an input and when high as an output. In this application A3-AO
are only used as outputs and A7-A4 as inputs. A3/A2 supply an
RS232C driver IC33 which converts the TT!_ outputs to RS232C levels
(+ 12V); A2 and A3 drive the CTS and RXD interface lines
respectively. A4 - A7 are supplied from an RS232C receiver IC34
which converts the RS232C inputs to TTL levels; A6 and A7 are
driven by the DTR and TXD interface lines respectively.
5.7.3 It is evident from the signal directions that the Spectrum
128 adopts the role of a data communications equipment (DCE).
However, DTR and CIS do not perform a handshake but are the same
signal transmitted in opposite directions. The transmission format
is asynchronous, full duplex with 11-bit data frames comprising 1
start bit, eight data bits and two stop bits. Two stop bits are
always sent, but the interface can receive satisfactorily with one.
Desde basic, por ejemplo, como hago para poner el registro R7 del AY configurado como entrada? y una vez hecho esto como leo el registro de datos que ha entregado el puerto serie? que no se en que registro lo deja.
Mcleod_ideafix
Yo no lo sé, pero sí sé que se controla de forma parecida al Interface 1, es decir, no existe UART que genere la señal RS232, sino que es el software quien debe generarla. En el caso del 128K, el puerto RS232 está conectado al puerto A de propósito general existente en el AY-8912.
Para más detalles consulta la pág. 21 y siguientes de:
ftp://ftp.worldofspectrum.org/pub/sincl ... Manual.pdf
Eso de que no existe UART, implica, supongo, que uno tiene que generar todas las señales a traves de los registros, como CTS, RTS, incluso comprobacion de bit START, DATO y bit de STOP.
Si se controla de forma parecida el interface 1, supongo que lo mas facil sera portar el codigo de la SHADOW ROM a un ejecutable desde la RAM del 128k ¿no?
En este hilo http://www.speccy.org/foro/viewtopic.php?f=6&t=460
Na_th_an escribio:
Puede que se modifique algo entre una cosa y otra, puede ser tema de datos en el bus y cosas así, o que BASIC de esas versiones desactiva el AY o algo asi. No puedo ayudarte más, porque yo cuando lo he usado he escrito todos los registros de una tacada, y así nunca he tenido problemas. Pero claro, eso te pararía algo más la ejecución...
Supongo que ahi esta el tema, configurar con OUTS el AY y luego leer el PORT A para cargar el byte en memoria.