Skip to content

Document the C64 emulation's accuracy and known limitations, and let the VICE testbench run with the legacy pixel generator - #355

Merged
highbyte merged 1 commit into
feature/cpu-cycle-enginefrom
feature/c64-accuracy-boundaries-doc
Sep 25, 2026
Merged

highbyte merged 1 commit into
feature/cpu-cycle-enginefrom
feature/c64-accuracy-boundaries-doc

Conversation

@highbyte

Copy link
Copy Markdown
Owner

A new documentation page, C64 emulation accuracy and known limitations (docs/systems/c64/accuracy.md, in the navigation under the C64 system after Libraries, and linked from the overview). It is for readers who want to know, at the level of individual cycles, how close the emulation is to the real machine and where it stops. Each point names the VICE test programs that show it, so a reader can check it themselves.

What the page covers

  • Models: 6569 (PAL) and 6567R8 (NTSC) VIC-II; the 6567R56A and 8565/8562 are not modelled. The original 6526 CIA; the 6526A ("new CIA") is not, and cannot be selected.
  • CPU: coverage of undocumented opcodes per compatibility profile; the ANE/LXA magic constant; undriven 6510 port bits that hold their value without fading; JAM.
  • VIC-II: graphics memory written in the cycles it is fetched shows a few cycles early (the picture is drawn after each instruction); the sprite collision interrupt is raised at the end of the line rather than at the pixel; sprite-gap cases; the 8565 light pen.
  • The legacy pixel generator: what the faster generator does not show — 8-pixel blocks, XSCROLL/mode bits/pointers read once per line, sprites as whole bands, sprite-to-background collisions not taken from the drawn graphics — plus the effect of turning per-line sprites off.
  • CIA: not modelled — timer cascade, the CNT input, PB6/PB7 timer output, the serial shift register, the time-of-day clock. Three known timing differences: loadth, flipos, and a timer-A interrupt disabled in the cycle its output goes active.
  • Programs that differ for reasons not yet analysed (irqdma/test5–7b, cputiming), and ackraster, which depends on where it starts in the KERNAL timer's period.

Testbench harness

A new --pixel-generator sequencer|legacy option (documented in the development guide) runs the VICE programs with the legacy pixel generator. The page's statement about the legacy generator is based on a run with it: 126 of the 274 VIC-II programs pass with it against 226 with the default generator, and no program passes only with the legacy one. The suites named on the page are the ones where the difference lies.

Checks

mkdocs build --strict passes, with every link and anchor on the new page resolving. The only code change is the harness option; the harness builds with no warnings. The claims about opcode coverage per profile, the TOD and SDR registers, and how background collisions are computed with the legacy generator were each checked against the code.

…the VICE testbench run with the legacy pixel generator
@sonarqubecloud

Copy link
Copy Markdown

@highbyte
highbyte merged commit 978254e into feature/cpu-cycle-engine Sep 25, 2026
9 checks passed
@highbyte
highbyte deleted the feature/c64-accuracy-boundaries-doc branch September 25, 2026 20:30
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