From f48f1d559efd239ddca3411bed9767718e5ab73e Mon Sep 17 00:00:00 2001 From: Adrian Conlon Date: Thu, 29 Aug 2019 08:57:30 +0100 Subject: [PATCH] Move all Intel derived processors over to the simpler "HALT" method. Signed-off-by: Adrian Conlon --- Intel8080/src/Intel8080.cpp | 2 +- LR35902/src/LR35902.cpp | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Intel8080/src/Intel8080.cpp b/Intel8080/src/Intel8080.cpp index d0d4244..3c70265 100644 --- a/Intel8080/src/Intel8080.cpp +++ b/Intel8080/src/Intel8080.cpp @@ -451,7 +451,7 @@ void EightBit::Intel8080::execute(const int x, const int y, const int z, const i break; case 1: // 8-bit loading if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL)) - halt(); + lowerHALT(); } else { R(y, R(z)); if (UNLIKELY((y == 6) || (z == 6))) // M operations diff --git a/LR35902/src/LR35902.cpp b/LR35902/src/LR35902.cpp index d6df6a1..1193a8c 100644 --- a/LR35902/src/LR35902.cpp +++ b/LR35902/src/LR35902.cpp @@ -315,8 +315,7 @@ int EightBit::GameBoy::LR35902::step() { const int index = EightBit::findFirstSet(masked); BUS().DATA() = 0x38 + (index << 3); } else { - if (halted()) - proceed(); + raiseHALT(); } } @@ -324,7 +323,7 @@ int EightBit::GameBoy::LR35902::step() { handleRESET(); } else if (UNLIKELY(lowered(INT()))) { handleINT(); - } else if (UNLIKELY(halted())) { + } else if (UNLIKELY(lowered(HALT()))) { Processor::execute(0); // NOP } else { Processor::execute(fetchByte()); @@ -589,7 +588,7 @@ void EightBit::GameBoy::LR35902::executeOther(const int x, const int y, const in break; case 1: // 8-bit loading if (UNLIKELY(z == 6 && y == 6)) { // Exception (replaces LD (HL), (HL)) - halt(); + lowerHALT(); } else { R(y, R(z)); if (UNLIKELY((y == 6) || (z == 6))) // M operations