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:
@@ -228,6 +228,9 @@ vid_out_1512(uint16_t addr, uint8_t val, void *priv)
|
||||
amsvid_t *vid = (amsvid_t *)priv;
|
||||
uint8_t old;
|
||||
|
||||
if ((addr >= 0x3d0) && (addr <= 0x3d7))
|
||||
addr = (addr & 0xff9) | 0x004;
|
||||
|
||||
switch (addr) {
|
||||
case 0x03d4:
|
||||
vid->crtcreg = val & 31;
|
||||
@@ -277,6 +280,9 @@ vid_in_1512(uint16_t addr, void *priv)
|
||||
amsvid_t *vid = (amsvid_t *)priv;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if ((addr >= 0x3d0) && (addr <= 0x3d7))
|
||||
addr = (addr & 0xff9) | 0x004;
|
||||
|
||||
switch (addr) {
|
||||
case 0x03d4:
|
||||
ret = vid->crtcreg;
|
||||
|
@@ -520,6 +520,9 @@ vid_out(uint16_t addr, uint8_t val, void *priv)
|
||||
t1kvid_t *vid = dev->vid;
|
||||
uint8_t old;
|
||||
|
||||
if ((addr >= 0x3d0) && (addr <= 0x3d7))
|
||||
addr = (addr & 0xff9) | 0x004;
|
||||
|
||||
switch (addr) {
|
||||
case 0x03d4:
|
||||
vid->crtcreg = val & 0x1f;
|
||||
@@ -589,6 +592,9 @@ vid_in(uint16_t addr, void *priv)
|
||||
t1kvid_t *vid = dev->vid;
|
||||
uint8_t ret = 0xff;
|
||||
|
||||
if ((addr >= 0x3d0) && (addr <= 0x3d7))
|
||||
addr = (addr & 0xff9) | 0x004;
|
||||
|
||||
switch (addr) {
|
||||
case 0x03d4:
|
||||
ret = vid->crtcreg;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user