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

Table of contents

The zx-state file format
Block types

ZXSTSPECREGS

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

typedef struct _tagZXSTSPECREGS
{
  ZXSTBLOCK blk;
  BYTE chBorder;
  BYTE ch7ffd;
  union {
    BYTE ch1ffd;
    BYTE chEff7;
  };
  BYTE chFe;
  BYTE chReserved[4];
} ZXSTSPECREGS, *LPZXSTSPECREGS;

Members

blk
The block header. The block id is ZXSTBID_SPECREGS ('S', 'P', 'C', 'R').
chBorder
The current border colour. This can be 0 (black) through to 7 (white).
ch7ffd
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).

ch1ffd
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.

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

chFe
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.

chReserved
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