First post, by GloriousCow
- Rank
- Member
In the ongoing pursuit of emulator cycle accuracy, I'm investigating the cycle timing for interrupts. Specifically, waking from a HALT.
I have an 8088 on a microcontroller and what I have discovered is that there is a somewhat significant delay between INTR being asserted and the first INTA bus cycle.
Here I assert the INTR while halted and step the CPU...
2023-05-20T15:26:34Z TRACE cpu_client::remote_cpu Setting INTR high to recover from halt...
00000070 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000071 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000072 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000073 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000074 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000075 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000076 [60104] M:... I:... Q:.. PASV T1 | 1 [90 ]
00000077 A:[00195] M:... I:... Q:.. IRQA T1 | 1 [90 ]
I see either a 7 or 8 cycle delay. The additional cycle delay is less frequent, but frequent enough to see.
I confirmed this with a scope, see attached. Yellow is the PIT channel 0 output. It's interesting to see it has a slow enough rise time to effectively delay INTR a half cycle.
I stuck a probe on HOLDA just to make sure the delay wasn't caused by DMA. My arduino-controlled 8088 has no DMA controller, so I had pretty much ruled that out anyway.
Anyone know the underlying rules or logic for interrupt acknowledgement on the 8088?
MartyPC: A cycle-accurate IBM PC/XT emulator | https://github.com/dbalsom/martypc