added the STx family of instructions
This commit is contained in:
@@ -24,7 +24,8 @@
|
||||
- Batch 1 done (subroutines + stack): JSR, RTS, PHA, PLA, PHP, PLP, RTI, BRK, plus NOP and SEC as quick wins. Verified SP:FD->FB across JSR (push high-then-low works)
|
||||
- Batch 2 done (branches): all 8 branches (BEQ/BNE/BCC/BCS/BPL/BMI/BVC/BVS) via one shared branch() routine with condition param. Taken = +3 cycles, page-cross = +1 more. Verified both taken and not-taken paths in the log
|
||||
- Flag set/clear ops done (part of Batch 10): CLC, CLI, CLV, CLD, SEI, SED (SEC done in Batch 1). SEI/SED set, the rest clear. Fixed a real bug where SEI/SED were clearing instead of setting
|
||||
- Trace now matches the nestest reference log through line 22 (C754 A9, CYC:61), field-for-field (PC/A/X/Y/P/SP/CYC verified by label-comparison script). Next panic is on A9 (LDA immediate) at line 22, top of Batch 3
|
||||
- Trace now matches the nestest reference log through line 37 (C780 STA, CYC:95), field-for-field (PC/A/X/Y/P/SP/CYC verified by label-comparison script). Next panic is on 0x85 (STA zp) at line 37, top of Batch 4
|
||||
- Batch 3 done (loads): LDA (8 modes), LDX (5 modes), LDY (5 modes) via three shared cores (lda/ldx/ldy) + thin wrappers. Caught two real bugs in review: all 4 LDY wrappers called self.ldx (would write to X instead of Y), and 6 of 8 LDX/LDY wrappers had wrong base cycles (3 instead of 4). Both fixed
|
||||
- trace bytes are length-aware via opcode_len (fixed-width byte field, columns align for awk diff)
|
||||
|
||||
## Next
|
||||
@@ -35,8 +36,8 @@ CPU implementation batches (by family, ordered by nestest log frequency):
|
||||
|
||||
- Batch 1 - DONE (see Done section)
|
||||
- Batch 2 - DONE (branches, see Done section)
|
||||
- Batch 3 - Loads: LDA 8 modes, LDX 5 modes, LDY 5 modes (share load + set_zp_flags). Next up
|
||||
- Batch 4 - Stores: STA 7 modes, STX 3, STY 3 (share store core, no flag changes)
|
||||
- Batch 3 - DONE (loads, see Done section)
|
||||
- Batch 4 - Stores: STA 7 modes, STX 3, STY 3 (share store core, no flag changes). Next up
|
||||
- Batch 5 - Compares: CMP 8 modes, CPX 3, CPY 3 (set C/Z/N, no store)
|
||||
- Batch 6 - Arithmetic: ADC 8 modes, SBC 8 modes (N/V/C/Z, decimal flag inert), BIT 2 modes
|
||||
- Batch 7 - Logic: AND, ORA, EOR (8 modes each)
|
||||
|
||||
Reference in New Issue
Block a user