wdc65816: fix PLB wrapping in emulation mode (#1277)

>Regarding PLB, it looks like it reads from $200 and snes9x, mesen,
bsnes, and the official CPU manual all got it wrong.

Reproduced and verified on real hardware via
https://github.com/gilyon/snes-tests
This commit is contained in:
Adrian Siekierka 2023-10-29 20:16:41 +01:00 committed by Screwtapello
parent 55925d9149
commit dab534b658
1 changed files with 2 additions and 1 deletions

View File

@ -205,9 +205,10 @@ E S.h = 0x01;
auto WDC65816::instructionPullB() -> void { auto WDC65816::instructionPullB() -> void {
idle(); idle();
idle(); idle();
L B = pull(); L B = pullN();
ZF = B == 0; ZF = B == 0;
NF = B & 0x80; NF = B & 0x80;
E S.h = 0x01;
} }
auto WDC65816::instructionPullP() -> void { auto WDC65816::instructionPullP() -> void {