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

Table of contents

The zx-state file format
Block types

ZXSTDOCK

An expansion cartridge for the Timex TS2068, TC2068 and Unipolbrit UK2068 computers. There will be one entry for each 8KB page enabled in the machines EXROM and DOCK memory banks by the expansion cartridge in use.

This block is also used to store 128KB of the 272KB RAM in the Spectrum SE.

// Ram pages are compressed using Zlib
#define ZXSTDF_COMPRESSED       1
#define ZXSTDF_RAM              2
#define ZXSTDF_EXROMDOCK        3

// Timex Sinclair DOCK memory
typedef struct _tagZXSTDOCK
{
  ZXSTBLOCK blk;
  WORD wFlags;
  BYTE chPageNo;
  BYTE chData[1];
} ZXSTDOCK, *LPZXSTDOCK;

Members

blk
The block header. The block id is ZXSTBID_DOCK ('D', 'O', 'C', 'K').
wFlags
Various flags. This can be any combination of:
FlagMeaning
ZXSTDF_COMPRESSEDIf set, the RAM page data (beginning from chData) will be compressed using the Zlib compression library.
ZXSTDF_RAMIf set the page is read-write, if reset the page is read-only.
ZXSTDF_EXROMDOCKIf set the page is from the DOCK bank, if reset the page is from the EXROM bank.
chPageNo
Page number of this 8K RAM page in the applicable bank (DOCK or EXROM). This can range from 0-7, and pages are only written if they are provided by an expansion cartridge (i.e. no page is written for the Timex ROM 1 in the EXROM bank at page 0).

If the machine being emulated is a Spectrum SE, there will be 8 DOCK pages and 8 EXROM pages of RAM.

chData
The actual compressed or uncompressed memory page data. When uncompressed, this member is exactly 8KB (8,192) bytes in size.

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

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

Remarks

Only those pages modified from their state at reset should be saved.

Revision history

Available since version 1.3


  Copyright © 2001 - 2011 Jonathan Needle Top