Changes

Jump to: navigation, search

Format:SNA snapshot file format

3,313 bytes added, 10:00, 7 August 2022
cleanup example of RLE compression
[[Category:Cpctech.org]]<div style="border: 1px solid rgb(228, 222, 222); margin: 0px 0px 5px; padding: 0.5em 1em; background-color: rgb(249, 249, 249);"><center> ''' ''This artikel article originally came from Kevin Thackers' archive at [http://www.cpctech.org.uk http://www.cpctech.org.uk].''' '' </center></div>
= Snapshot (.SNA) file format =
The following chunks are currently defined:
== V3 Chunks == === CPC+ Chunk (Plus only) ===
Chunk name: "CPC+"
 
If this chunk exists assume that you should use a 464Plus/6128Plus configuration to run the snapshot.
Chunk data:
| ASIC is waiting for byte from unlock sequence. e.g. if "2", ASIC is waiting for &amp;FF, the first byte of the unlock sequence. if "3" ASIC is waiting for &amp;77, the second byte of the unlock sequence.
|}
 
=== Memory block chunks (CPC/Plus/KC Compact/Aleste) ===
 
There may be 1 or more of these memory blocks.
 
Chunk name: MEM0..MEM8.
 
Each block represents 64K.
 
MEM0 describes the standard on-board 64k.
MEM1...MEM8 for memory expansion bank.
The MEM1..MEM8 memory blocks map to RAM expansions:
* MEM1 = extra 64KB ram in CPC6128 or 6128Plus
* MEM1-4 = 256KB dk'tronics compatible ram expansion
* MEM5-8 = 256KB dk'tronics silicon disk compatible
 
Other RAM expansions have the full 512KB such as the X-MEM. These map to MEM1-MEM8.
 
 
If a chunk exists in the snapshot that means that memory is stored compressed.
 
It is possible to have a snapshot with 64KB base ram uncompressed and additional banks compressed but it's advised to either use MEM chunks or store the memory uncompressed in the V2 style.
 
The memory size in the snapshot refers to the amount of uncompressed V2 style memory that is in the snapshot. If the memory is described only by chunks it is 0.
If there is both uncompressed and compressed data then the compressed data takes priority over the uncompressed data. I.e. handle the uncompressed data first then the compressed data.
 
A RLE compression is used with 0x0e5 as the control byte.
 
i.e. <control byte>, <count>, <byte>
 
Examples (Uncompressed = Compressed):
* 11 22 33 = 11 22 33
* E5 03 11 = 11 11 11
* E5 00 = E5
 
=== Breakpoint chunk (Winape emulator specific) ===
 
Breakpoint chunk has the name "BRKS".
 
The chunk contains 1 or more breakpoints.
 
Each breakpoint has the form:
 
2 byte address
1 byte code (0=base 64K RAM, 1 = extended RAM)
2 bytes condition
 
=== Inserted disc images (Winape emulator specific) ===
 
There are two chunks. 'DSCA' and 'DSCB'.
DSCA is for drive A and DSCB is for drive B.
 
The chunk contains a string which is the path to the disk image inserted into that drive.
 
== Memory ==
 
Uncompressed memory described by the snapshot allows sizes of:
* 64K (base 64K only),
* 128K (base 64K + 64K dk'tronics compatible RAM expansion using ram selections C4-C7),
* 312K (base 64K+256K dk'tronics compatible RAM expansion using ram selections C4-CC),
* 576K (base 64K+512K RAM composed of dk'tronics compatible 256K RAM AND dk'tronics compatible 256K silicon disk). Ram selections c4-ff.
 
The MEM chunks do allow to describe RAM expansions where the configurations are not continuous. (e.g. 64K base + 256K silicon disk).
 
== Limitations of this snapshot format==
* The snapshot format doesn't support more than 512K RAM and only supports dk'tronics compatible RAM expansions.
* The snapshot format doesn't support additional hardware. A basic CPC464, CPC664, CPC6128 system is assumed.
* The snapshot format doesn't support KC Compact or Aleste hardware.
* The snapshot doesn't have knowledge of which ROMs are in use. This means it doesn't know which OS, BASIC or AMSDOS ROM, and nothing about expansion roms.
 
The format generally assumes a base CPC6128/6128Plus system with no attached hardware except for up to 512K of dk'tronics compatible RAM.
4
edits