73 lines
1.9 KiB
Plaintext
73 lines
1.9 KiB
Plaintext
====Type definitions==============
|
|
|
|
A "string" is an LEB128 encoded number which is the number of bytes
|
|
in the string, followed by that many bytes of UTF-8 character data.
|
|
|
|
A "number" is a little endian 32 bit integer.
|
|
|
|
|
|
|
|
====File format is as follows:====
|
|
|
|
string id: file identifier, always "BIZHAWK-CDL-1"
|
|
number NumberOfBlocks: number of memory areas represented in this file
|
|
|
|
For each block:
|
|
|
|
string BlockName: identifying name of the block.
|
|
number bytelength: length of the block in bytes.
|
|
byte data[bytelength]: one byte of information for each byte in the original block.
|
|
|
|
|
|
====Other definitions:============
|
|
|
|
The BlockNames are:
|
|
|
|
ROM
|
|
HUCard ROM, or syscard bios ROm
|
|
|
|
Cart Battery RAM
|
|
32K of battery backed ram in the Populous cart
|
|
|
|
Super System Card RAM
|
|
192K of ram in the super system card
|
|
|
|
TurboCD RAM
|
|
64K of ram in the turboCD
|
|
|
|
BRAM
|
|
8K of TurboCD backup RAM. The actual RAM is smaller, but the CDL will record all
|
|
activity in that 8K region.
|
|
|
|
Main Memory
|
|
8K or 32K (SGX) of main memory
|
|
|
|
MMIO
|
|
8K of space in block ff, containing system IO ports.
|
|
|
|
UNKNOWN
|
|
8K long area which any unknown block maps to.
|
|
|
|
|
|
Each byte has 8 bits of flags on what the byte has been observed to do:
|
|
|
|
// was fetched as an opcode
|
|
Code = 0x01,
|
|
// was read or written as data
|
|
Data = 0x02,
|
|
// was read and used as a pointer to data via indirect addressing
|
|
DataPtr = 0x04,
|
|
// was read or written as stack
|
|
Stack = 0x08,
|
|
// was read or written as data via indirect addressing
|
|
IndirectData = 0x10,
|
|
// was read and used as function pointer
|
|
// NB: there is no "IndirectCode"; all code is marked simply as code regardless of how it is reached
|
|
FcnPtr = 0x20,
|
|
// was used as a source or destination (either initial or during the loop) of a block xfer
|
|
BlockXFer = 0x40,
|
|
// was fetched as an operand byte to an opcode
|
|
CodeOperand = 0x80
|
|
|
|
|