From 6fcb3077eb5d2d91f30b0152fc48a208077cd816 Mon Sep 17 00:00:00 2001 From: David Banks Date: Sun, 30 Sep 2018 12:29:08 +0100 Subject: [PATCH] Z80: In INTACK cycle, force 0xFF onto the databus --- chip-z80/support.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/chip-z80/support.js b/chip-z80/support.js index b5a2666..f8859dd 100644 --- a/chip-z80/support.js +++ b/chip-z80/support.js @@ -110,7 +110,14 @@ var state = 0; var last_rd_done = 1; function handleBusRead(){ - if(!isNodeHigh(nodenames['_rd'])){ + if(!isNodeHigh(nodenames['_m1']) && !isNodeHigh(nodenames['_iorq'])) { + // Interrupt acknownledge cycle, force 0xFF onto the bus + // In IM0 this is seen as RST 0x38 + // In IM1 this is ignored + // In IM2 this is used as the low byte of the vector + // TODO: ideally this "vector" would be a configurable parameter + writeDataBus(0xff); + } else if(!isNodeHigh(nodenames['_rd'])){ var a = readAddressBus(); var d = eval(readTriggers[a]); if(d == undefined)