Skip to content

Add sim6502 - 6502 unit testing framework#4

Open
barryw wants to merge 1 commit intoeiroca:masterfrom
barryw:add-sim6502
Open

Add sim6502 - 6502 unit testing framework#4
barryw wants to merge 1 commit intoeiroca:masterfrom
barryw:add-sim6502

Conversation

@barryw
Copy link
Copy Markdown

@barryw barryw commented Jan 28, 2026

Description

Adding sim6502 to the Cross / Tools section.

sim6502 is a unit testing framework for 6502 assembly code. It features:

  • Custom DSL for writing tests against assembled 6502 code
  • Works with KickAssembler symbol files
  • Supports assertions, memory inspection, and CPU state verification
  • Rich error messages with "Did you mean?" suggestions
  • Test filtering, tagging, and skip options

Example test:

suites {
  suite("My Tests") {
    symbols("game.sym")
    load("game.prg", strip_header = true)
    
    test("score-increment", "Score should increase") {
      [score] = $00
      jsr([IncrementScore], stop_on_rts = true)
      assert(peekbyte([score]) == $01, "Score should be 1")
    }
  }
}

This fills a gap in the 6502 tooling ecosystem - there are many assemblers and emulators, but few dedicated testing frameworks.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant