ZX-State format: Difference between revisions

Jump to navigation Jump to search
→‎ZXSTDIVIDE: Document ZXSTDIVIDERAMPAGE block.
(→‎ZXSTDIVIDE: Finish documenting block.)
(→‎ZXSTDIVIDE: Document ZXSTDIVIDERAMPAGE block.)
Line 51: Line 51:
&nbsp;&nbsp; '''chData'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The compressed or uncompressed contents of the DivIDE's EPROM. When uncompressed, this member is exactly 16KB (16,384) bytes in size. When loading [http://www.zlib.org/ Zlib] compressed pages, the compressed size can be obtained by:
&nbsp;&nbsp; '''chData'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The compressed or uncompressed contents of the DivIDE's EPROM. When uncompressed, this member is exactly 16KB (16,384) bytes in size. When loading [http://www.zlib.org/ Zlib] compressed pages, the compressed size can be obtained by:
  compressedSize = blk.dwSize - ( sizeof( ZXSTDIVIDEBLOCK ) - sizeof( ZXSTBLOCK ) - 1 );
  compressedSize = blk.dwSize - ( sizeof( ZXSTDIVIDEBLOCK ) - sizeof( ZXSTBLOCK ) - 1 );
=== ZXSTDIVIDERAMPAGE ===
This block is used to save and restore the contents of the DivIDE's built-in RAM.
A zx-state file will contain a number of these blocks, normally 4 for the 32KB DivIDE. A [[#ZXSTDIVIDE|ZXSTDIVIDE]] block will proceed the first of these blocks.
// Ram pages are compressed using Zlib
#define ZXSTDRF_COMPRESSED 1
// DivIDE RAM page
typedef struct _tagZXSTDIVIDERAMPAGEBLOCK
{
  ZXSTBLOCK blk;
  WORD wFlags;
  BYTE chPageNo;
  BYTE chData[1];
} ZXSTDIVIDERAMPAGEBLOCK, *LPZXSTDIVIDERAMPAGEBLOCK;
==== Members ====
&nbsp;&nbsp; '''blk'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The block header. The block id is ZXSTBID_DIVIDERAMPAGE ('D', 'I', 'R', 'P').<br />
&nbsp;&nbsp; '''wFlags'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Various flags. This can be any combination of:
{|cellspacing="1" cellpadding="1" border="1" width="100%"
|'''Flag'''
|'''Meaning'''
|-
|ZXSTDRF_COMPRESSED
|If set, the RAM page data (beginning from '''chData''') will be compressed using the [http://www.zlib.org/ Zlib] compression library.
|}
&nbsp;&nbsp; '''chPageNo'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Page number of this 8KB RAM page. For the 32KB version of the DivIDE interface, this is 0 - 3.<br />
&nbsp;&nbsp; '''chData'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The compressed or uncompressed contents of the RAM page. When uncompressed, this member is exactly 8KB (8,192) bytes in size. When loading [http://www.zlib.org/ Zlib] compressed pages, the compressed size can be obtained by:
compressedSize = blk.dwSize - ( sizeof( ZXSTDIVIDERAMPAGEBLOCK ) - sizeof( ZXSTBLOCK ) - 1 );


=== ZXSTLEC ===
=== ZXSTLEC ===
49

edits

Navigation menu