From: Micko [mailto:mmicko@gmail.com]

Sent: Tuesday, December 02, 2008 10:14 AM
To: Aaron Giles
Subject: Another 8080/85 change from me

Hi Aaron,
 
I have noticed that there are some problems in interrupt handling in 8080 implementation. Thing is that there are some cases that made a problem while implementing one 
computer emulation. Thing is that there is same computer with Z80 and 8080 cpu and ROM's are same, but interrupts were not triggered. So I have searched and found 
two problems fixed with this patch.
1. previous implementation cleared interrupt enable bit on interrupt trigger which is wrong since interrupts should stay enabled 
2. serve interrupt number was not cleared after interrupt is executed, so if same one is triggered it will not be catched.
 
I have tested with 8080 MESS drivers, and picked some of MAME drivers using 8080 and 8085, and there were no bad things found.
 
Regards,
Micko
This commit is contained in:
Aaron Giles 2008-12-04 10:48:35 +00:00
parent f7a80ad726
commit 35dfc8bad2

View File

@ -1239,7 +1239,7 @@ static void Interrupt(void)
I.IREQ &= ~I.ISRV; // remove serviced IRQ flag
RIM_IEN = (I.ISRV==IM_TRAP) ? I.IM & IM_IEN : 0; // latch general interrupt enable bit on TRAP or NMI
//ZT
I.IM &= ~IM_IEN; /* remove general interrupt enable bit */
//I.IM &= ~IM_IEN; /* remove general interrupt enable bit */
if( I.ISRV == IM_INTR )
{
@ -1298,6 +1298,7 @@ static void Interrupt(void)
execute_one(I.IRQ1 & 0xff);
}
}
I.ISRV = 0;
}
static CPU_EXECUTE( i8085 )