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

View File

@@ -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;
if (m_interruptEnable) {
di(); di();
instruction = BUS().DATA(); return execute(BUS().DATA());
} else {
instruction = fetchByte();
} }
return execute(instruction); }
return execute(fetchByte());
} }
return cycles(); return cycles();
} }