mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-25 15:30:35 +00:00
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:
parent
4f47f3fc4d
commit
f48f1d559e
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user