Skip to main content

Module exec

Module exec 

Source
Expand description

Instruction fetch / decode / execute for the 65C816, plus bus plumbing.

Behavior is modelled on the bsnes / ares wdc65816 reference cores (study-only; this is a clean-room Rust implementation). The decimal-mode ADC/SBC digit-wise correction follows bsnes algorithms.cpp exactly. Cycle counts use the standard 65C816 timing tables with the variable adjustments documented in docs/cpu.md:

  • +1 if M = 0 (16-bit memory / accumulator access),
  • +1 if the low byte of D is non-zero (direct-page modes),
  • +1 on an indexed page-cross,
  • +1 branch taken, +1 more on emulation-mode page-cross.