CRTC on CGA-like graphics chips is now on the entire 3D0 to 3D7 port range, fixes scrolling in some old games.

This commit is contained in:
OBattler
2021-05-22 03:16:02 +02:00
parent 6ac6ef381d
commit e695cb0e3b
3 changed files with 18 additions and 0 deletions

View File

@@ -58,6 +58,9 @@ cga_out(uint16_t addr, uint8_t val, void *p)
cga_t *cga = (cga_t *) p;
uint8_t old;
if ((addr >= 0x3d0) && (addr <= 0x3d7))
addr = (addr & 0xff9) | 0x004;
switch (addr) {
case 0x3D4:
cga->crtcreg = val & 31;
@@ -100,6 +103,9 @@ cga_in(uint16_t addr, void *p)
uint8_t ret = 0xff;
if ((addr >= 0x3d0) && (addr <= 0x3d7))
addr = (addr & 0xff9) | 0x004;
switch (addr) {
case 0x3D4:
ret = cga->crtcreg;