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

Table of contents

The zx-state file format
Block types

zx-state header

The zx-state header appears right at the start of a zx-state (.szx) file.

It is used to identify the version of the file and to specify which model of ZX Spectrum (or clone) the file refers to.

Following the zx-state header is an optional ZXSTCREATOR creator information block.

Following that are the ZXSTZ80REGS and ZXSTSPECREGS blocks followed by zero or more additional blocks representing the current state of the emulated Spectrum.

// Machine identifiers
#define ZXSTMID_16K          0
#define ZXSTMID_48K          1
#define ZXSTMID_128K         2
#define ZXSTMID_PLUS2        3
#define ZXSTMID_PLUS2A       4
#define ZXSTMID_PLUS3        5
#define ZXSTMID_PLUS3E       6
#define ZXSTMID_PENTAGON128  7
#define ZXSTMID_TC2048       8
#define ZXSTMID_TC2068       9
#define ZXSTMID_SCORPION     10
#define ZXSTMID_SE           11
#define ZXSTMID_TS2068       12
#define ZXSTMID_PENTAGON512  13
#define ZXSTMID_PENTAGON1024 14


typedef struct _tagZXSTHEADER
{
  DWORD dwMagic;
  BYTE  chMajorVersion;
  BYTE  chMinorVersion;
  BYTE  chMachineId;
  BYTE  chReserved;
} ZXSTHEADER, *LPZXSTHEADER;

Members

dwMagic
Byte sequence of 'Z', 'X', 'S', 'T' to identify the file as a zx-state file.
chMajorVersion
Major version number of the file format. Currently 1.
chMinorVersion
Minor version number of the file format. Currently 3.
chMachineId
The model of ZX Spectrum (or clone) to switch to when loading the file. This is one of:
ValueMeaning
ZXSTMID_16K16k ZX Spectrum
ZXSTMID_48K48k ZX Spectrum or ZX Spectrum+
ZXSTMID_128KZX Spectrum 128
ZXSTMID_PLUS2ZX Spectrum +2
ZXSTMID_PLUS2AZX Spectrum +2A/+2B
ZXSTMID_PLUS3ZX Spectrum +3
ZXSTMID_PLUS3EZX Spectrum +3e
ZXSTMID_PENTAGON128Pentagon 128
ZXSTMID_TC2048Timex Sinclair TC2048
ZXSTMID_TC2068Timex Sinclair TC2068
ZXSTMID_SCORPIONScorpion ZS-256
ZXSTMID_SEZX Spectrum SE
ZXSTMID_TS2068Timex Sinclair TS2068
ZXSTMID_PENTAGON512 Pentagon 512
ZXSTMID_PENTAGON1204 Pentagon 1024
chReserved
This member is reserved. Set to 0 (zero).

Revision history

Available since version 1.0


  Copyright © 2001 - 2008 Jonathan Needle Top