Some fixes for the Voodoo emulation (Voodoo2 still not usable in Win95)

- fixed clock values (assigned to wrong model)
- LFB read/write: don't limit y values to 1023 (4MB now usable this way)
- additional Voodoo2 fbiInit* register writes now handled like the Voodoo1 ones
This commit is contained in:
Volker Ruppert 2014-01-03 16:42:31 +00:00
parent 7173b6ee0f
commit 2a8a45748f
2 changed files with 8 additions and 5 deletions

View File

@ -204,10 +204,10 @@ void bx_voodoo_c::init(void)
if (model == VOODOO_2) {
init_pci_conf(0x121a, 0x0002, 0x02, 0x038000, 0x00);
BX_VOODOO_THIS pci_conf[0x10] = 0x08;
BX_VOODOO_THIS s.clock = STD_VOODOO_1_CLOCK;
} else {
init_pci_conf(0x121a, 0x0001, 0x01, 0x000000, 0x00);
BX_VOODOO_THIS s.clock = STD_VOODOO_2_CLOCK;
} else {
init_pci_conf(0x121a, 0x0001, 0x02, 0x000000, 0x00);
BX_VOODOO_THIS s.clock = STD_VOODOO_1_CLOCK;
}
BX_VOODOO_THIS pci_conf[0x3d] = BX_PCI_INTA;
BX_VOODOO_THIS pci_base_address[0] = 0;

View File

@ -1900,6 +1900,9 @@ void register_w(Bit32u offset, Bit32u data)
case fbiInit1:
case fbiInit2:
case fbiInit4:
case fbiInit5:
case fbiInit6:
case fbiInit7:
poly_wait(v->poly, v->regnames[regnum]);
if (v->type <= VOODOO_2 && (chips & 1) && INITEN_ENABLE_HW_INIT(v->pci.init_enable))
@ -2378,7 +2381,7 @@ Bit32u lfb_w(Bit32u offset, Bit32u data, Bit32u mem_mask)
/* compute X,Y */
x = (offset << 0) & ((1 << v->fbi.lfb_stride) - 1);
y = (offset >> v->fbi.lfb_stride) & ((1 << v->fbi.lfb_stride) - 1);
y = (offset >> v->fbi.lfb_stride) & 0x7ff;
/* adjust the mask based on which half of the data is written */
if (!ACCESSING_BITS_0_15)
@ -2663,7 +2666,7 @@ Bit32u lfb_r(Bit32u offset)
/* compute X,Y */
x = (offset << 1) & 0x3fe;
y = (offset >> 9) & 0x3ff;
y = (offset >> 9) & 0x7ff;
/* select the target buffer */
destbuf = (v->type >= VOODOO_BANSHEE) ? (!forcefront) : LFBMODE_READ_BUFFER_SELECT(v->reg[lfbMode].u);