Commit ccc07b1
Improve CPU accuracy for indexed addressing modes
- Add dummy reads on page boundary crossing for Absolute,X, Absolute,Y,
and (Indirect),Y addressing modes. When indexing crosses a page boundary,
the 6502 first reads from the "wrong" address (before carry is applied
to high byte), then reads from the correct address.
- Add dummy read for STA with indexed addressing modes (Absolute,X,
Absolute,Y, (Indirect),Y) even without page crossing, matching real
6502 behavior where write instructions always perform a read cycle.
- Clean up (Indirect,X) addressing mode - remove incorrect page crossing
check since zero-page indexing wraps within the zero page.
Fixes dummy read cycle errors in AccuracyCoin.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 4c4af69 commit ccc07b1
1 file changed
+16
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
225 | 227 | | |
226 | 228 | | |
227 | 229 | | |
| 230 | + | |
| 231 | + | |
228 | 232 | | |
229 | 233 | | |
230 | 234 | | |
| |||
234 | 238 | | |
235 | 239 | | |
236 | 240 | | |
237 | | - | |
| 241 | + | |
238 | 242 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
255 | 257 | | |
256 | 258 | | |
257 | 259 | | |
| |||
936 | 938 | | |
937 | 939 | | |
938 | 940 | | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
939 | 949 | | |
940 | 950 | | |
941 | 951 | | |
| |||
0 commit comments