Memory

This post not only serves as an update on progress, but as an aide memoir for myself in remembering where each bank of RAM and ROM lies.

As anyone who has studied the architecture of the ZX Spectrum is aware, there are three memory "concepts":


  • ROM

    This is the easiest to follow. The ROM always appears in the bottom bank of the 64K memory map. It may (on the +3) be swapped out and RAM placed there, but ROM never appears at any other 16K block
  • Uncontended RAM

    This is RAM that the ULA has no business looking at. In the classic 16K/48K model, this was known as the "upper" bank; it formed the upper 32K of RAM. Since it was physically separate, and (due to circuit design) could be accessed independently of the ULA, it is said to be uncontended. In the 128K models, the location of these banks varies.
  • Contended RAM

    This is RAM that the ULA will be accessing in order to draw the screen. This means the the CPU will frequently have to wait while the ULA does its business. In the 16K/48K modles this is pretty clear-cut, and only results in a "pointless wait" for just over 9K of RAM, that is RAM that is not being used by the ULA, but is contended because it resides in a device that is being used.

    In the 128K models, there is 64K of RAM that appears in the same device as the screen memory, causing a stonking loss of just over 121K of memory to pointless wait. In the interests of authenticity however, this contention must be retained.
So then, we come to the following memory map. "BANK" in this diagram refers to logical banks of 16K in whichever device is providing them. The contended RAM devices is a 64K static RAM. Uncontended is a 128K static RAM device. This results in a loss of 60K of RAM, but this is no big deal. Static RAM in these small quantities is cheap enough now that we need not care. Likewise, the ROM devices is a 128K flash EEPROM, which loses 56K.

The final point of note is that the astute will be aware that there is a certain amount of ROM re-use between Spectrum models. The 128K/+2 model re-uses the ROM from the 16K/48K model, and the +3 model reuses the editor ROM from the 128K/+2 model. In the Porta design, ROM duplication occurs. This preserves authenticity between ROM versions - e.g. the sign on message for 48K mode in the 128K model is "(C) 1986 Amstrad"; in the original 48K it is "(C) 1982 Sinclair Research Ltd."

Comments

Popular Posts