diff --git a/src/machine/machine_at_430hx.c b/src/machine/machine_at_430hx.c index ca110dd60..e30e57036 100644 --- a/src/machine/machine_at_430hx.c +++ b/src/machine/machine_at_430hx.c @@ -130,6 +130,10 @@ static void i430hx_write(int func, int addr, uint8_t val, void *priv) if ((card_i430hx[0x5f] ^ val) & 0xf0) i430hx_map(0xec000, 0x04000, val >> 4); break; + case 0x72: /*SMRAM*/ + if ((card_i430hx[0x72] ^ val) & 0x48) + i430hx_map(0xa0000, 0x20000, ((val & 0x48) == 0x48) ? 3 : 0); + break; } card_i430hx[addr] = val; @@ -171,6 +175,7 @@ static void i430hx_reset(void) static void i430hx_pci_reset(void) { i430hx_write(0, 0x59, 0x00, NULL); + i430hx_write(0, 0x72, 0x02, NULL); } diff --git a/src/machine/machine_at_430vx.c b/src/machine/machine_at_430vx.c index 54171e2a4..d2378673c 100644 --- a/src/machine/machine_at_430vx.c +++ b/src/machine/machine_at_430vx.c @@ -133,6 +133,10 @@ static void i430vx_write(int func, int addr, uint8_t val, void *priv) i430vx_map(0xec000, 0x04000, val >> 4); /* pclog("i430vx_write : PAM6 write %02X\n", val); */ break; + case 0x72: /*SMRAM*/ + if ((card_i430vx[0x72] ^ val) & 0x48) + i430vx_map(0xa0000, 0x20000, ((val & 0x48) == 0x48) ? 3 : 0); + break; } card_i430vx[addr] = val; @@ -174,6 +178,7 @@ static void i430vx_reset(void) static void i430vx_pci_reset(void) { i430vx_write(0, 0x59, 0x00, NULL); + i430vx_write(0, 0x72, 0x02, NULL); } diff --git a/src/machine/machine_at_440fx.c b/src/machine/machine_at_440fx.c index fcb579111..5858f798f 100644 --- a/src/machine/machine_at_440fx.c +++ b/src/machine/machine_at_440fx.c @@ -130,6 +130,10 @@ static void i440fx_write(int func, int addr, uint8_t val, void *priv) if ((card_i440fx[0x5f] ^ val) & 0xf0) i440fx_map(0xec000, 0x04000, val >> 4); break; + case 0x72: /*SMRAM*/ + if ((card_i440fx[0x72] ^ val) & 0x48) + i440fx_map(0xa0000, 0x20000, ((val & 0x48) == 0x48) ? 3 : 0); + break; } card_i440fx[addr] = val; @@ -175,6 +179,7 @@ static void i440fx_reset(void) static void i440fx_pci_reset(void) { i440fx_write(0, 0x59, 0x00, NULL); + i440fx_write(0, 0x72, 0x02, NULL); } diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 384a0a5c5..b1e79d764 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -107,9 +107,6 @@ uint8_t cga_in(uint16_t addr, void *p) void cga_write(uint32_t addr, uint8_t val, void *p) { cga_t *cga = (cga_t *)p; - /* 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) diff --git a/src/video/vid_hercules.c b/src/video/vid_hercules.c index 0329c9b7a..c2f415d29 100644 --- a/src/video/vid_hercules.c +++ b/src/video/vid_hercules.c @@ -114,9 +114,6 @@ void hercules_write(uint32_t addr, uint8_t val, void *p) { hercules_t *hercules = (hercules_t *)p; egawrites++; - /* 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; // pclog("Herc write %08X %02X\n",addr,val); hercules->vram[addr & 0xffff] = val; } diff --git a/src/video/vid_herculesplus.c b/src/video/vid_herculesplus.c index c9ef61bd9..84c0d1ea3 100644 --- a/src/video/vid_herculesplus.c +++ b/src/video/vid_herculesplus.c @@ -148,10 +148,6 @@ void herculesplus_write(uint32_t addr, uint8_t val, void *p) egawrites++; - /* 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; - addr &= 0xFFFF; herculesplus->vram[addr] = val; diff --git a/src/video/vid_incolor.c b/src/video/vid_incolor.c index 6fdee5417..0d860510c 100644 --- a/src/video/vid_incolor.c +++ b/src/video/vid_incolor.c @@ -266,10 +266,6 @@ void incolor_write(uint32_t addr, uint8_t val, void *p) egawrites++; - /* 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; - addr &= 0xFFFF; /* In text mode, writes to the bottom 16k always touch all 4 planes */ diff --git a/src/video/vid_mda.c b/src/video/vid_mda.c index 942425cda..7fefcb33b 100644 --- a/src/video/vid_mda.c +++ b/src/video/vid_mda.c @@ -102,9 +102,6 @@ void mda_write(uint32_t addr, uint8_t val, void *p) { mda_t *mda = (mda_t *)p; egawrites++; - /* 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; mda->vram[addr & 0xfff] = val; } diff --git a/src/video/vid_paradise.c b/src/video/vid_paradise.c index 744341afc..04d69180d 100644 --- a/src/video/vid_paradise.c +++ b/src/video/vid_paradise.c @@ -253,9 +253,6 @@ void paradise_write(uint32_t addr, uint8_t val, void *p) paradise_t *paradise = (paradise_t *)p; addr = (addr & 0x7fff) + paradise->write_bank[(addr >> 15) & 3]; - /* 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; svga_write_linear(addr, val, ¶dise->svga); } diff --git a/src/video/vid_svga.c b/src/video/vid_svga.c index 27e61cbc4..f72bf1dfd 100644 --- a/src/video/vid_svga.c +++ b/src/video/vid_svga.c @@ -1044,10 +1044,6 @@ void svga_write(uint32_t addr, uint8_t val, void *p) uint8_t vala, valb, valc, vald, wm = svga->writemask; int writemask2 = svga->writemask; - /* 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; - egawrites++; cycles -= video_timing_b;