[NES] one last cpu bug
This commit is contained in:
parent
00debfe6dd
commit
d0ea2f7106
|
@ -664,8 +664,8 @@ FlagT = true;// this seems wrong
|
||||||
PendingCycles -= 2; TotalExecutedCycles += 2;
|
PendingCycles -= 2; TotalExecutedCycles += 2;
|
||||||
break;
|
break;
|
||||||
case 0x81: // STA (addr,X)
|
case 0x81: // STA (addr,X)
|
||||||
temp16 = ReadWordPageWrap(ReadMemory(PC++));
|
temp8 = (byte)(ReadMemory(PC++) + X);
|
||||||
value16 = (ushort)(temp16+X);
|
value16 = ReadWordPageWrap(temp8);
|
||||||
WriteMemory(value16, A);
|
WriteMemory(value16, A);
|
||||||
PendingCycles -= 6; TotalExecutedCycles += 6;
|
PendingCycles -= 6; TotalExecutedCycles += 6;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,32 +1,42 @@
|
||||||
look for tests here: http://wiki.nesdev.com/w/index.php/Emulator_tests
|
look for tests here: http://wiki.nesdev.com/w/index.php/Emulator_tests
|
||||||
|
|
||||||
blargg's MMC3:
|
==blargg's tests==
|
||||||
|
|
||||||
|
MMC3:
|
||||||
FAIL for 4 and 6. i think 4 might not fail until some invisible PPU operations are correct. neither nintendulator or fceux pass these.
|
FAIL for 4 and 6. i think 4 might not fail until some invisible PPU operations are correct. neither nintendulator or fceux pass these.
|
||||||
|
|
||||||
blargg's ppu tests:
|
ppu tests:
|
||||||
PASS for all but power_up_palette.nes which is lame
|
PASS for all but power_up_palette.nes which is lame
|
||||||
|
|
||||||
blargg's ppu_vbl_nmi:
|
ppu_vbl_nmi:
|
||||||
FAIL for 9. But hardly anyone passes this.....
|
FAIL for 9. But hardly anyone passes this.....
|
||||||
|
|
||||||
blargg's sprite hit tests:
|
sprite hit tests:
|
||||||
FAIL for 9 and 10. fceux passes 10 (oldppu) and nintendulator passes both.
|
FAIL for 9 and 10. fceux passes 10 (oldppu) and nintendulator passes both.
|
||||||
boath are not going to work any time soon due to sprite pattern decoding being separate from BG pattern fetching instead of interleaved.
|
both are not going to work any time soon due to sprite pattern decoding being separate from BG pattern fetching instead of interleaved.
|
||||||
|
|
||||||
|
cpu_timing_test.nes
|
||||||
|
PASS
|
||||||
|
|
||||||
|
official_only.nes
|
||||||
|
PASS
|
||||||
|
|
||||||
all_instrs.nes
|
all_instrs.nes
|
||||||
FAIL (freezes emu??). I think this requires undocumented instructions.
|
FAIL (freezes emu??). I think this requires undocumented instructions.
|
||||||
|
|
||||||
|
instr_timing.nes
|
||||||
|
PASS
|
||||||
|
|
||||||
cpu_interrupts.nes
|
cpu_interrupts.nes
|
||||||
PASS
|
PASS
|
||||||
|
|
||||||
instr_misc.nes
|
instr_misc.nes
|
||||||
PASS
|
PASS
|
||||||
|
|
||||||
instr_timing.nes
|
=============
|
||||||
PASS
|
|
||||||
|
|
||||||
nestest.nes
|
nestest.nes
|
||||||
PASS
|
PASS
|
||||||
|
|
||||||
official_only.nes
|
NEStress.nes
|
||||||
PASS
|
FAIL in several cases, but this test is not highly regarded and may be inaccurate.
|
|
@ -575,8 +575,8 @@ namespace M6502
|
||||||
w.WriteLine(Spaces + "PC += 2;");
|
w.WriteLine(Spaces + "PC += 2;");
|
||||||
break;
|
break;
|
||||||
case AddrMode.IndirectX:
|
case AddrMode.IndirectX:
|
||||||
w.WriteLine(Spaces + "temp16 = ReadWordPageWrap(ReadMemory(PC++));");
|
w.WriteLine(Spaces + "temp8 = (byte)(ReadMemory(PC++) + X);");
|
||||||
w.WriteLine(Spaces + dest + " = (ushort)(temp16+X);");
|
w.WriteLine(Spaces + dest + " = ReadWordPageWrap(temp8);");
|
||||||
break;
|
break;
|
||||||
case AddrMode.IndirectY:
|
case AddrMode.IndirectY:
|
||||||
w.WriteLine(Spaces + "temp16 = ReadWordPageWrap(ReadMemory(PC++));");
|
w.WriteLine(Spaces + "temp16 = ReadWordPageWrap(ReadMemory(PC++));");
|
||||||
|
|
Loading…
Reference in New Issue