Fix Cpu::SetFlags bug in emulation mode

This commit is contained in:
scawful
2024-04-24 10:16:21 -04:00
parent d5e22cc430
commit 0225955939

View File

@@ -106,9 +106,11 @@ class Cpu : public Loggable, public core::ExperimentFlags {
void SetFlags(uint8_t val) { void SetFlags(uint8_t val) {
status = val; status = val;
if (E) { if (E) {
status |= 0x10; SetAccumulatorSize(true);
SetIndexSize(true);
SetSP(SP() & 0xFF | 0x100);
} }
if (status & 0x20) { if (GetIndexSize()) {
X &= 0xff; X &= 0xff;
Y &= 0xff; Y &= 0xff;
} }