|
|
@ -468,27 +468,26 @@ void CPU::ldi16() |
|
|
|
{ |
|
|
|
{ |
|
|
|
uint8_t opcode = pcRead(); |
|
|
|
uint8_t opcode = pcRead(); |
|
|
|
switch (opcode) { |
|
|
|
switch (opcode) { |
|
|
|
case 0x01: { // LD BC,i16
|
|
|
|
case 0x01: /* LD BC,i16 */ |
|
|
|
m_wait_cycles += 12; |
|
|
|
m_c = pcRead(); |
|
|
|
write(bc(), pcRead16()); |
|
|
|
m_b = pcRead(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
case 0x11: /* LD DE,i16 */ |
|
|
|
case 0x11: // LD DE,i16
|
|
|
|
m_e = pcRead(); |
|
|
|
m_wait_cycles += 12; |
|
|
|
m_d = pcRead(); |
|
|
|
write(de(), pcRead16()); |
|
|
|
|
|
|
|
break; |
|
|
|
break; |
|
|
|
case 0x21: // LD HL,i16
|
|
|
|
case 0x21: /* LD HL,i16 */ |
|
|
|
m_wait_cycles += 12; |
|
|
|
m_l = pcRead(); |
|
|
|
write(hl(), pcRead16()); |
|
|
|
m_h = pcRead(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case 0x31: { // LD SP,i16
|
|
|
|
case 0x31: /* LD SP,i16 */ |
|
|
|
m_wait_cycles += 12; |
|
|
|
|
|
|
|
m_sp = pcRead16(); |
|
|
|
m_sp = pcRead16(); |
|
|
|
break; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
|
VERIFY_NOT_REACHED(); |
|
|
|
VERIFY_NOT_REACHED(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
m_wait_cycles += 12; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void CPU::ldr16() |
|
|
|
void CPU::ldr16() |
|
|
|