implemented SBC, ADC and BIT family of instruction, .logs match now 73 instructions on nestest
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
- Trace now matches the nestest reference log through line 38 (C782 BIT, CYC:98), field-for-field (PC/A/X/Y/P/SP/CYC verified by label-comparison script). Next panic is on 0x24 (BIT zp) at line 38, top of Batch 6
|
||||
- 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
|
||||
- Batch 4 done (stores): STA (7 modes), STX (3 modes), STY (3 modes) via three shared cores (sta/stx/sty) + thin wrappers. No flag changes. Refactored stx_zp to use the shared stx core for consistency. Fixed a comment typo (sta_abx was labeled 0x95 instead of 0x9D)
|
||||
- Batch 5 done (compares): CMP (8 modes), CPX (3 modes), CPY (3 modes) via three shared cores (cmp/cpx/cpy) + wrappers + immediate variants. Sets C (reg >= mem), Z, N; no store. Uses wrapping_sub for the borrow math. 70 of 151 official opcodes done. No diff progress expected until the log reaches these opcodes
|
||||
- trace bytes are length-aware via opcode_len (fixed-width byte field, columns align for awk diff)
|
||||
|
||||
## Next
|
||||
@@ -39,8 +40,8 @@ CPU implementation batches (by family, ordered by nestest log frequency):
|
||||
- Batch 2 - DONE (branches, see Done section)
|
||||
- Batch 3 - DONE (loads, see Done section)
|
||||
- Batch 4 - DONE (stores, see Done section)
|
||||
- Batch 5 - Compares: CMP 8 modes, CPX 3, CPY 3 (set C/Z/N, no store). Next up. Note: keeping family order on purpose, no diff progress until the log reaches these opcodes
|
||||
- Batch 6 - Arithmetic: ADC 8 modes, SBC 8 modes (N/V/C/Z, decimal flag inert), BIT 2 modes
|
||||
- Batch 5 - DONE (compares, see Done section)
|
||||
- Batch 6 - Arithmetic: ADC 8 modes, SBC 8 modes (N/V/C/Z, decimal flag inert), BIT 2 modes. Next up
|
||||
- Batch 7 - Logic: AND, ORA, EOR (8 modes each)
|
||||
- Batch 8 - Inc/Dec: INC/DEC 4 modes each (RMW), INX, INY, DEX, DEY
|
||||
- Batch 9 - Shifts: ASL, LSR, ROL, ROR (accumulator + 4 memory modes each, RMW)
|
||||
|
||||
Reference in New Issue
Block a user