Changes

Jump to: navigation, search

Snapshot

7,450 bytes added, 7 January
/* SYMB */
4. There is not a terminator chunk. The snapshot reader should determine if there are more chunks based on the size of data remaining to be read from the file.
 
=Version 3 Chunks=
The following chunks are currently defined:
=== DSCA,DSCB (Winape) =CPC+ ==
The DSCA block contains the filename of the disc image inserted into drive A. The filename This chunk is stored as 8-bit ASCII (any Unicode characters with codes 0x100 or above will be translated to ? supported by Arnold, WinAPE, No$CPC and therefore filenames with these characters can't be stored in Snapshots)ACE. The length of Arnold, WinAPE and ACE will save the block is when Plus configuration enabled. No$CPC will save the length of block if the filename in bytesPlus features have been unlocked.
DSCB is similar to DSCA but stores the filename of the disc image inserted into drive B. This option must be enabled in Winape for this chunk to be saved. === ROMS (Winape) === This block contains When creating a list of filenames for each ROM (and cartridge) that is defined in Winape. The length of the block is the length for all strings. If a ROM is not defined, a single NUL (0) byte is present, otherwise there is a null terminated 8-bit ASCII string. First in the list is the filename (or internal name) for the cartridge (prefixed with a 'A' character), followed by lower rom and then upper roms 0-32. Internal ROMs are listed by their internal name (the name listed in the drop down when you configure the roms) (e.g. OS464). This option must be enabled in Winape for this chunk to be saved. NOTE: The selected Multiface ROM is not saved in the snapshot. === INFO Chunk (No$CPC) === This chunk is written by No$CPC. It contains an 8-bit ASCII string with the version information for No$CPC. === MEM0-8 Chunk === The MEM0-8 several chunks contain at most 64KB of data. The data may be compressed or stored uncompressed. If the size is exactly 65536 bytes the data is uncompressed, otherwise it is compressed. Up to 512KB additional RAM can be stored in usually a snapshot.  The compression scheme is RLE with 0x0e5 as the control byte. Data is encoded as: * <byte> for a single occurrence of a byte (not 0x0e5) (e.g. 0x013)* 0x0e5,<count>,<byte> for multiple occurances of a byte (e. 0x0e5,0x04,0x013 for 0x013 repeated 4 times)* 0x0e5,0 for a single 0x0e5 byte (e.g. 0x0e5) The blocks are: * MEM0 - main 64KB ram* MEM1 - c4,c5,c6,c7 configurations (extra 64KB ram in 128KB machines) (256KB Dk'Tronics RAM, X-MEM)* MEM2 - cc,cd,ce,cf configurations (256KB Dk'Tronics RAM, X-MEM)* MEM3 - d4,d5,d6,d7 configurations (256KB Dk'Tronics RAM, X-MEM)* MEM4 - dc,dd,de,df configurations (256KB Dk'Tronics RAM, X-MEM)* MEM5 - e4,e5,e6,e7 configurations (256KB Dk'Tronics Silicon Disk, X-MEM)* MEM6 - ec,ed,ee,ef configurations (256KB Dk'Tronics Silicon Disk, X-MEM)* MEM7 - f4,f5,f6,f7 configurations (256KB Dk'Tronics Silicon Disk, X-MEM)* MEM8 - fc,fd,fe,ff configurations (256KB Dk'Tronics Silicon Disk, X-MEM) NOTE:  1. A snapshot may contain a mix of "standard" memory data (e.g. the data follows the header and is uncompressed) and additional MEM blocks as required. 2. If the snapshot is not compressed, then up good idea to 128KB will be stored as "standard" memory data, place the additional RAM stored CPC+ one in MEM2-MEM8 blocks. 3. If the snapshot is compressedfirst position, then the "standard" memory data will have 0 size and there will be a MEM0 in addition to the additional memory blocks. 4. Version 3 doesn't require memory to be continuous. A Dk'tronics silicon disk on it's own can be described with this version. 5. Winape allows a 4MB RAM expansion to be enabled but doesn't save the additional RAM in the snapshot. === BRKC Chunk (ACE) === This chunk is written by ACE when because some breakpoints are set. When loading a snapshot, the breakpoints found in this chunk are added to the one already installed.The number of stored breakpoints in the chunk is given by the chunk size divided by 216 (the size on one breakpoint data structureold). {||-| ''Offset (Hex)''| ''Length''| ''Description''|-| 00| 1| Breakpoint type (0:Execution, 1:Memory, 2:I/O port)|-| 01| 1| Memory access mode (0:R/W, 1:R/O, 2:W/O)|-| 02| 1| Breakpoint runtime mode (0:Break, 1:Watch)|-| 03| 1| Reserved|-| 04| 2| Breakable memory/port (MSB first)|-| 06| 2| Breakable memory/port mask (MSB first)|-| 08| 1| Match value|-| 09| 1| Match value mask|-| 0A| 2| Breakable memory size (MSB first)|-| 0C| 4| Breakpoint activation step (MSB first)|-| 10| 128| Breakpoint condition to match (NULL terminated string) (note 1)|-| 90| 64| Breakpoint user name (NULL terminated string)|-| D0| 8| Reserved|-| D8| ...| Same sequence repeated for each breakpoint|} Notes: 1. The condition is expressed using ACE syntax (similar to BASIC with AND/OR/XOR/NOT/+/-/=...).Allowed additional syntaxes tools and emulators are:*&, # or 0x for a hexadecimal number.*% or &x for a binary number.*AF, BC, HL, IX... for a 16-bit Z80 register.*A, B, D, IXh, IXl... for an 8-bit Z80 register.*FlagC, FlagNC, FlagM... for a Z80 flag.*LineCount for the line number.*LineCycle for the µs count relying on the current line.*MMR for the memory mapping register.*UpperROMOn for the paging state of the upper ROM.*UpperROMNum for the selected upper ROM number.*LowerROMOn for the paging state of the lower ROM.*LowerROMNum for the selected lower ROM number.*ASICPageOn for the paging state of the I/O ASIC registers page. ''Example : FlagC AND (HL=DE OR HL=&5000)'' === SYMB Chunk (ACE) === This chunk is written by ACE when some symbols are declared. When loading a snapshot, the symbols found in this chunk are added to the alreading existing ones. {||-| ''Offset (Hex)''| ''Length''| ''Description''|-| 00| 1| Length on the symbol name (n). 0 is an invalid value.|-| 01| n| Symbol name (note 1)|-| n+1| 6| Reserved for future usage, always 0 for now.|-| n+7| 2| Address of the symbol (MSB first).|-| ...| Same sequence repeated until the end of the chunk is reached.|} Notes: 1. Symbol are (obviously) limited to 255 characters, cannot begin with a number (0-9), and only set ascii char is allowed (a-z, A-Z, 0-9, _). === CPC+ Chunk === This chunk is supported by Arnold, Winape, No$CPC and ACE. Arnold, Winape and ACE will save the block when Plus configuration enabled. No$CPC will save the block fail if it is not the Plus features have been unlockedcase.
{|
| 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.
|}
 
== DSCA,DSCB ==
 
This chunk is supported by WinAPE and ACE; it is saved only when the related option is enabled.
 
The DSCA block contains the filename of the disc image inserted into drive A. The filename is stored as 8-bit ASCII (any Unicode characters with codes 0x100 or above will be translated to ? and therefore filenames with these characters can't be stored in Snapshots). The length of the block is the length of the filename in bytes.
 
DSCB is similar to DSCA but stores the filename of the disc image inserted into drive B.
 
== TAPE ==
 
This chunk is supported by ACE; it is saved only when the related option is enabled.
 
The TAPE block contains the filename of the tape image inserted. The filename is stored as 8-bit ASCII (any Unicode characters with codes 0x100 or above will be translated to ? and therefore filenames with these characters can't be stored in Snapshots). The length of the block is the length of the filename in bytes.
 
== ROMS ==
 
This chunk is supported by WinAPE and ACE; it is saved only when the related option is enabled.
 
This block contains a list of filenames for each ROM (and cartridge) that is defined. The length of the block is the length for all strings.
 
If a ROM is not defined, a single NUL (0) byte is present, otherwise there is a null terminated 8-bit ASCII string.
 
First in the list is the filename (or internal name) for the cartridge (prefixed with a 'A' character), followed by lower rom and then upper roms 0-31 (WinAPE) or 0-255 (ACE).
 
WinAPE lists internal ROMs by their internal name (the name listed in the drop down when you configure the roms, e.g. OS464).
ACE always put the actual file name, even for internal ROMs (e.g. System/Firmware_v3.rom).
 
After the list of the upper ROMs, ACE also put the names of the internal Basic and AMSDOS ROMs.
Then, the presence of the "CartridgeKeepExtROM" let ACE know if the cartridge ROMs should disable installed external upper ROMs or not (depending on user preferences).
 
NOTE: The selected Multiface ROM is not saved in the snapshot.
 
== INFO ==
 
This chunk is written by No$CPC. It contains an 8-bit ASCII string with the version information for No$CPC.
 
== MEM0-8 ==
 
The MEM0-8 chunks contain at most 64KB of data. The data may be compressed or stored uncompressed. If the size is exactly 65536 bytes the data is uncompressed, otherwise it is compressed. Up to 512KB additional RAM can be stored in a snapshot.
 
The compression scheme is RLE with 0x0e5 as the control byte.
 
Data is encoded as:
 
* <byte> for a single occurrence of a byte (not 0x0e5) (e.g. 0x013)
* 0x0e5,<count>,<byte> for multiple occurances of a byte (e. 0x0e5,0x04,0x013 for 0x013 repeated 4 times)
* 0x0e5,0 for a single 0x0e5 byte (e.g. 0x0e5)
 
The blocks are:
 
* MEM0 - main 64KB ram
* MEM1 - c4,c5,c6,c7 configurations (extra 64KB ram in 128KB machines) (256KB Dk'Tronics RAM, X-MEM)
* MEM2 - cc,cd,ce,cf configurations (256KB Dk'Tronics RAM, X-MEM)
* MEM3 - d4,d5,d6,d7 configurations (256KB Dk'Tronics RAM, X-MEM)
* MEM4 - dc,dd,de,df configurations (256KB Dk'Tronics RAM, X-MEM)
* MEM5 - e4,e5,e6,e7 configurations (256KB Dk'Tronics Silicon Disk, X-MEM)
* MEM6 - ec,ed,ee,ef configurations (256KB Dk'Tronics Silicon Disk, X-MEM)
* MEM7 - f4,f5,f6,f7 configurations (256KB Dk'Tronics Silicon Disk, X-MEM)
* MEM8 - fc,fd,fe,ff configurations (256KB Dk'Tronics Silicon Disk, X-MEM)
 
=== Notes ===
 
1. A snapshot may contain a mix of "standard" memory data (e.g. the data follows the header and is uncompressed) and additional MEM blocks as required.
 
2. If the snapshot is not compressed, then up to 128KB will be stored as "standard" memory data, the additional RAM stored in MEM2-MEM8 blocks.
 
3. If the snapshot is compressed, then the "standard" memory data will have 0 size and there will be a MEM0 in addition to the additional memory blocks.
 
4. Version 3 doesn't require memory to be continuous. A Dk'tronics silicon disk on it's own can be described with this version.
 
5. WinAPE allows a 4MB RAM expansion to be enabled but doesn't save the additional RAM in the snapshot.
 
6. ACE can save additional memory in snapshots (up to 4MB) using the MX?? chunks.
 
== MX09-40 ==
 
This chunk is supported by ACE.
 
MX?? chunks allow snapshots to store up to 4160KB ram.
 
MX?? chunks are following MEM0-8 chunks. They are numbered from 09 to 40 (hexadecimal numbering).
Information are stored compressed like in MEM0-8 chunks.
 
== BRKC ==
 
This chunk is written by ACE when some breakpoints are set. When loading a snapshot, the breakpoints found in this chunk are added to the one already installed.
The number of stored breakpoints in the chunk is given by the chunk size divided by 216 (the size of one breakpoint data structure).
 
{|
|-
| ''Offset (Hex)''
| ''Length''
| ''Description''
|-
| 00
| 1
| Breakpoint type (0:Execution, 1:Memory, 2:I/O port)
|-
| 01
| 1
| Memory access mode (0:R/W, 1:R/O, 2:W/O)
|-
| 02
| 1
| Breakpoint runtime mode (0:Break, 1:Watch)
|-
| 03
| 1
| Breakpoint map type (note 2)
|-
| 04
| 2
| Breakable memory/port (MSB first)
|-
| 06
| 2
| Breakable memory/port mask (MSB first)
|-
| 08
| 1
| Match value
|-
| 09
| 1
| Match value mask
|-
| 0A
| 2
| Breakable memory size (MSB first)
|-
| 0C
| 4
| Breakpoint activation step (MSB first)
|-
| 10
| 128
| Breakpoint condition to match (NULL terminated string) (note 1)
|-
| 90
| 64
| Breakpoint user name (NULL terminated string)
|-
| D0
| 1
| Breakpoint map bank (note 2)
|-
| D1
| 1
| Breakpoint map page (note 2)
|-
| D2
| 6
| Reserved
|-
| D8
| ...
| Same sequence repeated for each breakpoint
|}
 
===Notes===
 
1. The condition is expressed using ACE syntax (similar to BASIC with AND/OR/XOR/NOT/+/-/=...).
Allowed additional syntaxes are:
*&, # or 0x for a hexadecimal number.
*% or &x for a binary number.
*AF, BC, HL, IX... for a 16-bit Z80 register.
*A, B, D, IXh, IXl... for an 8-bit Z80 register.
*FlagC, FlagNC, FlagM... for a Z80 flag.
*LineCount for the line number.
*LineCycle for the µs count on the current line.
*MemPage for the 64K expansion memory page (0-63).
*MemBankMode for the 16K expansion memory bank paging mode (0-7).
*UpperROMOn for the paging state of the upper ROM.
*UpperROMNum for the selected upper ROM number.
*LowerROMOn for the paging state of the lower ROM.
*LowerROMNum for the selected lower ROM number.
*ASICPageOn for the paging state of the I/O ASIC registers page.
 
''Example : FlagC AND (HL=DE OR HL=&5000)''
 
2. The map type determines the memory layout for which the breakpoint is valid.
The meaning of the values for map bank and map page depends on the map type value.
Possible values fir map type are:
* 0: Undefined. Map bank and page are ignored (always 0).
* 1: Main RAM. If map bank is 0, then linear main RAM is considered. If map bank is 1, then main RAM from &c000-&ffff mapped as &4000-&7fff is considered. Map page is ignored (always 0).
* 2: Extension RAM. Map bank is the 16K extension bank number (0-3). Map page is the 64K extension page number (0-31).
* 3: Extension ROM. Map bank is the ROM slot id (0-255). Map page is ignored (always 0).
* 4: Firmware ROM. Map bank and page are ignored (always 0).
* 5: Cartridge ROM. Map bank is the 16K ROM bank number (0-31). Map page is ignored (always 0).
* 6: ASIC I/O Page. Map bank and page are ignored (always 0).
 
== SYMB ==
 
This chunk is written by ACE when some symbols are declared. When loading a snapshot, the symbols found in this chunk are added to the alreading existing ones.
 
{|
|-
| ''Offset (Hex)''
| ''Length''
| ''Description''
|-
| 00
| 1
| Length on the symbol name (n). 0 is an invalid value.
|-
| 01
| n
| Symbol name (note 1).
|-
| n+1
| 1
| Symbol memory map type (note 2).
|-
| n+2
| 1
| Symbol memory map bank (note 2).
|-
| n+3
| 1
| Symbol memory map page (note 2).
|-
| n+4
| 2
| Reserved for future usage, always 0 for now.
|-
| n+6
| 1
| Symbol type (0: absolute, 1: relative).
|-
| n+7
| 2
| Address of the symbol (MSB first).
|-
| ...
| Same sequence repeated until the end of the chunk is reached.
|}
 
===Notes===
 
1. Symbol are (obviously) limited to 255 characters, cannot begin with a number (0-9), and only a limited set of ASCII char is allowed (a-z, A-Z, 0-9, _, .).
 
2. The map type determines the memory layout for which the symbol is valid. The meaning of the values for map bank and map page depends on the map type value.
Possible values fir map type are:
* 0: Undefined. Map bank and page are ignored (always 0).
* 1: Main RAM. If map bank is 0, then linear main RAM is considered. If map bank is 1, then main RAM from &c000-&ffff mapped as &4000-&7fff is considered. Map page is ignored (always 0).
* 2: Extension RAM. Map bank is the 16K extension bank number (0-3). Map page is the 64K extension page number (0-31).
* 3: Extension ROM. Map bank is the ROM slot id (0-255). Map page is ignored (always 0).
* 4: Firmware ROM. Map bank and page are ignored (always 0).
* 5: Cartridge ROM. Map bank is the 16K ROM bank number (0-31). Map page is ignored (always 0).
* 6: ASIC I/O Page. Map bank and page are ignored (always 0).
 
== BRKS ==
 
This chunk is written by WinAPE when some breakpoints are set.
ACE can import breakpoints from this chunk but won't create it (BRKC is used instead).
 
The chunk contains 1 or more breakpoints.
 
Each breakpoint has the form:
* 2 bytes: address (LSB first)
* 1 byte: location (0: base 64K RAM, 1: extended RAM)
* 2 bytes: condition (?)
 
== WABP ==
 
This chunk is written by WinAPE when some breakpoints are set.
The exact details are begin worked out.
 
It seems to be:
 
4 bytes - number of user breakpoints
 
Each user breakpoint:
 
type,
4 byte address
 
Then, 4 bytes - number of memory breakpoints
 
Each memory breakpoint:
 
Then, 4 bytes - number of i/o breakpoints:
 
Each i/o breakpoint:
 
2 bytes flags? (6000 read, a400 write)
2 bytes port addr mask
2 bytes port addr
4 bytes counter
4 bytes condition string length, followed by condition string (not null terminated)
 
== DARS ==
 
This chunk is written by WinAPE when some data areas are set.
 
The number of stored data areas in the chunk is given by the chunk size divided by 10 (the size of one data area data structure).
 
{|
|-
| ''Offset (Hex)''
| ''Length''
| ''Description''
|-
| 00
| 4
| Address (LSB first) (note 1)
|-
| 04
| 4
| Area size (LSB first)
|-
| 08
| 1
| Data type (0=byte,1=word)
|-
| 09
| 1
| Labels (1=marked by user as having labels)
|-
|}
 
=== Notes ===
 
1. Winape's addressing scheme is 4 bytes. The upper 16-bits effectively define the internal 64KB pages it uses.
 
== REMU ==
 
This chunk is written RASM and contains information about symbols and breakpoints.
ACE will import informations from this chunk but won't write it (SYMB and BRKC are used instead).
 
== RM00-FF ==
 
This chunk was introduced by RASM and is supported by ACE; it is saved only when the related option is enabled.
 
The RM00-FF chunks contain at most 16KB of data representing the contents of the related external upper ROMs number. The data may be compressed or stored uncompressed. If the size is exactly 16384 bytes the data is uncompressed, otherwise it is compressed. Up to 2MB of external upper ROMs can be stored in a snapshot.
 
The compression scheme is identical to the one from MEM0-7 chunks.
 
== LOWR ==
 
This chunk was introduced by RASM and is supported by ACE; it is saved only when the related option is enabled.
 
It is similar to the RM00-FF chunks but stored the internal firmware ROM contents.
 
== BASR ==
 
This chunk is supported by ACE; it is saved only when the related option is enabled.
 
It is similar to the RM00-FF chunks but stored the internal Basic ROM contents.
 
== DOSR ==
 
This chunk is supported by ACE; it is saved only when the related option is enabled.
 
It is similar to the RM00-FF chunks but stored the internal AMSDOS ROM contents.
 
== CART ==
 
This chunk is supported by ACE; it is saved only when the related option is enabled.
 
It stores the contents of the inserted cartridge ROM. Extended cartridges are also supported.
 
{|
|-
| ''Offset (Hex)''
| ''Length''
| ''Description''
|-
| 00
| 1
| Type of compression (0: uncompressed, &5E: RLE compressed)
|-
| 01
| 4
| Physical size of the cartridge in bytes, must be 16, 32, 64, 128, 256 or 512KB (MSB first)
|-
| 05
| 2
| Number of cartridges, 1: for normal cartridges, extended cartridges otherwise (MSB first)
|-
| 07
| 2
| Flags, bit 0 set if the external upper ROMs must be disabled, other bits set to 0 (MSB first)
|-
| 09
| x
| Cartridge data contents (either compressed or not depending on type of compression)
|-
|}
 
== PLUG ==
 
This chunk is supported by ACE; it is saved only when the related option is enabled.
 
This chunk stores the names of the plugins which should be enabled for the snapshot.
 
All names are stored one after the other, in the form of binary strings (first byte containing the plugin name length followed by the the actual string).
The names stored are the actual names of the plugins libraries (e.g. "multiface2.acepansion").
 
= Links =
[[Snapshot Archive]]
[[Category:Programming]]
194
edits