The Memory
This page was last modified 17:30, 20 August 2018 by Gdx. Based on work by Rderooy and NYYRIKKI.

The memory of an MSX computer is composed of RAM and ROM. In general these have a size of 16ko. We can select them through a system called Slot.

An MSX computer must have at least 8kB RAM (E000h~FFFFh, Upper part of the memory is always populated first). Typically MSX1 computers have 64KB of RAM which is maximum amount of memory that Z80 can use without a memory mapping system. This RAM selected by default at MSX start is called Main-RAM.

Default Memory Map (under BASIC):

Default Memory Map.png

Notes:

  • On MSX1, the Main-RAM is detected by a slot scan from 0 to 3 on each memory bank. First RAM found is selected as Main-RAM.
  • Same on MSX2/2+ but taking into account the Memory Mapper. The first mapped RAM is selected.
  • On MSX turbo R, the internal RAM is always selected when the Disk-ROM v.2.xx is installed (default). Otherwise (starting on a ROM, pressing the "1" key at startup or when a DOS1 is formatted is present), the method is the same as the MSX2/2+.

An MSX computers also have in standard the Roms below:

  • Main-ROM that contains the Bios and the BASIC interpreter. (MSX1~)
  • Sub-ROM that contains the Bios for new devices added from MSX2. (MSX2~)

When MSX2 came out a Memory mapper was made an optional part of the standard. There are even some MSX1 machines with a memory mapper and a memory mapper can also be an external cartridge.

This divides memory into 16KB pages and page can be selected in each memory bank of all slots that contain a Memory Mapper by writing the memory page number to the corresponding Memory Mapper register via I/O port FCh (0000h~3FFFh), FDh (4000h~7FFFh), FEh (8000h~BFFFh) or FFh (C000h~FFFFh). In practice all internal memory mapper registers can be read but like other mappers can be added. These should not be read by software that must be compatible although this seems to be quite a common habit. The maximum size of a memory mapper is 4MB per slot (8bits * 16KB).

When MSX2+ came out memory mapper was a mandatory part of the standard (even for machines with just 64KB)

There are also MegaRAM memory mappers available, which are actually specific RAM expansions, but a type of MegaROM in RAM. But these are mostly meant for playing cracked ROM games. (See ROM mappers)