diff --git a/cpu/decoder.cpp b/cpu/decoder.cpp index 97f0dbb..2ba95fd 100644 --- a/cpu/decoder.cpp +++ b/cpu/decoder.cpp @@ -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();