Virge changes:

Removed excess logging.
Fixed ViRGE paintbrush glitches with plain ViRGE drivers on Win3.1 and OS/2's WinOS/2.
Updated the ViRGE/VX to use the new PCI set.
Removed useless IRQ configuration as it's now handled by the new PCI IRQ set.
This commit is contained in:
TC1995
2017-07-27 21:35:43 +02:00
parent 3ea92db428
commit fcdd732d27

View File

@@ -638,7 +638,7 @@ static void s3_virge_updatemapping(virge_t *virge)
return;
}
pclog("Update mapping - bank %02X ", svga->gdcreg[6] & 0xc);
//pclog("Update mapping - bank %02X ", svga->gdcreg[6] & 0xc);
switch (svga->gdcreg[6] & 0xc) /*Banked framebuffer*/
{
case 0x0: /*128k at A0000*/
@@ -661,7 +661,7 @@ static void s3_virge_updatemapping(virge_t *virge)
virge->linear_base = (svga->crtc[0x5a] << 16) | (svga->crtc[0x59] << 24);
pclog("Linear framebuffer %02X ", svga->crtc[0x58] & 0x10);
//pclog("Linear framebuffer %02X ", svga->crtc[0x58] & 0x10);
if (svga->crtc[0x58] & 0x10) /*Linear framebuffer*/
{
switch (svga->crtc[0x58] & 3)
@@ -681,7 +681,7 @@ static void s3_virge_updatemapping(virge_t *virge)
}
virge->linear_base &= ~(virge->linear_size - 1);
svga->linear_base = virge->linear_base;
pclog("Linear framebuffer at %08X size %08X\n", virge->linear_base, virge->linear_size);
//pclog("Linear framebuffer at %08X size %08X\n", virge->linear_base, virge->linear_size);
if (virge->linear_base == 0xa0000)
{
mem_mapping_set_addr(&svga->mapping, 0xa0000, 0x10000);
@@ -697,7 +697,7 @@ static void s3_virge_updatemapping(virge_t *virge)
svga->fb_only = 0;
}
pclog("Memory mapped IO %02X\n", svga->crtc[0x53] & 0x18);
//pclog("Memory mapped IO %02X\n", svga->crtc[0x53] & 0x18);
if (svga->crtc[0x53] & 0x10) /*Old MMIO*/
{
if (svga->crtc[0x53] & 0x20)
@@ -1350,16 +1350,20 @@ static void s3_virge_mmio_write_l(uint32_t addr, uint32_t val, void *p)
svga_t *svga = &virge->svga;
reg_writes++;
pclog("Write Address %x\n", addr & 0xe000);
if ((addr & 0xfffc) < 0x8000)
{
s3_virge_queue(virge, addr, val, FIFO_WRITE_DWORD);
}
else if ((addr & 0xe000) == 0xa000)
{
s3_virge_queue(virge, addr, val, FIFO_WRITE_DWORD);
}
else switch (addr & 0xfffc)
{
case 0:
s3_virge_queue(virge, addr, val, FIFO_WRITE_DWORD);
svga_recalctimings(svga);
svga->fullchange = changeframecount;
break;
case 0x8180:
virge->streams.pri_ctrl = val;
svga_recalctimings(svga);
@@ -3789,7 +3793,6 @@ static void *s3_virge_init()
virge->pci_regs[6] = 0;
virge->pci_regs[7] = 2;
virge->pci_regs[0x32] = 0x0c;
virge->pci_regs[0x3c] = device_get_config_int("irq");
virge->pci_regs[0x3d] = 1;
virge->pci_regs[0x3e] = 4;
virge->pci_regs[0x3f] = 0xff;
@@ -3884,7 +3887,6 @@ static void *s3_virge_988_init()
virge->pci_regs[6] = 0;
virge->pci_regs[7] = 2;
virge->pci_regs[0x32] = 0x0c;
virge->pci_regs[0x3c] = device_get_config_int("irq");
virge->pci_regs[0x3d] = 1;
virge->pci_regs[0x3e] = 4;
virge->pci_regs[0x3f] = 0xff;
@@ -3911,7 +3913,7 @@ static void *s3_virge_988_init()
virge->is_375 = 0;
pci_add(s3_virge_pci_read, s3_virge_pci_write, virge);
virge->card = pci_add(s3_virge_pci_read, s3_virge_pci_write, virge);
virge->wake_render_thread = thread_create_event();
virge->wake_main_thread = thread_create_event();
@@ -3979,7 +3981,6 @@ static void *s3_virge_375_init(wchar_t *romfn)
virge->pci_regs[6] = 0;
virge->pci_regs[7] = 2;
virge->pci_regs[0x32] = 0x0c;
virge->pci_regs[0x3c] = device_get_config_int("irq");
virge->pci_regs[0x3d] = 1;
virge->pci_regs[0x3e] = 4;
virge->pci_regs[0x3f] = 0xff;
@@ -4007,7 +4008,7 @@ static void *s3_virge_375_init(wchar_t *romfn)
virge->is_375 = 1;
pci_add(s3_virge_pci_read, s3_virge_pci_write, virge);
virge->card = pci_add(s3_virge_pci_read, s3_virge_pci_write, virge);
virge->wake_render_thread = thread_create_event();
virge->wake_main_thread = thread_create_event();
@@ -4125,45 +4126,6 @@ static device_config_t s3_virge_config[] =
}
}
},
{
"irq", "IRQ", CONFIG_SELECTION, "", 3,
{
{
"IRQ 3", 3
},
{
"IRQ 4", 4
},
{
"IRQ 5", 5
},
{
"IRQ 7", 7
},
{
"IRQ 9", 9
},
{
"IRQ 10", 10
},
{
"IRQ 11", 11
},
{
"IRQ 12", 12
},
{
"IRQ 14", 14
},
{
"IRQ 15", 15
},
{
""
}
},
.default_int = 3
},
{
"bilinear", "Bilinear filtering", CONFIG_BINARY, "", 1
},