49
edits
(→ZXSTSPECTRANET: Document block) |
(→ZXSTSPECTRANETFLASHPAGE: Document block) |
||
Line 188: | Line 188: | ||
=== ZXSTSPECTRANETFLASHPAGE === | === 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 ==== | |||
'''blk'''<br /> The block header. The block id is '''ZXSTBID_SPECTRANETFLASHPAGE''' ('S', 'N', 'E', 'F').<br /> | |||
'''wFlags'''<br /> 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. | |||
|} | |||
'''chPageNo'''<br /> Page number of this 4KB flash memory page. For the regular Spectranet, this is 0 - 31.<br /> | |||
'''chData'''<br /> 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 === | === ZXSTSPECTRANETRAMPAGE === |
edits