Changes

Jump to: navigation, search

ZX-State format

1,616 bytes added, 18:42, 14 August 2017
ZXSTSPECTRANETFLASHPAGE: Document block
=== ZXSTSPECTRANETFLASHPAGE ===
This block is used to save and restore the contents of the Spectranet's built-in flash memory. A zx-state file will contain a number of these blocks, normally 32. A [[#ZXSTSPECTRANET|ZXSTSPECTRANET]] block will proceed the first of these blocks. // Ram pages are compressed using Zlib #define ZXSTSFF_COMPRESSED 1 // Spectranet flash memory page typedef struct _tagZXSTSPECTRANETFLASHPAGEBLOCK { ZXSTBLOCK blk; WORD wFlags; BYTE chPageNo; BYTE chData[1]; } ZXSTSPECTRANETFLASHPAGEBLOCK, *LPZXSTSPECTRANETFLASHPAGEBLOCK; ==== Members ====&nbsp;&nbsp; ''TODO'blk'''<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The block header. The block id is '''ZXSTBID_SPECTRANETFLASHPAGE''' ('S', 'N', 'E', 'F').<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'''|-|ZXSTSFF_COMPRESSED|If set, the flash memory 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 4KB flash memory page. For the regular Spectranet, this is 0 - 31.<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 4KB (4,096) bytes in size. When loading [http://www.zlib.org/ Zlib] compressed pages, the compressed size can be obtained by: compressedSize = blk.dwSize - ( sizeof( ZXSTSPECTRANETFLASHPAGEBLOCK ) - sizeof( ZXSTBLOCK ) - 1 );
=== ZXSTSPECTRANETRAMPAGE ===
49
edits

Navigation menu