[ Spectaculator, ZX Spectrum Emulator ] Home | Downloads | Support [ ZX Spectrum Image ]

Table of contents

The zx-state file format
Block types


The Spectrum's ULA state specifying the current border colour, memory paging status etc.

typedef struct _tagZXSTSPECREGS
  BYTE chBorder;
  BYTE ch7ffd;
  union {
    BYTE ch1ffd;
    BYTE chEff7;
  BYTE chFe;
  BYTE chReserved[4];


The block header. The block id is ZXSTBID_SPECREGS ('S', 'P', 'C', 'R').
The current border colour. This can be 0 (black) through to 7 (white).
The current value of port $7ffd which is used to control memory paging on 128k Spectrums.

For 16k and 48k Spectrums, this should be set to 0 (zero).

The current value of port $1ffd which controls additional memory paging features on the Spectrum +2A/+3 and the ZS Scorpion.

Should be set to 0 (zero) for other models.

The current value of port $eff7 on the Pentagon 1024 which controls access to the additional memory. Not used on other models.

The last value of written to port $fe. Only bits 3 and 4 (the MIC and EAR bits) are guaranteed to be valid.

Use chBorder to set the current border colour.

This member is reserved and should be set to 0 (zero).

Revision history

Available since version 1.0

chFe was added in version 1.1. The size of the block is unchanged.

chEff7 was added in version 1.3. It shares the same physical location as ch1ffd in the file as that port is not used on the Pentagon 1024. The size of the block is unchanged.

  Copyright © 2001 - 2011 Jonathan Needle Top