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);
resetCycles();
if (LIKELY(powered())) {
uint8_t instruction;
if (UNLIKELY(INT() && m_interruptEnable)) {
if (UNLIKELY(INT())) {
INT() = false;
di();
instruction = BUS().DATA();
} else {
instruction = fetchByte();
if (m_interruptEnable) {
di();
return execute(BUS().DATA());
}
}
return execute(instruction);
return execute(fetchByte());
}
return cycles();
}