Merge branch 'master' of https://github.com/86Box/86Box into qt

This commit is contained in:
ts-korhonen
2021-12-29 20:47:03 +02:00
5 changed files with 16 additions and 6 deletions

View File

@@ -152,7 +152,7 @@ opti495_write(uint16_t addr, uint8_t val, void *priv)
case 0xe1: case 0xe1:
case 0xe2: case 0xe2:
dev->scratch[addr] = val; dev->scratch[~addr & 0x01] = val;
break; break;
} }
} }
@@ -176,7 +176,7 @@ opti495_read(uint16_t addr, void *priv)
break; break;
case 0xe1: case 0xe1:
case 0xe2: case 0xe2:
ret = dev->scratch[addr]; ret = dev->scratch[~addr & 0x01];
break; break;
} }

View File

@@ -162,7 +162,7 @@ opti499_write(uint16_t addr, uint8_t val, void *priv)
break; break;
case 0xe1: case 0xe2: case 0xe1: case 0xe2:
dev->scratch[addr] = val; dev->scratch[~addr & 0x01] = val;
break; break;
} }
} }
@@ -189,7 +189,7 @@ opti499_read(uint16_t addr, void *priv)
break; break;
case 0xe1: case 0xe1:
case 0xe2: case 0xe2:
ret = dev->scratch[addr]; ret = dev->scratch[~addr & 0x01];
break; break;
} }

View File

@@ -133,6 +133,7 @@ extern void pgc_wake(pgc_t *);
extern void pgc_sleep(pgc_t *); extern void pgc_sleep(pgc_t *);
extern void pgc_setdisplay(pgc_t *, int cga); extern void pgc_setdisplay(pgc_t *, int cga);
extern void pgc_speed_changed(void *priv); extern void pgc_speed_changed(void *priv);
extern void pgc_close_common(void *priv);
extern void pgc_close(void *priv); extern void pgc_close(void *priv);
extern void pgc_init(pgc_t *, extern void pgc_init(pgc_t *,
int maxw, int maxh, int visw, int vish, int maxw, int maxh, int visw, int vish,

View File

@@ -1007,7 +1007,7 @@ im1024_close(void *priv)
{ {
im1024_t *dev = (im1024_t *)priv; im1024_t *dev = (im1024_t *)priv;
pgc_close(&dev->pgc); pgc_close_common(&dev->pgc);
free(dev); free(dev);
} }

View File

@@ -2600,7 +2600,7 @@ pgc_speed_changed(void *priv)
void void
pgc_close(void *priv) pgc_close_common(void *priv)
{ {
pgc_t *dev = (pgc_t *)priv; pgc_t *dev = (pgc_t *)priv;
@@ -2633,6 +2633,15 @@ pgc_close(void *priv)
free(dev->cga_vram); free(dev->cga_vram);
if (dev->vram) if (dev->vram)
free(dev->vram); free(dev->vram);
}
void
pgc_close(void *priv)
{
pgc_t *dev = (pgc_t *)priv;
pgc_close_common(priv);
free(dev); free(dev);
} }