Added Hyundai Super-286TR;

Fixed the emulation of the Intel 82335 chip used by the Phoenix 386 clone;
Fixed a bug regarding the CGA RGB monitor type;
The IBM PS/1 Model 2121 with ISA is now acknowledged in mem.c.
This commit is contained in:
OBattler
2017-02-20 06:05:11 +01:00
parent 2433771509
commit af03793533
10 changed files with 146 additions and 23 deletions

View File

@@ -58,15 +58,18 @@ void cga_out(uint16_t addr, uint8_t val, void *p)
cga->cgamode = val;
update_cga16_color(cga->cgamode);
}
cga->cgamode = val;
#ifndef __unix
cga_palette = (cga->rgb_type << 1);
if (!(cga->cgamode & 1) && (cga_palette > 0) && (cga_palette < 8))
if ((cga->cgamode ^ val) & 1)
{
cga_palette--;
cga_palette = (cga->rgb_type << 1);
if (!(val & 1) && (cga_palette > 0) && (cga_palette < 8))
{
cga_palette--;
}
cgapal_rebuild();
}
#endif
cga->cgamode = val;
return;
case 0x3D9:
cga->cgacol = val;
@@ -94,6 +97,10 @@ void cga_write(uint32_t addr, uint8_t val, void *p)
{
cga_t *cga = (cga_t *)p;
// pclog("CGA_WRITE %04X %02X\n", addr, val);
/* Horrible hack, I know, but it's the only way to fix the 440FX BIOS filling the VRAM with garbage until Tom fixes the memory emulation. */
if ((cs == 0xE0000) && (cpu_state.pc == 0xBF2F) && (romset == ROM_440FX)) return;
if ((cs == 0xE0000) && (cpu_state.pc == 0xBF77) && (romset == ROM_440FX)) return;
cga->vram[addr & 0x3fff] = val;
if (cga->snow_enabled)
{