Added a pic_set_pci() function that adds the PIC I/O aliases.

This commit is contained in:
OBattler
2021-10-02 23:07:12 +02:00
parent 7a5290912d
commit 114539b2b2
2 changed files with 13 additions and 0 deletions

View File

@@ -45,6 +45,7 @@ extern void pic_elcr_write(uint16_t port, uint8_t val, void *priv);
extern uint8_t pic_elcr_read(uint16_t port, void *priv);
extern void pic_set_shadow(int sh);
extern void pic_set_pci(void);
extern void pic_init(void);
extern void pic_init_pcjr(void);
extern void pic2_init(void);

View File

@@ -515,6 +515,18 @@ pic_write(uint16_t addr, uint8_t val, void *priv)
}
void
pic_set_pci(void)
{
int i;
for (i = 0x0024; i < 0x0040; i++) {
io_sethandler(i, 0x0002, pic_read, NULL, NULL, pic_write, NULL, NULL, &pic);
io_sethandler(i + 0x0080, 0x0002, pic_read, NULL, NULL, pic_write, NULL, NULL, &pic2);
}
}
void
pic_init(void)
{