Expand description
Boundary traces in the reference’s version 1 JSON Lines schema
(trace.py and the parts of debug.py a trace needs; 6502-python
docs/trace-schema.md).
One JSON object per boundary: kind one of BoundaryKind’s values,
before and after every field of CpuState, instruction.address
the 16-bit logical PC and instruction.data the instruction’s bytes (no
mnemonic: the reference disassembles the bytes itself), and accesses
[kind, address, value] with kinds "r", "w", "d" (a dummy read,
value 0) and "i" (an internal cycle, recorded at address 0, value 0)
and 21-bit physical addresses, one per cycle. The reference’s reader,
read_trace, and first_trace_divergence compare a trace written here
with one its HuC6280Session wrote. Only writing is transcribed;
comparing is the reference’s job.
Structs§
- Step
Record - One processor boundary.
Enums§
- Access
- One cycle as the trace records it.
- Boundary
Kind - Kind of work performed by one
HuC6280::step()call.
Constants§
Functions§
- instruction_
length - How many bytes the instruction with this opcode occupies (the
reference’s
FORM_BYTESby its form). - next_
boundary - What the next
step()will do, decided as the reference’sdebug.next_boundarydecides it from a state.