Spectrum +2A/+3 Memory Map
The memory of the +2A and +3 are similar to the 128K and +2. The main difference is that these models have four ROMs rather than two and additional memory configurations.
The memory is paged by writing to port 0x7FFD and port 0x1FFD. Port 0x7FFD is almost identical to the 128 except that ROM is now the lower bit.
Both of these ports are write only, so a copy is stored in ram at address 0x5B5C for 7FFD and 0x5B67 for port 1FFD.
Port | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Ram Copy |
---|---|---|---|---|---|---|---|---|---|
1FFD | Printer Strobe |
Disk Motor |
1ROM | 0 | 5B67 | ||||
Memory Mode | 1 | ||||||||
7FFD | DIS | 0ROM | SCR | RAM | 5B5C |
-
Bit 0 of port 0X1FFD selects the paging mode. If 0 then it's normal but 1 selects an alternate memory map.
Normal mode
- RAM - The ram bank to page into 0xC000…0x7FFFF
-
ROM set selects the rom. It's split as 2 bits on each port with bit 0 from 7FFD bit 4 and bit 1 from 1FFD bit 2.
Rom ID Rom Selected 0 128K editor, menu system and self test 1 128k syntax checker 2 +3DOS 3 48K Basic The IDs are such that, if 128K code changes rom (as they don't know about the new register) then they would still get the correct rom as bit 0 is from the original port and bit1 would normally be clear at that point.
Special mode
In special mode, the RAM bits are ignored and bits 1 and 2 of port 0x1FFD control a memory map layout
Address Mode 0 Mode 1 Mode 2 Mode 3 0000 Bank 0
Bank 4
Bank 4
Bank 4
4000 Bank 1
Bank 5
Screen #1Bank 5
Screen #1Bank 7
Screen #28000 Bank 2
Bank 6
Bank 6
Bank 6
C000 Bank 3
Bank 7
Screen #2Bank 3
Bank 3
- SCR set to 0 to display screen #1 in bank 5. Set to 1 to display screen #2 in bank 7.
- DIS if set disables ram paging so that extra memory cannot be used in 48K mode. Once set it cannot be disabled until the machine is reset.
- Disk Motor turns on/off the disk drive motor.
- Printer Strobe controls the printer port
Plus 3
On the Plus 3 ram bankes 1, 3, 4 and 6 are used for the disk cache and RAM disk. Bank 7 contains the editor scratch pads and +3DOS workspace.