cpu/decoder - Remove extaneous code of instruction already implemented elsewhere

This commit is contained in:
madmaurice 2023-08-30 00:25:49 +02:00
parent fe825e4f52
commit efc6762068

View file

@ -17,7 +17,7 @@ void Cpu::executeInstruction()
printf("@0x%04x: opcode %02X\n",currentpc,op);
#endif
if ((op & 0xC0) == 0x40 && op != 0x76) // LD r, r'
if ((op & 0xC0) == 0x40 && op != 0x76) // LD r, r'; LD r, [HL]; LD [HL], r
{
u8 tmp;
switch(op & 0x07)
@ -42,16 +42,6 @@ void Cpu::executeInstruction()
default: state.reg8((op >> 3) & 0x7) = imm; break;
}
}
else if((op & 0xC7) == 0x46 && op != 0x76) // LD r, [HL]
{
u8 data = bus->read8(state.HL);
state.reg8((op >> 3) & 0x7) = data;
}
else if((op & 0xC8) == 0x70 && op != 0x76) // LD [HL], r
{
u8 data = state.reg8(op & 0x7);
bus->write8(state.HL, data);
}
else if((op & 0xCF) == 0x01) // LD rr, nn
{
u16 data = readPC16();