Operating memory “byte-mem”

Use the shared byte-memory plugin for the Spectrum’s ROM, screen memory, and program RAM. Check the memory map before setting an assembly origin or loading an image.

The ZX Spectrum 48K uses the same operating memory plugin as the MITS Altair8800. Please refer to the byte-mem documentation for the complete memory reference, including Open and use the device, memory settings, ROM areas, bank switching, and the configuration file format.

ZX Spectrum memory map

The ZX Spectrum 48K has a total of 64 KB address space organized as follows:

Address range Size Description
0x0000 – 0x3FFF 16 KB ROM (Sinclair BASIC interpreter). Must be loaded as a memory image at startup.
0x4000 – 0x57FF 6 KB Screen bitmap memory (256×192 pixels)
0x5800 – 0x5AFF 768 bytes Screen attribute memory (32×24 colour cells)
0x5B00 – 0xFFFF ~41 KB Free RAM (used by BASIC, user programs, stack, etc.)

ROM image setup

Use one 64 KB bank (memorySize = 65536, banksCount = 1, commonBoundary = 0). The 16 KB ROM image must be configured to load at address 0x0000 at startup. In the byte-mem settings, configure:

Setting Value Description
imageName0 Path to ROM file (e.g. examples/zxspectrum-48k/48.rom) The 16 KB ROM binary file
imageAddress0 0 Load address (start of memory)
imageBank0 0 Memory bank (default)

Protect the ROM with ROMfrom0 = 0 and ROMto0 = 16383 (inclusive). The bundled configuration already sets these keys. Keeping this protection models the real machine and prevents guest writes from corrupting BASIC or other ROM code.

Contended memory

Memory addresses 0x4000 – 0x7FFF are subject to contention by the ULA. This is handled automatically by the zxspectrum-bus plugin and is transparent to the user.


This site uses Just the Docs, a documentation theme for Jekyll.