summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-12-04 10:48:35 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-12-04 10:48:35 +0000
commit35dfc8bad2bffbbf85220849733ea8571ff9a5fa (patch)
tree8d8e52cc0195cb701877177407be2909c14db8d6 /src
parentf7a80ad72695f1b846844fc33f6d41ac46b15b27 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/emu/cpu/i8085/i8085.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emu/cpu/i8085/i8085.c b/src/emu/cpu/i8085/i8085.c
index c804d24f695..f931aff2edf 100644
--- a/src/emu/cpu/i8085/i8085.c
+++ b/src/emu/cpu/i8085/i8085.c
@@ -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 )