mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-12-29 07:30:14 +00:00
Z80: Better interrupt timing response.
This commit is contained in:
parent
28ae32b8a2
commit
778aacaef6
@ -114,23 +114,22 @@ void EightBit::Z80::handleNMI() {
|
||||
|
||||
void EightBit::Z80::handleINT() {
|
||||
IntelProcessor::handleINT();
|
||||
tick(2); // 2 extra clock cycles introduced to allow the bus to settle
|
||||
uint8_t data;
|
||||
{
|
||||
_ActivateIORQ iorq(*this);
|
||||
data = readBusDataM1();
|
||||
}
|
||||
di();
|
||||
tick(5);
|
||||
switch (IM()) {
|
||||
case 0: // i8080 equivalent
|
||||
IntelProcessor::execute(data);
|
||||
break;
|
||||
case 1:
|
||||
tick();
|
||||
restart(7 << 3);
|
||||
break;
|
||||
case 2:
|
||||
tick(7);
|
||||
tick(7); // How long to allow fetching data from the device...
|
||||
call(MEMPTR() = { data, IV() });
|
||||
break;
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user