ZXSTGSRAMPAGE

A zx-state file will contain a number of these blocks, depending on the model of GS being emulated (128KB or 512KB). A ZXSTGS block will proceed the first of these blocks.

// General Sound 32KB RAM page
// Ram pages are compressed using Zlib
#define ZXSTGSRF_COMPRESSED       1

// 32KB GS Ram page
typedef struct _tagZXSTGSRAMPAGE
{
  ZXSTBLOCK blk;
  WORD wFlags;
  BYTE chPageNo;
  BYTE chData[1];
} ZXSTGSRAMPAGE, *LPZXSTGSRAMPAGE;

Members

blk

The block header. The block id is ZXSTBID_GSRAMPAGE ('G', 'S', 'R', 'P').

wFlags

Various flags. This can currently only be:

Flag

Meaning

ZXSTGSRF_COMPRESSED

If ZXSTGSRF_COMPRESSED is set, the RAM page data (beginning from chData) will be compressed using the Zlib compression library.

chPageNo

The 32KB RAM page number (0-14 for the GS512 or 0-3 for the GS128).

chData

The actual compressed or uncompressed memory page data. When loading Zlib compressed pages, the compressed size can be obtained by:

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

Remarks

A ZXSTGS block will proceed the first of these blocks.

Revision history

Available since version 1.2