The +2A and the +3 versions of the ZX Spectrum, made by Amstrad, had a new banking mode, called "special". This banking mode is entered by setting bit 0 of port 1FFD
. When active, two bits from this port allows the programmer to choose one from four possible schemes (figure taken from http://www.worldofspectrum.org/faq/reference/128kreference.htm#Plus3):
Bit 2 =0 Bit 2 =0 Bit 2 =1 Bit 2 =1
Bit 1 =0 Bit 1 =1 Bit 1 =0 Bit 1 =1
0xffff +--------+ +--------+ +--------+ +--------+
| Bank 3 | | Bank 7 | | Bank 3 | | Bank 3 |
| | | | | | | |
| | | | | | | |
| | | screen | | | | |
0xc000 +--------+ +--------+ +--------+ +--------+
| Bank 2 | | Bank 6 | | Bank 6 | | Bank 6 |
| | | | | | | |
| | | | | | | |
| | | | | | | |
0x8000 +--------+ +--------+ +--------+ +--------+
| Bank 1 | | Bank 5 | | Bank 5 | | Bank 7 |
| | | | | | | |
| | | | | | | |
| | | screen | | screen | | screen |
0x4000 +--------+ +--------+ +--------+ +--------+
| Bank 0 | | Bank 4 | | Bank 4 | | Bank 4 |
| | | | | | | |
| | | | | | | |
| | | | | | | |
0x0000 +--------+ +--------+ +--------+ +--------+
It is known that this banking scheem was added in order to support CP/M. I can see that the first scheme allows all the address space to be used by programs and data, leaving the screen out of the map.
Using the third and/or fourth scheme would allow CP/M (which I assume is resident at the top of the address space) to stay in place while updating the screen. I can see that this might be a bit difficult because once you enter a scheme other than first, you loose any pointer to memory from 0000h to BFFFh, making tasks like outputting a string to be more complex.
So,
- How did they use this set of schemes to support CP/M?
- What was the purpose of second scheme?