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

Table of contents

The zx-state file format
Block types

ZXSTLECRAMPAGE

A zx-state file will contain a number of these blocks, depending on the model of LEC interface being emulated (80KB, 272KB or 528KB). A ZXSTLEC block will proceed the first of these blocks.

// LEC 32KB RAM page
// Ram pages are compressed using Zlib
#define ZXSTLCRPF_COMPRESSED      1

// 32KB LEC RAM page
typedef struct _tagZXSTLECRAMPAGE
{
  ZXSTBLOCK blk;
  WORD wFlags;
  BYTE chPageNo;
  BYTE chData[1];
} ZXSTLECRAMPAGE, *LPZXSTLECRAMPAGE;

Members

blk
The block header. The block id is ZXSTBID_LECRAMPAGE ('L', 'C', 'R', 'P').
wFlags
Various flags. This can currently only be:
Flag Meaning
ZXSTLCRPF_COMPRESSED If ZXSTLCRPF_COMPRESSED is set, the RAM page data (beginning from chData) will be compressed using the Zlib compression library.
chPageNo
Page number of this 32K RAM page. For the 80KB version of the LEC interface, this is 0-1. For the 272KB version, this is 0-7. For the 528KB version, this is 0-15.
chData
The actual compressed or uncompressed memory page data. When uncompressed, this member is exactly 32KB (32,768 bytes) in size.

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

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

Remarks

A ZXSTLEC block will proceed the first of these blocks.

Revision history

Available since version 1.5


  Copyright © 2001 - 2011 Jonathan Needle Top