Nasta wrote:Jan,
You seem to have studied that code quite a lot - would it be possible for you to write a small expanation on the 8302 internal registers and their use?
Interesting that the same serial hardware is used for MDV, this would open some interesting possibilities but as far as I know it's half duplex (either read OR write, given the same pin is input and output)...
In theory it has 8 registers, given that A0,1 and 5 are used to address the internals...
Hi Nasta,
There is an excellent explanation in section 18.13 of the QDOS/SMS Reference Manual.
The 8302 indeed has 8 registers (at $18000-$18003 and $18020-$18023). On reading, $18000-$18003 are the clock longword and $18022-$18023 the MDV read data registers (one for each track). $18020 is the MDV/serial/IPC status register.
On writing, $18000-$18001 are used to set the clock, $18002 is the transmit control register, $18003 the IPC write register, $18020 is for MDV control, $18022 the transmit data register.
Register $18021 is the interrupt register (read status and write for acknowledge or mask interrupts).
When looking at the circuit diagram it appears that the 8302 sends and receives the MDV data on the RAW1 and RAW2 lines (pin 19 and 21). I doubt if these are usable for a high-speed serial interface. First of all the rate is fixed, it's half duplex and (most important) there is no buffering at all of the serial data in the 8302 itself. This means that you have to read the incoming byte as soon as possible when the 'read buffer ready' bit goes on, else it gets overwritten by the next byte.
Given the above fact, it was a clever decision to use the 8049 IPC as serial input device, if only they would have implemented it properly...
Jan.