Move all Intel derived processors over to the simpler "HALT" method.

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2019-08-29 08:57:30 +01:00
parent 4f47f3fc4d
commit f48f1d559e
2 changed files with 4 additions and 5 deletions

View File

@ -451,7 +451,7 @@ void EightBit::Intel8080::execute(const int x, const int y, const int z, const i
break; break;
case 1: // 8-bit loading case 1: // 8-bit loading
if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL)) if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL))
halt(); lowerHALT();
} else { } else {
R(y, R(z)); R(y, R(z));
if (UNLIKELY((y == 6) || (z == 6))) // M operations if (UNLIKELY((y == 6) || (z == 6))) // M operations

View File

@ -315,8 +315,7 @@ int EightBit::GameBoy::LR35902::step() {
const int index = EightBit::findFirstSet(masked); const int index = EightBit::findFirstSet(masked);
BUS().DATA() = 0x38 + (index << 3); BUS().DATA() = 0x38 + (index << 3);
} else { } else {
if (halted()) raiseHALT();
proceed();
} }
} }
@ -324,7 +323,7 @@ int EightBit::GameBoy::LR35902::step() {
handleRESET(); handleRESET();
} else if (UNLIKELY(lowered(INT()))) { } else if (UNLIKELY(lowered(INT()))) {
handleINT(); handleINT();
} else if (UNLIKELY(halted())) { } else if (UNLIKELY(lowered(HALT()))) {
Processor::execute(0); // NOP Processor::execute(0); // NOP
} else { } else {
Processor::execute(fetchByte()); Processor::execute(fetchByte());
@ -589,7 +588,7 @@ void EightBit::GameBoy::LR35902::executeOther(const int x, const int y, const in
break; break;
case 1: // 8-bit loading case 1: // 8-bit loading
if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL)) if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL))
halt(); lowerHALT();
} else { } else {
R(y, R(z)); R(y, R(z));
if (UNLIKELY((y == 6) || (z == 6))) // M operations if (UNLIKELY((y == 6) || (z == 6))) // M operations