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

Table of contents

The zx-state file format
Block types


The state of the Multiface 1, Multiface 128 or Multiface 3.

// Multiface state
#define ZXSTMF_PAGEDIN            0x01
#define ZXSTMF_COMPRESSED         0x02
#define ZXSTMF_DISABLED           0x10
#define ZXSTMF_16KRAMMODE         0x20

#define ZXSTMFM_1                 0
#define ZXSTMFM_128               1

typedef struct _tagZXSTMULTIFACE
  BYTE ch48kModel;
  BYTE chFlags;
  BYTE chData[1];


The block header. The block id is ZXSTBID_MULTIFACE ('M', 'F', 'C', 'E').
The Multiface model to use when emulating 16k or 48k Spectrums. This can be one of:
ZXSTMFM_1Multiface 1
ZXSTMFM_128Multiface 128
Various flags specifying the current state of the Multiface. This can be a combination of:
ZXSTMF_PAGEDINSpecifies whether the Multiface ROM and RAM are currently paged in.
ZXSTMF_COMPRESSEDSpecifies whether the Multiface RAM data (beginning at chData) is Zlib compressed or not.
ZXSTMF_SOFTWARELOCKOUTIndicates that the software lockout feature of Multiface 128s and Multiface 3s has been enabled. This flag is not valid and should be set to 0 (zero) when emulating the Multiface 1.
ZXSTMF_REDBUTTONDISABLEDIndicates that the red (magic) button is disabled.
ZXSTMF_DISABLEDIndicates that the user has disabled Multiface 1 emulation with the physical disable switch. This flag is not valid and should be set to 0 (zero) when emulating the Multiface 128 or Multiface 3.
ZXSTMF_16KRAMMODESpecifies Multiface hardware which has had the 8KB of ROM and 8KB of RAM replaced with 16KB of RAM. This is required by advanced Multiface programs such as SoftCrack.

If ZXSTMF_16KRAMMODE is set, the RAM image stored at chData will expand to 16,384 bytes.

The Zlib compressed or uncompressed Multiface RAM image, depending on whether ZXSTMF_COMPRESSED is set.

When loading the Zlib compressed RAM image, the compressed size can be obtained by:

compressedSize = blk.dwSize - ( sizeof( ZXSTMULTIFACE ) - 1 - sizeof( ZXSTBLOCK ));

If ZXSTMF_16KRAMMODE is set, chData will expand to 16KB rather than 8KB.


The last bytes written to ports $1ffd and $7ffd (which are used by the Multiface) can be read from the ZXSTBID_SPECREGS block which appears earlier in the file.

Revision history

Available since version 1.0

  Copyright © 2001 - 2011 Jonathan Needle Top