Fix more I2C related bugs in the 9400CXI

This commit is contained in:
Jasmine Iwanek
2022-07-22 21:58:03 -04:00
parent 924408cf58
commit d94ae73ef7

View File

@@ -483,7 +483,8 @@ tgui_out(uint16_t addr, uint8_t val, void *p)
break; break;
case 0x37: case 0x37:
i2c_gpio_set(tgui->i2c, (val & 0x02) || !(val & 0x04), (val & 0x01) || !(val & 0x08)); if (tgui->type >= TGUI_9440)
i2c_gpio_set(tgui->i2c, (val & 0x02) || !(val & 0x04), (val & 0x01) || !(val & 0x08));
break; break;
case 0x40: case 0x41: case 0x42: case 0x43: case 0x40: case 0x41: case 0x42: case 0x43:
@@ -609,7 +610,7 @@ tgui_in(uint16_t addr, void *p)
return svga->crtcreg; return svga->crtcreg;
case 0x3D5: case 0x3D5:
temp = svga->crtc[svga->crtcreg]; temp = svga->crtc[svga->crtcreg];
if (svga->crtcreg == 0x37) { if ((svga->crtcreg == 0x37) && (tgui->type >= TGUI_9440)) {
if (!(temp & 0x04)) { if (!(temp & 0x04)) {
temp &= ~0x02; temp &= ~0x02;
if (i2c_gpio_get_scl(tgui->i2c)) if (i2c_gpio_get_scl(tgui->i2c))