cpu/decoder - Remove unnessary intermediate variable

This commit is contained in:
madmaurice 2023-08-29 16:54:17 +02:00
parent c08fd5d68d
commit ddea64ec63

View file

@ -203,18 +203,12 @@ void Cpu::executeInstruction()
mcycles = 2;
break;
case 0xFA: // LD A, [nn]
{
u16 addr = readPC16();
state.A = bus->read8(addr);
state.A = bus->read8(readPC16());
mcycles = 4;
}
break;
case 0xEA: // LD [nn], A
{
u16 addr = readPC16();
bus->write8(addr, state.A);
bus->write8(readPC16(), state.A);
mcycles = 4;
}
break;
case 0xF2: // LD A, [0xFF : C]
state.A = bus->read8(make_u16(0xFFu,state.C));