The Atari ST range has a read only ROM port.RWAP wrote:Not sure whether this will help, but the Sinclair QL uses a form of double writing (I believe) in order to be able to provide bi-directional data on the normally read-only ROM port.
This enabled a hard disk, and a Flash EPROM card to be connected to the ROM port.
In theory you can write to the address range covered by this ROM port, but the plugged in cartridge has no way of telling a read from a write.
The way round this, is to use the lower bits of the address lines for output data (to write). So to write a byte wide value, you loose part of the address range available. Reads are done normally, but do not use the same addresses as the "write" addresses.
Again, to save confusion, here is another fictional computer...
So if you have 16 address lines, 8 are used to write data, that leaves you with only 265 usable addresses.
A0 - A7 used for writing data by shifting data bytes into the lower bits of the CPU register used for the device address.
A8 - A15 used for addressing (addresses 0 to 65536 but in multiples of 256)
D0 - D7 used for reading.
When the plugged in cartridge sees a valid address on A8 - A15, it can latch address lines A0 - A7 and this them forms the write data
Mark