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

Table of contents

The zx-state file format
Block types

ZXSTMULTIFACE

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

// Multiface state
#define ZXSTMF_PAGEDIN            0x01
#define ZXSTMF_COMPRESSED         0x02
#define ZXSTMF_SOFTWARELOCKOUT    0x04
#define ZXSTMF_REDBUTTONDISABLED  0x08
#define ZXSTMF_DISABLED           0x10
#define ZXSTMF_16KRAMMODE         0x20

#define ZXSTMFM_1                 0
#define ZXSTMFM_128               1

typedef struct _tagZXSTMULTIFACE
{
  ZXSTBLOCK blk;
  BYTE ch48kModel;
  BYTE chFlags;
  BYTE chData[1];
} ZXSTMULTIFACE, *LPZXSTMULTIFACE;

Members

blk
The block header. The block id is ZXSTBID_MULTIFACE ('M', 'F', 'C', 'E').
ch48kModel
The Multiface model to use when emulating 16k or 48k Spectrums. This can be one of:
Value Meaning
ZXSTMFM_1 Multiface 1
ZXSTMFM_128 Multiface 128
chFlags
Various flags specifying the current state of the Multiface. This can be a combination of:
Flag Meaning
ZXSTMF_PAGEDIN Specifies whether the Multiface ROM and RAM are currently paged in.
ZXSTMF_COMPRESSED Specifies whether the Multiface RAM data (beginning at chData) is Zlib compressed or not.
ZXSTMF_SOFTWARELOCKOUT Indicates 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_REDBUTTONDISABLED Indicates that the red (magic) button is disabled.
ZXSTMF_DISABLED Indicates 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_16KRAMMODE Specifies 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.

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

Remarks

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