Skip to content

The trace's preamble is fixed #8

Description

@isenbek

/trace runs any of the 256 opcodes half-cycle by half-cycle, behind a fixed
preamble that is printed on the page:

LDA #$41 / LDX #$02 / LDY #$03 / CLC

So every trace starts from that one machine state. Tracing an instruction against
a chosen starting state — different accumulator, carry set, a specific page
boundary — is not possible.

Why it matters

Several of the most interesting things an instruction does depend on the state it
starts in: whether a branch is taken, whether a page is crossed, whether BCD
adjustment fires, what the carry does. With a fixed preamble the reader can see
one path through the instruction and has no way to ask for another.

What it would need

An editor for the preamble, or a small set of named starting states. The page
already assembles the opcode into memory behind the preamble and reads every
number back out of the silicon, so the machinery is there — what is missing is a
way to say what the machine should be holding first.

Worth noting the page deliberately runs past the next sync and marks those
rows as tail, because the 6502 overlaps the tail of one instruction with the next
opcode fetch. Any change here must keep that.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions