for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) {
if (events & irq_bit/* & baboon_active*/) {
baboon_active &= ~irq_bit;
+ baboon->mb_ifr &= ~irq_bit;
m68k_handle_int(IRQ_BABOON_0 + i);
baboon_active |= irq_bit;
- baboon->mb_ifr &= ~irq_bit;
}
}
#if 0
/* FIXME: how do you clear a pending IRQ? */
if (events & OSS_IP_SOUND) {
- /* FIXME: call sound handler */
oss->irq_pending &= ~OSS_IP_SOUND;
+ /* FIXME: call sound handler */
} else if (events & OSS_IP_SCSI) {
oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED;
- m68k_handle_int(IRQ_MAC_SCSI);
oss->irq_pending &= ~OSS_IP_SCSI;
+ m68k_handle_int(IRQ_MAC_SCSI);
oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI;
} else {
/* FIXME: error check here? */
for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) {
if (events & irq_bit) {
oss->irq_level[i] = OSS_IRQLEV_DISABLED;
- m68k_handle_int(NUBUS_SOURCE_BASE + i);
oss->irq_pending &= ~irq_bit;
+ m68k_handle_int(NUBUS_SOURCE_BASE + i);
oss->irq_level[i] = OSS_IRQLEV_NUBUS;
}
}
for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) {
if (events & irq_bit) {
psc_write_byte(pIER, irq_bit);
- m68k_handle_int(base_irq + i);
psc_write_byte(pIFR, irq_bit);
+ m68k_handle_int(base_irq + i);
psc_write_byte(pIER, irq_bit | 0x80);
}
}
for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
if (events & irq_bit) {
via1[vIER] = irq_bit;
- m68k_handle_int(VIA1_SOURCE_BASE + i);
via1[vIFR] = irq_bit;
+ m68k_handle_int(VIA1_SOURCE_BASE + i);
via1[vIER] = irq_bit | 0x80;
}