cpu/decoder - Reduct empty lines
This commit is contained in:
parent
dbd42c4573
commit
e45704e2ab
1 changed files with 1 additions and 12 deletions
|
@ -273,6 +273,7 @@ void Cpu::executeInstruction()
|
||||||
data |= (1 << bit);
|
data |= (1 << bit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// All ops except for BIT write the data back to where it came from
|
// All ops except for BIT write the data back to where it came from
|
||||||
if ((prefix_op & 0xC0) != 0x40)
|
if ((prefix_op & 0xC0) != 0x40)
|
||||||
{
|
{
|
||||||
|
@ -299,10 +300,8 @@ void Cpu::executeInstruction()
|
||||||
case 0xED:
|
case 0xED:
|
||||||
case 0xFD:
|
case 0xFD:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x00: // defined NOP
|
case 0x00: // defined NOP
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x0A: // Load A, [BC]
|
case 0x0A: // Load A, [BC]
|
||||||
state.A = bus->read8(state.BC);
|
state.A = bus->read8(state.BC);
|
||||||
mcycles = 2;
|
mcycles = 2;
|
||||||
|
@ -393,7 +392,6 @@ void Cpu::executeInstruction()
|
||||||
bus->write16(readPC16(), state.SP); mcycles = 5; break;
|
bus->write16(readPC16(), state.SP); mcycles = 5; break;
|
||||||
case 0xF9: // LD SP, HL
|
case 0xF9: // LD SP, HL
|
||||||
state.SP = state.HL; mcycles = 2; break;
|
state.SP = state.HL; mcycles = 2; break;
|
||||||
|
|
||||||
case 0xC6: // ADD n
|
case 0xC6: // ADD n
|
||||||
aluop8(ADD, readPC8()); mcycles = 2; break;
|
aluop8(ADD, readPC8()); mcycles = 2; break;
|
||||||
case 0xD6: // SUB n
|
case 0xD6: // SUB n
|
||||||
|
@ -402,7 +400,6 @@ void Cpu::executeInstruction()
|
||||||
aluop8(AND, readPC8()); mcycles = 2; break;
|
aluop8(AND, readPC8()); mcycles = 2; break;
|
||||||
case 0xF6: // OR n
|
case 0xF6: // OR n
|
||||||
aluop8(OR, readPC8()); mcycles = 2; break;
|
aluop8(OR, readPC8()); mcycles = 2; break;
|
||||||
|
|
||||||
case 0xCE: // ADC n
|
case 0xCE: // ADC n
|
||||||
aluop8(ADC, readPC8()); mcycles = 2; break;
|
aluop8(ADC, readPC8()); mcycles = 2; break;
|
||||||
case 0xDE: // SBC n
|
case 0xDE: // SBC n
|
||||||
|
@ -411,19 +408,16 @@ void Cpu::executeInstruction()
|
||||||
aluop8(XOR, readPC8()); mcycles = 2; break;
|
aluop8(XOR, readPC8()); mcycles = 2; break;
|
||||||
case 0xFE: // CP n
|
case 0xFE: // CP n
|
||||||
aluop8(CP, readPC8()); mcycles = 2; break;
|
aluop8(CP, readPC8()); mcycles = 2; break;
|
||||||
|
|
||||||
case 0x3F: // CCF complement carry flag
|
case 0x3F: // CCF complement carry flag
|
||||||
state.carry = !state.carry;
|
state.carry = !state.carry;
|
||||||
state.subtract = false;
|
state.subtract = false;
|
||||||
state.halfcarry = false;
|
state.halfcarry = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x37: // SCF Set carry flag
|
case 0x37: // SCF Set carry flag
|
||||||
state.carry = true;
|
state.carry = true;
|
||||||
state.subtract = false;
|
state.subtract = false;
|
||||||
state.halfcarry = false;
|
state.halfcarry = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x27: // DAA
|
case 0x27: // DAA
|
||||||
{
|
{
|
||||||
u16 corr = 0;
|
u16 corr = 0;
|
||||||
|
@ -439,13 +433,11 @@ void Cpu::executeInstruction()
|
||||||
state.carry = (res16 & 0x100);
|
state.carry = (res16 & 0x100);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x2F: // CPL Complement accumulator
|
case 0x2F: // CPL Complement accumulator
|
||||||
state.A = ~state.A;
|
state.A = ~state.A;
|
||||||
state.subtract = true;
|
state.subtract = true;
|
||||||
state.halfcarry = true;
|
state.halfcarry = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xC3: // JP nn
|
case 0xC3: // JP nn
|
||||||
state.PC = readPC16();
|
state.PC = readPC16();
|
||||||
mcycles = 4;
|
mcycles = 4;
|
||||||
|
@ -469,14 +461,12 @@ void Cpu::executeInstruction()
|
||||||
state.IME = IME_SCHEDULED;
|
state.IME = IME_SCHEDULED;
|
||||||
mcycles = 4;
|
mcycles = 4;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xF3: // DI
|
case 0xF3: // DI
|
||||||
state.IME = IME_OFF;
|
state.IME = IME_OFF;
|
||||||
break;
|
break;
|
||||||
case 0xFB: // EI
|
case 0xFB: // EI
|
||||||
state.IME = IME_SCHEDULED;
|
state.IME = IME_SCHEDULED;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x76: // HALT
|
case 0x76: // HALT
|
||||||
state.halted = true;
|
state.halted = true;
|
||||||
break;
|
break;
|
||||||
|
@ -484,7 +474,6 @@ void Cpu::executeInstruction()
|
||||||
(void)readPC8();
|
(void)readPC8();
|
||||||
state.stopped = true;
|
state.stopped = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xE8: // ADD SP, e8
|
case 0xE8: // ADD SP, e8
|
||||||
add16(*this, state.SP, state.SP, (s8)readPC8());
|
add16(*this, state.SP, state.SP, (s8)readPC8());
|
||||||
state.zero = false;
|
state.zero = false;
|
||||||
|
|
Loading…
Reference in a new issue