Removed the 440FX-related video hacks and properly fixed the issue by implementing the SMRAM register for the 430HX, 430VX, and 440FX chips.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user