The PIC timer is no longer used to latch all IRQ updates on XT, but only those after writes to the mask register, which are now delayed for the duration of 1 CPU cycles, making the PCjr boot again, fixes #3500.
This commit is contained in:
18
src/pic.c
18
src/pic.c
@@ -225,12 +225,7 @@ find_best_interrupt(pic_t *dev)
|
||||
static __inline void
|
||||
pic_update_pending_xt(void)
|
||||
{
|
||||
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;
|
||||
pic.int_pending = (find_best_interrupt(&pic) != -1);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -248,11 +243,7 @@ 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
|
||||
@@ -501,7 +492,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