Video changes of the night (January 29th, 2025)
Matrox MGA: A break from work can save the day all so to say. Fixes bitblt'ing on WinNT4.0/Win2000 using 32bpp modes and possibly other stuff using said Matrox chip.
This commit is contained in:
@@ -5558,6 +5558,7 @@ blit_bitblt(mystique_t *mystique)
|
|||||||
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
||||||
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
||||||
src_addr = mystique->dwgreg.ar[3];
|
src_addr = mystique->dwgreg.ar[3];
|
||||||
|
break;
|
||||||
} else
|
} else
|
||||||
src_addr += x_dir;
|
src_addr += x_dir;
|
||||||
|
|
||||||
@@ -5670,6 +5671,7 @@ blit_bitblt(mystique_t *mystique)
|
|||||||
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
||||||
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
||||||
src_addr = mystique->dwgreg.ar[3];
|
src_addr = mystique->dwgreg.ar[3];
|
||||||
|
break;
|
||||||
} else
|
} else
|
||||||
src_addr += x_dir;
|
src_addr += x_dir;
|
||||||
|
|
||||||
@@ -5756,6 +5758,7 @@ blit_bitblt(mystique_t *mystique)
|
|||||||
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
||||||
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
||||||
src_addr = mystique->dwgreg.ar[3];
|
src_addr = mystique->dwgreg.ar[3];
|
||||||
|
break;
|
||||||
} else
|
} else
|
||||||
src_addr += x_dir;
|
src_addr += x_dir;
|
||||||
|
|
||||||
@@ -5852,6 +5855,7 @@ blit_bitblt(mystique_t *mystique)
|
|||||||
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[0] += mystique->dwgreg.ar[5];
|
||||||
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
mystique->dwgreg.ar[3] += mystique->dwgreg.ar[5];
|
||||||
src_addr = mystique->dwgreg.ar[3];
|
src_addr = mystique->dwgreg.ar[3];
|
||||||
|
break;
|
||||||
} else
|
} else
|
||||||
src_addr += x_dir;
|
src_addr += x_dir;
|
||||||
|
|
||||||
@@ -6521,6 +6525,7 @@ mystique_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv)
|
|||||||
mystique->pci_regs[addr] = val;
|
mystique->pci_regs[addr] = val;
|
||||||
if (addr == 0x30)
|
if (addr == 0x30)
|
||||||
mystique->pci_regs[addr] &= 1;
|
mystique->pci_regs[addr] &= 1;
|
||||||
|
|
||||||
if (mystique->pci_regs[0x30] & 0x01) {
|
if (mystique->pci_regs[0x30] & 0x01) {
|
||||||
uint32_t biosaddr = (mystique->pci_regs[0x32] << 16) | (mystique->pci_regs[0x33] << 24);
|
uint32_t biosaddr = (mystique->pci_regs[0x32] << 16) | (mystique->pci_regs[0x33] << 24);
|
||||||
mem_mapping_set_addr(&mystique->bios_rom.mapping, biosaddr, (mystique->type == MGA_G100) ? 0x10000 : 0x8000);
|
mem_mapping_set_addr(&mystique->bios_rom.mapping, biosaddr, (mystique->type == MGA_G100) ? 0x10000 : 0x8000);
|
||||||
@@ -6533,26 +6538,24 @@ mystique_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
case 0x40:
|
case 0x40:
|
||||||
mystique->pci_regs[addr] = val & 0x3f;
|
mystique->pci_regs[0x40] = val & 0x3f;
|
||||||
break;
|
break;
|
||||||
case 0x41:
|
case 0x41:
|
||||||
mystique->pci_regs[addr] = val;
|
mystique->pci_regs[0x41] = val;
|
||||||
break;
|
break;
|
||||||
case 0x42:
|
case 0x42:
|
||||||
mystique->pci_regs[addr] = val & 0x1f;
|
mystique->pci_regs[0x42] = val & 0x1f;
|
||||||
break;
|
break;
|
||||||
case 0x43:
|
case 0x43:
|
||||||
mystique->pci_regs[addr] = val;
|
mystique->pci_regs[0x43] = val;
|
||||||
if (addr == 0x43) {
|
if (val & 0x40) {
|
||||||
if (val & 0x40) {
|
if (mystique->pci_regs[0x30] & 0x01) {
|
||||||
if (mystique->pci_regs[0x30] & 0x01) {
|
uint32_t biosaddr = (mystique->pci_regs[0x32] << 16) | (mystique->pci_regs[0x33] << 24);
|
||||||
uint32_t biosaddr = (mystique->pci_regs[0x32] << 16) | (mystique->pci_regs[0x33] << 24);
|
mem_mapping_set_addr(&mystique->bios_rom.mapping, biosaddr, (mystique->type == MGA_G100) ? 0x10000 : 0x8000);
|
||||||
mem_mapping_set_addr(&mystique->bios_rom.mapping, biosaddr, (mystique->type == MGA_G100) ? 0x10000 : 0x8000);
|
|
||||||
} else
|
|
||||||
mem_mapping_disable(&mystique->bios_rom.mapping);
|
|
||||||
} else
|
} else
|
||||||
mem_mapping_set_addr(&mystique->bios_rom.mapping, 0x000c0000, (mystique->type == MGA_G100) ? 0x10000 : 0x8000);
|
mem_mapping_disable(&mystique->bios_rom.mapping);
|
||||||
}
|
} else
|
||||||
|
mem_mapping_set_addr(&mystique->bios_rom.mapping, 0x000c0000, (mystique->type == MGA_G100) ? 0x10000 : 0x8000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0x4c:
|
case 0x4c:
|
||||||
@@ -6580,17 +6583,17 @@ mystique_pci_write(UNUSED(int func), int addr, uint8_t val, void *priv)
|
|||||||
mystique_ctrl_write_b(addr, val, mystique);
|
mystique_ctrl_write_b(addr, val, mystique);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xf8:
|
case 0xf8:
|
||||||
mystique->pci_regs[0xf8] = val & 0x7;
|
mystique->pci_regs[0xf8] = val & 0x7;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xf9:
|
case 0xf9:
|
||||||
mystique->pci_regs[0xf9] = val & 0x3;
|
mystique->pci_regs[0xf9] = val & 0x3;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 0xfb:
|
case 0xfb:
|
||||||
mystique->pci_regs[0xfb] = val;
|
mystique->pci_regs[0xfb] = val;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -6677,6 +6680,7 @@ mystique_init(const device_t *info)
|
|||||||
mystique->svga.conv_16to32 = tvp3026_conv_16to32;
|
mystique->svga.conv_16to32 = tvp3026_conv_16to32;
|
||||||
if (mystique->type == MGA_2164W)
|
if (mystique->type == MGA_2164W)
|
||||||
mystique->svga.decode_mask = 0xffffff;
|
mystique->svga.decode_mask = 0xffffff;
|
||||||
|
|
||||||
tvp3026_gpio(mystique_tvp3026_gpio_read, mystique_tvp3026_gpio_write, mystique, mystique->svga.ramdac);
|
tvp3026_gpio(mystique_tvp3026_gpio_read, mystique_tvp3026_gpio_write, mystique, mystique->svga.ramdac);
|
||||||
} else {
|
} else {
|
||||||
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_matrox_mystique);
|
video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_matrox_mystique);
|
||||||
|
|||||||
Reference in New Issue
Block a user