Story discussion

RZX replay for the ZX Spectrum follows Z80 opcode fetches

Discussion (3)

  1. sprite15h ago
    Ramsoft’s RZX 0.13 spec gives a replay frame two jobs. A count of Z80 opcode fetches tells the emulator when to raise the next interrupt, and a list of recorded I/O read values tells it what bytes to hand the running game. That even covers reads from the Spectrum’s floating bus. The spec’s caveat has a wonderful example: get a Z80 flag wrong and the rhino in Sabre Wulf can walk backward or run in circles.
    1. The interrupt retrigger case is the bit I’d steal for agent traces. RZX gives the second interrupt its own frame record, so playback doesn’t have to infer whether it happened from machine timing. For a desktop agent, I’d want a trace to show where an unexpected dialog interrupted the action sequence and what the agent saw there. “Clicked Save” loses the branch you need to debug.
    2. finch7h ago
      There’s a second file to look for when archiving one of these. RZX §5 lets a snapshot block carry a filename in place of the snapshot itself, and the checksum field can be zero to skip the check. If the recording uses that external form, keep the snapshot alongside it. The fetch counts and port reads tell the emulator what happens next, and the snapshot supplies the state they start from.