CGA, Hercules, MDA and PC1512 video read/writes now represented in status window.

This commit is contained in:
TomW 2013-12-20 22:24:15 +00:00
commit 677d47a109
4 changed files with 8 additions and 0 deletions

View file

@ -73,6 +73,7 @@ void cga_write(uint32_t addr, uint8_t val, void *p)
cga->vram[addr & 0x3fff] = val;
cga->charbuffer[ ((int)(((cga->dispontime - cga->vidtime) * 2) / CGACONST)) & 0xfc] = val;
cga->charbuffer[(((int)(((cga->dispontime - cga->vidtime) * 2) / CGACONST)) & 0xfc) | 1] = val;
egawrites++;
cycles -= 4;
}
@ -82,6 +83,7 @@ uint8_t cga_read(uint32_t addr, void *p)
cycles -= 4;
cga->charbuffer[ ((int)(((cga->dispontime - cga->vidtime) * 2) / CGACONST)) & 0xfc] = cga->vram[addr & 0x3fff];
cga->charbuffer[(((int)(((cga->dispontime - cga->vidtime) * 2) / CGACONST)) & 0xfc) | 1] = cga->vram[addr & 0x3fff];
egareads++;
// pclog("CGA_READ %04X\n", addr);
return cga->vram[addr & 0x3fff];
}

View file

@ -88,6 +88,7 @@ uint8_t hercules_in(uint16_t addr, void *p)
void hercules_write(uint32_t addr, uint8_t val, void *p)
{
hercules_t *hercules = (hercules_t *)p;
egawrites++;
// pclog("Herc write %08X %02X\n",addr,val);
hercules->vram[addr & 0xffff] = val;
}
@ -95,6 +96,7 @@ void hercules_write(uint32_t addr, uint8_t val, void *p)
uint8_t hercules_read(uint32_t addr, void *p)
{
hercules_t *hercules = (hercules_t *)p;
egareads++;
return hercules->vram[addr & 0xffff];
}

View file

@ -77,12 +77,14 @@ uint8_t mda_in(uint16_t addr, void *p)
void mda_write(uint32_t addr, uint8_t val, void *p)
{
mda_t *mda = (mda_t *)p;
egawrites++;
mda->vram[addr & 0xfff] = val;
}
uint8_t mda_read(uint32_t addr, void *p)
{
mda_t *mda = (mda_t *)p;
egareads++;
return mda->vram[addr & 0xfff];
}

View file

@ -114,6 +114,7 @@ static void pc1512_write(uint32_t addr, uint8_t val, void *p)
{
pc1512_t *pc1512 = (pc1512_t *)p;
egawrites++;
cycles -= 12;
addr &= 0x3fff;
@ -132,6 +133,7 @@ static uint8_t pc1512_read(uint32_t addr, void *p)
{
pc1512_t *pc1512 = (pc1512_t *)p;
egareads++;
cycles -= 12;
addr &= 0x3fff;