mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-01 11:29:17 +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() {
|
void EightBit::Z80::handleINT() {
|
||||||
IntelProcessor::handleINT();
|
IntelProcessor::handleINT();
|
||||||
|
tick(2); // 2 extra clock cycles introduced to allow the bus to settle
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
{
|
{
|
||||||
_ActivateIORQ iorq(*this);
|
_ActivateIORQ iorq(*this);
|
||||||
data = readBusDataM1();
|
data = readBusDataM1();
|
||||||
}
|
}
|
||||||
di();
|
di();
|
||||||
tick(5);
|
|
||||||
switch (IM()) {
|
switch (IM()) {
|
||||||
case 0: // i8080 equivalent
|
case 0: // i8080 equivalent
|
||||||
IntelProcessor::execute(data);
|
IntelProcessor::execute(data);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
tick();
|
|
||||||
restart(7 << 3);
|
restart(7 << 3);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
tick(7);
|
tick(7); // How long to allow fetching data from the device...
|
||||||
call(MEMPTR() = { data, IV() });
|
call(MEMPTR() = { data, IV() });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user