STPC: implement PCI IRQ steering, leave blank space for ELCR registers

This commit is contained in:
RichardG867
2020-07-08 18:21:06 -03:00
parent 07fba1ce11
commit 4ab5e7c5af

View File

@@ -477,6 +477,16 @@ stpc_reg_write(uint16_t addr, uint8_t val, void *priv)
case 0x36:
val &= 0x3f;
break;
case 0x52: case 0x53: case 0x54: case 0x55:
stpc_log("STPC: Set IRQ routing: INT %c -> %d\n", 0x41 + ((dev->reg_offset & 0x03) ^ 0x02), (val & 0x80) ? (val & 0xf) : -1);
val &= 0x8f;
pci_set_irq_routing(PCI_INTA + ((dev->reg_offset & 0x03) ^ 0x02), (val & 0x80) ? (val & 0xf) : PCI_IRQ_DISABLED);
break;
case 0x56: case 0x57:
/* ELCR goes here */
break;
}
dev->regs[dev->reg_offset] = val;