Difference between revisions of "Mirage Microdriver"
|Line 111:||Line 111:|
Revision as of 14:17, 26 April 2014
The Microdriver contains an 8k ROM, 2k RAM (decoding is incomplete, so it is mapped at $2000, $2800, $3000 and $3800) and an NMI button.
When the NMI button is pressed, the Microdriver is paged into the bottom 16k of the address space. At the end of the NMI handler, it is switched out by an instruction fetch at $2000.
During the NMI handler, the Microdriver makes calls to the Spectrum ROM by calling $3800 (the instruction fetch switches the Microdriver out), calling the ROM routine, and calling $386D (the instruction fetch switches the Microdriver back in).
Microdriver snapshots are saved either to tape or to microdrive. A tape snapshot is saved as two or three separate blocks; a microdrive snapshot is a single file.
The first block is $0588 bytes long:
$0000 Magic number: 'Microdriver © 1985 M.B.Daniells' $001F Either $20 (screen is included) or $00 (screen is omitted) $0020 Always 0 $0021 I $0022 HL' $0024 DE' $0026 BC' $0028 AF' $002A HL $002C DE $002E BC $0030 IY $0032 IX $0034 IFF2 [Only bit 2 is defined: 1 for EI, 0 for DI] $0035 R $0036 AF $0038 SP $003A Interrupt mode: 1 or 2 $003B Interface 1 paged flag: $C9 if Interface 1 paged in, $71 if 48k BASIC ROM paged in $003C Maximum address used by compressed snapshot. $003E Compression table. Used to replace up to 8 runs of bytes with a single byte. Each entry: dw address of byte in compressed snapshot dw uncompressed length $005E Memory from $5B00-$6029
The second block, if present, is the screen, not compressed: $1B00 bytes.
The third block is memory from $602A to the address given at offset $003C. Once the block has been loaded, the compression table is expanded, starting with the last entry and working back.
The address and data lines are connected to the Microdriver's ROM chip in an order that makes the physical layout of the circuit board easy, rather than matching signals. This means if the ROM is dumped using an EPROM programmer, its contents need to be decoded.