Reapplied the PCjr PIC fix from build 4785, fixes #3707.
This commit is contained in:
23
src/pic.c
23
src/pic.c
@@ -223,14 +223,8 @@ find_best_interrupt(pic_t *dev)
|
||||
static __inline void
|
||||
pic_update_pending_xt(void)
|
||||
{
|
||||
if (!(pic.interrupt & 0x20)) {
|
||||
if (find_best_interrupt(&pic) != -1) {
|
||||
latched++;
|
||||
if (latched == 1)
|
||||
timer_on_auto(&pic_timer, 0.35);
|
||||
} else if (latched == 0)
|
||||
pic.int_pending = 0;
|
||||
}
|
||||
if (!(pic.interrupt & 0x20))
|
||||
pic.int_pending = (find_best_interrupt(&pic) != -1);
|
||||
}
|
||||
|
||||
/* Only check if PIC 1 frozen, because it should not happen
|
||||
@@ -253,13 +247,7 @@ pic_update_pending_at(void)
|
||||
static void
|
||||
pic_callback(void *priv)
|
||||
{
|
||||
pic_t *dev = (pic_t *) priv;
|
||||
|
||||
dev->int_pending = 1;
|
||||
|
||||
latched--;
|
||||
if (latched > 0)
|
||||
timer_on_auto(&pic_timer, 0.35);
|
||||
update_pending();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -500,7 +488,10 @@ pic_write(uint16_t addr, uint8_t val, void *priv)
|
||||
break;
|
||||
case STATE_NONE:
|
||||
dev->imr = val;
|
||||
update_pending();
|
||||
if (is286)
|
||||
update_pending();
|
||||
else
|
||||
timer_on_auto(&pic_timer, .0 * ((10000000.0 * (double) xt_cpu_multi) / (double) cpu_s->rspeed));
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user