Merge remote-tracking branch 'upstream/master' into feature/ich2

This commit is contained in:
Jasmine Iwanek
2023-10-24 10:00:53 -04:00
81 changed files with 1915 additions and 1135 deletions

View File

@@ -408,6 +408,48 @@ pic_latch_read(UNUSED(uint16_t addr), UNUSED(void *priv))
return ret;
}
uint8_t
pic_read_icw(uint8_t pic_id, uint8_t icw)
{
pic_t *dev = pic_id ? &pic2 : &pic;
uint8_t ret = 0xff;
switch (icw) {
case 0x00:
ret = dev->icw1;
break;
case 0x01:
ret = dev->icw2;
break;
case 0x02:
ret = dev->icw3;
break;
case 0x03:
ret = dev->icw4;
break;
}
return ret;
}
uint8_t
pic_read_ocw(uint8_t pic_id, uint8_t ocw)
{
pic_t *dev = pic_id ? &pic2 : &pic;
uint8_t ret = 0xff;
switch (ocw) {
case 0x00:
ret = dev->ocw2;
break;
case 0x01:
ret = dev->ocw3;
break;
}
return ret;
}
uint8_t
pic_read(uint16_t addr, void *priv)
{