1
0
mirror of https://github.com/MoleskiCoder/EightBit.git synced 2025-01-12 23:30:24 +00:00

Tidy the i8080 interrupt handling to be more like the Z80 implementation

Signed-off-by: Adrian Conlon <Adrian.conlon@gmail.com>
This commit is contained in:
Adrian Conlon 2017-12-04 23:20:55 +00:00
parent f1b3fc1932
commit 1bf797490b

@ -266,15 +266,14 @@ int EightBit::Intel8080::step() {
ExecutingInstruction.fire(*this); ExecutingInstruction.fire(*this);
resetCycles(); resetCycles();
if (LIKELY(powered())) { if (LIKELY(powered())) {
uint8_t instruction; if (UNLIKELY(INT())) {
if (UNLIKELY(INT() && m_interruptEnable)) {
INT() = false; INT() = false;
di(); if (m_interruptEnable) {
instruction = BUS().DATA(); di();
} else { return execute(BUS().DATA());
instruction = fetchByte(); }
} }
return execute(instruction); return execute(fetchByte());
} }
return cycles(); return cycles();
} }