mirror of
https://github.com/86Box/86Box.git
synced 2026-02-27 17:34:25 -07:00
All devices now have the bus marked in their name;
The Settings dialog now correctly filters devices by bus; Split the dual VLB/PCI graphics cards into VLB and PCI versions; Device filtering is now done using the new device_is_valid() call that compares device flags to machine flags; Moved the NCR-based SCSI controllers to the main branch; Moved the NE1000 to the dev branch until it's finished.
This commit is contained in:
@@ -223,7 +223,7 @@ void ati18800_add_status_info(char *s, int max_len, void *p)
|
||||
device_t ati18800_device =
|
||||
{
|
||||
"ATI-18800",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
ati18800_init,
|
||||
ati18800_close,
|
||||
NULL,
|
||||
|
||||
@@ -489,7 +489,7 @@ static device_config_t ati28800_wonderxl_config[] =
|
||||
device_t ati28800_device =
|
||||
{
|
||||
"ATI-28800",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ati28800_init,
|
||||
ati28800_close,
|
||||
@@ -504,7 +504,7 @@ device_t ati28800_device =
|
||||
device_t compaq_ati28800_device =
|
||||
{
|
||||
"Compaq ATI-28800",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ati28800_init,
|
||||
ati28800_close,
|
||||
@@ -519,7 +519,7 @@ device_t compaq_ati28800_device =
|
||||
device_t ati28800_wonderxl24_device =
|
||||
{
|
||||
"ATI-28800 (VGA Wonder XL24)",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ati28800_init,
|
||||
ati28800_close,
|
||||
|
||||
@@ -85,7 +85,7 @@ typedef struct mach64_t
|
||||
|
||||
uint8_t regs[256];
|
||||
int index;
|
||||
|
||||
|
||||
int type;
|
||||
|
||||
uint8_t pci_regs[256];
|
||||
@@ -3294,7 +3294,7 @@ void mach64_pci_write(int func, int addr, uint8_t val, void *p)
|
||||
}
|
||||
}
|
||||
|
||||
static void *mach64_common_init(void)
|
||||
static void *mach64_common_init(device_t *info)
|
||||
{
|
||||
mach64_t *mach64 = malloc(sizeof(mach64_t));
|
||||
memset(mach64, 0, sizeof(mach64_t));
|
||||
@@ -3308,7 +3308,7 @@ static void *mach64_common_init(void)
|
||||
mach64_hwcursor_draw,
|
||||
mach64_overlay_draw);
|
||||
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&mach64->bios_rom.mapping);
|
||||
|
||||
mem_mapping_add(&mach64->linear_mapping, 0, 0, svga_read_linear, svga_readw_linear, svga_readl_linear, svga_write_linear, svga_writew_linear, svga_writel_linear, NULL, 0, &mach64->svga);
|
||||
@@ -3319,12 +3319,15 @@ static void *mach64_common_init(void)
|
||||
|
||||
mach64_io_set(mach64);
|
||||
|
||||
mach64->card = pci_add_card(PCI_ADD_VIDEO, mach64_pci_read, mach64_pci_write, mach64);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
mach64->card = pci_add_card(PCI_ADD_VIDEO, mach64_pci_read, mach64_pci_write, mach64);
|
||||
|
||||
mach64->pci_regs[PCI_REG_COMMAND] = 3;
|
||||
mach64->pci_regs[0x30] = 0x00;
|
||||
mach64->pci_regs[0x32] = 0x0c;
|
||||
mach64->pci_regs[0x33] = 0x00;
|
||||
mach64->pci_regs[PCI_REG_COMMAND] = 3;
|
||||
mach64->pci_regs[0x30] = 0x00;
|
||||
mach64->pci_regs[0x32] = 0x0c;
|
||||
mach64->pci_regs[0x33] = 0x00;
|
||||
}
|
||||
|
||||
ati68860_ramdac_init(&mach64->ramdac);
|
||||
|
||||
@@ -3339,14 +3342,14 @@ static void *mach64_common_init(void)
|
||||
|
||||
static void *mach64gx_init(device_t *info)
|
||||
{
|
||||
mach64_t *mach64 = mach64_common_init();
|
||||
mach64_t *mach64 = mach64_common_init(info);
|
||||
|
||||
mach64->type = MACH64_GX;
|
||||
mach64->pci_id = (int)'X' | ((int)'G' << 8);
|
||||
mach64->config_chip_id = 0x020000d7;
|
||||
mach64->dac_cntl = 5 << 16; /*ATI 68860 RAMDAC*/
|
||||
mach64->config_stat0 = (5 << 9) | (3 << 3); /*ATI-68860, 256Kx16 DRAM*/
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mach64->config_stat0 |= 0; /*PCI, 256Kx16 DRAM*/
|
||||
else
|
||||
mach64->config_stat0 |= 1; /*VLB, 256Kx16 DRAM*/
|
||||
@@ -3359,7 +3362,7 @@ static void *mach64gx_init(device_t *info)
|
||||
}
|
||||
static void *mach64vt2_init(device_t *info)
|
||||
{
|
||||
mach64_t *mach64 = mach64_common_init();
|
||||
mach64_t *mach64 = mach64_common_init(info);
|
||||
svga_t *svga = &mach64->svga;
|
||||
|
||||
mach64->type = MACH64_VT2;
|
||||
@@ -3507,10 +3510,10 @@ static device_config_t mach64vt2_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
device_t mach64gx_device =
|
||||
device_t mach64gx_vlb_device =
|
||||
{
|
||||
"ATI Mach64GX",
|
||||
0,
|
||||
"ATI Mach64GX VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
mach64gx_init,
|
||||
mach64_close,
|
||||
@@ -3521,6 +3524,22 @@ device_t mach64gx_device =
|
||||
mach64_add_status_info,
|
||||
mach64gx_config
|
||||
};
|
||||
|
||||
device_t mach64gx_pci_device =
|
||||
{
|
||||
"ATI Mach64GX PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
mach64gx_init,
|
||||
mach64_close,
|
||||
NULL,
|
||||
mach64gx_available,
|
||||
mach64_speed_changed,
|
||||
mach64_force_redraw,
|
||||
mach64_add_status_info,
|
||||
mach64gx_config
|
||||
};
|
||||
|
||||
device_t mach64vt2_device =
|
||||
{
|
||||
"ATI Mach64VT2",
|
||||
|
||||
@@ -16,5 +16,6 @@
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
*/
|
||||
|
||||
extern device_t mach64gx_device;
|
||||
extern device_t mach64gx_vlb_device;
|
||||
extern device_t mach64gx_pci_device;
|
||||
extern device_t mach64vt2_device;
|
||||
|
||||
@@ -578,7 +578,7 @@ static device_config_t cga_config[] =
|
||||
device_t cga_device =
|
||||
{
|
||||
"CGA",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
cga_standalone_init,
|
||||
cga_close,
|
||||
NULL,
|
||||
|
||||
@@ -1006,7 +1006,7 @@ void clgd_add_status_info(char *s, int max_len, void *p)
|
||||
device_t gd5422_device =
|
||||
{
|
||||
"Cirrus Logic GD5422",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5422_init,
|
||||
clgd_close,
|
||||
@@ -1021,7 +1021,7 @@ device_t gd5422_device =
|
||||
device_t gd5429_device =
|
||||
{
|
||||
"Cirrus Logic GD5429",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5429_init,
|
||||
clgd_close,
|
||||
@@ -1036,7 +1036,7 @@ device_t gd5429_device =
|
||||
device_t gd5430_device =
|
||||
{
|
||||
"Cirrus Logic GD5430",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5430_init,
|
||||
clgd_close,
|
||||
@@ -1051,7 +1051,7 @@ device_t gd5430_device =
|
||||
device_t dia5430_device =
|
||||
{
|
||||
"Diamond CL-GD5430",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
dia5430_init,
|
||||
clgd_close,
|
||||
@@ -1066,7 +1066,7 @@ device_t dia5430_device =
|
||||
device_t gd5434_device =
|
||||
{
|
||||
"Cirrus Logic GD5434",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5434_init,
|
||||
clgd_close,
|
||||
@@ -1081,7 +1081,7 @@ device_t gd5434_device =
|
||||
device_t gd5436_device =
|
||||
{
|
||||
"Cirrus Logic GD5436",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5436_init,
|
||||
clgd_close,
|
||||
@@ -1096,7 +1096,7 @@ device_t gd5436_device =
|
||||
device_t gd5440_device =
|
||||
{
|
||||
"Cirrus Logic GD5440",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5440_init,
|
||||
clgd_close,
|
||||
@@ -1111,7 +1111,7 @@ device_t gd5440_device =
|
||||
device_t gd5446_device =
|
||||
{
|
||||
"Cirrus Logic GD5446",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd5446_init,
|
||||
clgd_close,
|
||||
@@ -1126,7 +1126,7 @@ device_t gd5446_device =
|
||||
device_t gd6235_device =
|
||||
{
|
||||
"Cirrus Logic GD6235",
|
||||
DEVICE_NOT_WORKING,
|
||||
DEVICE_ISA | DEVICE_NOT_WORKING,
|
||||
0,
|
||||
gd6235_init,
|
||||
clgd_close,
|
||||
|
||||
@@ -445,7 +445,7 @@ static device_config_t colorplus_config[] =
|
||||
device_t colorplus_device =
|
||||
{
|
||||
"Colorplus",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
colorplus_standalone_init,
|
||||
colorplus_close,
|
||||
NULL, NULL,
|
||||
|
||||
@@ -1325,7 +1325,7 @@ static device_config_t ega_config[] =
|
||||
device_t ega_device =
|
||||
{
|
||||
"EGA",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
ega_standalone_init,
|
||||
ega_close,
|
||||
@@ -1340,7 +1340,7 @@ device_t ega_device =
|
||||
device_t cpqega_device =
|
||||
{
|
||||
"Compaq EGA",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
cpqega_standalone_init,
|
||||
ega_close,
|
||||
@@ -1355,7 +1355,7 @@ device_t cpqega_device =
|
||||
device_t sega_device =
|
||||
{
|
||||
"SuperEGA",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
sega_standalone_init,
|
||||
ega_close,
|
||||
@@ -1371,7 +1371,7 @@ device_t sega_device =
|
||||
device_t jega_device =
|
||||
{
|
||||
"AX JEGA",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
jega_standalone_init,
|
||||
ega_close,
|
||||
|
||||
@@ -199,7 +199,7 @@ void et4000_add_status_info(char *s, int max_len, void *p)
|
||||
device_t et4000_device =
|
||||
{
|
||||
"Tseng Labs ET4000AX",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
et4000_init,
|
||||
et4000_close,
|
||||
|
||||
@@ -57,6 +57,7 @@ typedef struct et4000w32p_t
|
||||
icd2061_t icd2061;
|
||||
|
||||
int index;
|
||||
int pci;
|
||||
uint8_t regs[256];
|
||||
uint32_t linearbase, linearbase_old;
|
||||
|
||||
@@ -177,7 +178,7 @@ void et4000w32p_out(uint16_t addr, uint8_t val, void *p)
|
||||
}
|
||||
if (svga->crtcreg == 0x30)
|
||||
{
|
||||
if (PCI)
|
||||
if (et4000->pci)
|
||||
{
|
||||
et4000->linearbase &= 0xc0000000;
|
||||
et4000->linearbase = (val & 0xfc) << 22;
|
||||
@@ -248,8 +249,8 @@ uint8_t et4000w32p_in(uint16_t addr, void *p)
|
||||
return (et4000->regs[0xec] & 0xf) | 0x60; /*ET4000/W32p rev D*/
|
||||
if (et4000->index == 0xef)
|
||||
{
|
||||
if (PCI) return et4000->regs[0xef] | 0xe0; /*PCI*/
|
||||
else return et4000->regs[0xef] | 0x60; /*VESA local bus*/
|
||||
if (et4000->pci) return et4000->regs[0xef] | 0xe0; /*PCI*/
|
||||
else return et4000->regs[0xef] | 0x60; /*VESA local bus*/
|
||||
}
|
||||
return et4000->regs[et4000->index];
|
||||
}
|
||||
@@ -1157,7 +1158,8 @@ void *et4000w32p_init(device_t *info)
|
||||
NULL);
|
||||
|
||||
rom_init(&et4000->bios_rom, L"roms/video/et4000w32/et4000w32.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (PCI)
|
||||
et4000->pci = !!(info->flags & DEVICE_PCI);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&et4000->bios_rom.mapping);
|
||||
|
||||
mem_mapping_add(&et4000->linear_mapping, 0, 0, svga_read_linear, svga_readw_linear, svga_readl_linear, svga_write_linear, svga_writew_linear, svga_writel_linear, NULL, 0, &et4000->svga);
|
||||
@@ -1165,7 +1167,8 @@ void *et4000w32p_init(device_t *info)
|
||||
|
||||
et4000w32p_io_set(et4000);
|
||||
|
||||
pci_add_card(PCI_ADD_VIDEO, et4000w32p_pci_read, et4000w32p_pci_write, et4000);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
pci_add_card(PCI_ADD_VIDEO, et4000w32p_pci_read, et4000w32p_pci_write, et4000);
|
||||
|
||||
/* Hardwired bits: 00000000 1xx0x0xx */
|
||||
/* R/W bits: xx xxxx */
|
||||
@@ -1258,10 +1261,25 @@ static device_config_t et4000w32p_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
device_t et4000w32p_device =
|
||||
device_t et4000w32p_vlb_device =
|
||||
{
|
||||
"Tseng Labs ET4000/w32p",
|
||||
0,
|
||||
"Tseng Labs ET4000/w32p VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
et4000w32p_init,
|
||||
et4000w32p_close,
|
||||
NULL,
|
||||
et4000w32p_available,
|
||||
et4000w32p_speed_changed,
|
||||
et4000w32p_force_redraw,
|
||||
et4000w32p_add_status_info,
|
||||
et4000w32p_config
|
||||
};
|
||||
|
||||
device_t et4000w32p_pci_device =
|
||||
{
|
||||
"Tseng Labs ET4000/w32p PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
et4000w32p_init,
|
||||
et4000w32p_close,
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
extern device_t et4000w32p_device;
|
||||
extern device_t et4000w32p_vlb_device;
|
||||
extern device_t et4000w32p_pci_device;
|
||||
|
||||
@@ -624,7 +624,7 @@ void genius_speed_changed(void *p)
|
||||
device_t genius_device =
|
||||
{
|
||||
"Genius VHR",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
genius_init,
|
||||
genius_close,
|
||||
NULL,
|
||||
|
||||
@@ -410,7 +410,7 @@ static device_config_t hercules_config[] =
|
||||
device_t hercules_device =
|
||||
{
|
||||
"Hercules",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
hercules_init,
|
||||
hercules_close,
|
||||
NULL,
|
||||
|
||||
@@ -715,7 +715,7 @@ void herculesplus_speed_changed(void *p)
|
||||
device_t herculesplus_device =
|
||||
{
|
||||
"Hercules Plus",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
herculesplus_init,
|
||||
herculesplus_close,
|
||||
NULL,
|
||||
|
||||
@@ -1062,7 +1062,7 @@ void incolor_speed_changed(void *p)
|
||||
device_t incolor_device =
|
||||
{
|
||||
"Hercules InColor",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
incolor_init,
|
||||
incolor_close,
|
||||
NULL,
|
||||
|
||||
@@ -359,7 +359,7 @@ static device_config_t mda_config[] =
|
||||
device_t mda_device =
|
||||
{
|
||||
"MDA",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
mda_init,
|
||||
mda_close,
|
||||
NULL,
|
||||
|
||||
@@ -3065,7 +3065,7 @@ device_config_t riva128zx_config[] =
|
||||
device_t riva128_device =
|
||||
{
|
||||
"nVidia RIVA 128",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
riva128_init,
|
||||
riva128_close,
|
||||
@@ -3259,7 +3259,7 @@ device_config_t rivatnt_config[] =
|
||||
device_t rivatnt_device =
|
||||
{
|
||||
"nVidia RIVA TNT",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
rivatnt_init,
|
||||
rivatnt_close,
|
||||
@@ -3482,7 +3482,7 @@ device_config_t rivatnt2_config[] =
|
||||
device_t rivatnt2_device =
|
||||
{
|
||||
"nVidia RIVA TNT2",
|
||||
0,
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
rivatnt2_init,
|
||||
rivatnt2_close,
|
||||
|
||||
@@ -287,7 +287,7 @@ static device_config_t oti077_config[] =
|
||||
device_t oti067_device =
|
||||
{
|
||||
"Oak OTI-067",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
oti067_init,
|
||||
oti067_close,
|
||||
@@ -301,7 +301,7 @@ device_t oti067_device =
|
||||
device_t oti077_device =
|
||||
{
|
||||
"Oak OTI-077",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
oti077_init,
|
||||
oti067_close,
|
||||
|
||||
@@ -433,7 +433,7 @@ device_t paradise_wd90c11_megapc_device =
|
||||
device_t paradise_wd90c11_device =
|
||||
{
|
||||
"Paradise WD90C11",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
paradise_wd90c11_megapc_init,
|
||||
paradise_close,
|
||||
|
||||
@@ -2143,7 +2143,7 @@ static int vram_sizes[] =
|
||||
3 /*8 MB*/
|
||||
};
|
||||
|
||||
static void *s3_init(wchar_t *bios_fn, int chip)
|
||||
static void *s3_init(device_t *info, wchar_t *bios_fn, int chip)
|
||||
{
|
||||
s3_t *s3 = malloc(sizeof(s3_t));
|
||||
svga_t *svga = &s3->svga;
|
||||
@@ -2160,7 +2160,7 @@ static void *s3_init(wchar_t *bios_fn, int chip)
|
||||
s3->vram_mask = vram_size - 1;
|
||||
|
||||
rom_init(&s3->bios_rom, bios_fn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&s3->bios_rom.mapping);
|
||||
|
||||
mem_mapping_add(&s3->linear_mapping, 0, 0, svga_read_linear, svga_readw_linear, svga_readl_linear, svga_write_linear, svga_writew_linear, svga_writel_linear, NULL, MEM_MAPPING_EXTERNAL, &s3->svga);
|
||||
@@ -2173,7 +2173,7 @@ static void *s3_init(wchar_t *bios_fn, int chip)
|
||||
s3_hwcursor_draw,
|
||||
NULL);
|
||||
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
svga->crtc[0x36] = 2 | (3 << 2) | (1 << 4) | (vram_sizes[vram] << 5);
|
||||
else
|
||||
svga->crtc[0x36] = 1 | (3 << 2) | (1 << 4) | (vram_sizes[vram] << 5);
|
||||
@@ -2183,13 +2183,16 @@ static void *s3_init(wchar_t *bios_fn, int chip)
|
||||
|
||||
s3_io_set(s3);
|
||||
|
||||
s3->card = pci_add_card(PCI_ADD_VIDEO, s3_pci_read, s3_pci_write, s3);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
s3->card = pci_add_card(PCI_ADD_VIDEO, s3_pci_read, s3_pci_write, s3);
|
||||
|
||||
s3->pci_regs[0x04] = 7;
|
||||
s3->pci_regs[0x04] = 7;
|
||||
|
||||
s3->pci_regs[0x30] = 0x00;
|
||||
s3->pci_regs[0x32] = 0x0c;
|
||||
s3->pci_regs[0x33] = 0x00;
|
||||
s3->pci_regs[0x30] = 0x00;
|
||||
s3->pci_regs[0x32] = 0x0c;
|
||||
s3->pci_regs[0x33] = 0x00;
|
||||
}
|
||||
|
||||
s3->chip = chip;
|
||||
|
||||
@@ -2202,9 +2205,9 @@ static void *s3_init(wchar_t *bios_fn, int chip)
|
||||
return s3;
|
||||
}
|
||||
|
||||
void *s3_vision864_init(wchar_t *bios_fn)
|
||||
void *s3_vision864_init(device_t *info, wchar_t *bios_fn)
|
||||
{
|
||||
s3_t *s3 = s3_init(bios_fn, S3_VISION864);
|
||||
s3_t *s3 = s3_init(info, bios_fn, S3_VISION864);
|
||||
|
||||
s3->id = 0xc1; /*Vision864P*/
|
||||
s3->id_ext = s3->id_ext_pci = 0xc1;
|
||||
@@ -2219,13 +2222,13 @@ void *s3_vision864_init(wchar_t *bios_fn)
|
||||
|
||||
static void *s3_bahamas64_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_vision864_init(L"roms/video/s3/bahamas64.BIN");
|
||||
s3_t *s3 = s3_vision864_init(info, L"roms/video/s3/bahamas64.BIN");
|
||||
return s3;
|
||||
}
|
||||
|
||||
static void *s3_phoenix_vision864_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_vision864_init(L"roms/video/s3/86c864p.bin");
|
||||
s3_t *s3 = s3_vision864_init(info, L"roms/video/s3/86c864p.bin");
|
||||
return s3;
|
||||
}
|
||||
|
||||
@@ -2241,7 +2244,7 @@ static int s3_phoenix_vision864_available(void)
|
||||
|
||||
static void *s3_phoenix_trio32_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_init(L"roms/video/s3/86C732P.bin", S3_TRIO32);
|
||||
s3_t *s3 = s3_init(info, L"roms/video/s3/86C732P.bin", S3_TRIO32);
|
||||
|
||||
s3->id = 0xe1; /*Trio32*/
|
||||
s3->id_ext = 0x10;
|
||||
@@ -2259,9 +2262,9 @@ static int s3_phoenix_trio32_available(void)
|
||||
return rom_present(L"roms/video/s3/86C732P.bin");
|
||||
}
|
||||
|
||||
static void *s3_trio64_init(wchar_t *bios_fn)
|
||||
static void *s3_trio64_init(device_t *info, wchar_t *bios_fn)
|
||||
{
|
||||
s3_t *s3 = s3_init(bios_fn, S3_TRIO64);
|
||||
s3_t *s3 = s3_init(info, bios_fn, S3_TRIO64);
|
||||
|
||||
s3->id = 0xe1; /*Trio64*/
|
||||
s3->id_ext = s3->id_ext_pci = 0x11;
|
||||
@@ -2275,19 +2278,19 @@ static void *s3_trio64_init(wchar_t *bios_fn)
|
||||
|
||||
static void *s3_9fx_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_trio64_init(L"roms/video/s3/s3_764.bin");
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/s3_764.bin");
|
||||
return s3;
|
||||
}
|
||||
|
||||
static void *s3_phoenix_trio64_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_trio64_init(L"roms/video/s3/86C764X1.bin");
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/86C764X1.bin");
|
||||
return s3;
|
||||
}
|
||||
|
||||
static void *s3_diamond_stealth64_init(device_t *info)
|
||||
{
|
||||
s3_t *s3 = s3_trio64_init(L"roms/video/s3/STEALT64.BIN");
|
||||
s3_t *s3 = s3_trio64_init(info, L"roms/video/s3/STEALT64.BIN");
|
||||
return s3;
|
||||
}
|
||||
|
||||
@@ -2463,10 +2466,10 @@ static device_config_t s3_phoenix_trio64_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
device_t s3_bahamas64_device =
|
||||
device_t s3_bahamas64_vlb_device =
|
||||
{
|
||||
"Paradise Bahamas 64 (S3 Vision864)",
|
||||
0,
|
||||
"Paradise Bahamas 64 (S3 Vision864) VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_bahamas64_init,
|
||||
s3_close,
|
||||
@@ -2478,10 +2481,25 @@ device_t s3_bahamas64_device =
|
||||
s3_bahamas64_config
|
||||
};
|
||||
|
||||
device_t s3_9fx_device =
|
||||
device_t s3_bahamas64_pci_device =
|
||||
{
|
||||
"Number 9 9FX (S3 Trio64)",
|
||||
0,
|
||||
"Paradise Bahamas 64 (S3 Vision864) PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_bahamas64_init,
|
||||
s3_close,
|
||||
NULL,
|
||||
s3_bahamas64_available,
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_add_status_info,
|
||||
s3_bahamas64_config
|
||||
};
|
||||
|
||||
device_t s3_9fx_vlb_device =
|
||||
{
|
||||
"Number 9 9FX (S3 Trio64) VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_9fx_init,
|
||||
s3_close,
|
||||
@@ -2493,10 +2511,25 @@ device_t s3_9fx_device =
|
||||
s3_9fx_config
|
||||
};
|
||||
|
||||
device_t s3_phoenix_trio32_device =
|
||||
device_t s3_9fx_pci_device =
|
||||
{
|
||||
"Phoenix S3 Trio32",
|
||||
0,
|
||||
"Number 9 9FX (S3 Trio64) PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_9fx_init,
|
||||
s3_close,
|
||||
NULL,
|
||||
s3_9fx_available,
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_add_status_info,
|
||||
s3_9fx_config
|
||||
};
|
||||
|
||||
device_t s3_phoenix_trio32_vlb_device =
|
||||
{
|
||||
"Phoenix S3 Trio32 VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_phoenix_trio32_init,
|
||||
s3_close,
|
||||
@@ -2508,10 +2541,25 @@ device_t s3_phoenix_trio32_device =
|
||||
s3_phoenix_trio32_config
|
||||
};
|
||||
|
||||
device_t s3_phoenix_trio64_device =
|
||||
device_t s3_phoenix_trio32_pci_device =
|
||||
{
|
||||
"Phoenix S3 Trio64",
|
||||
0,
|
||||
"Phoenix S3 Trio32 PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_phoenix_trio32_init,
|
||||
s3_close,
|
||||
NULL,
|
||||
s3_phoenix_trio32_available,
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_add_status_info,
|
||||
s3_phoenix_trio32_config
|
||||
};
|
||||
|
||||
device_t s3_phoenix_trio64_vlb_device =
|
||||
{
|
||||
"Phoenix S3 Trio64 VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_phoenix_trio64_init,
|
||||
s3_close,
|
||||
@@ -2523,10 +2571,25 @@ device_t s3_phoenix_trio64_device =
|
||||
s3_phoenix_trio64_config
|
||||
};
|
||||
|
||||
device_t s3_phoenix_vision864_device =
|
||||
device_t s3_phoenix_trio64_pci_device =
|
||||
{
|
||||
"Phoenix S3 Vision864",
|
||||
0,
|
||||
"Phoenix S3 Trio64 PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_phoenix_trio64_init,
|
||||
s3_close,
|
||||
NULL,
|
||||
s3_phoenix_trio64_available,
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_add_status_info,
|
||||
s3_phoenix_trio64_config
|
||||
};
|
||||
|
||||
device_t s3_phoenix_vision864_vlb_device =
|
||||
{
|
||||
"Phoenix S3 Vision864 VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_phoenix_vision864_init,
|
||||
s3_close,
|
||||
@@ -2538,10 +2601,40 @@ device_t s3_phoenix_vision864_device =
|
||||
s3_bahamas64_config
|
||||
};
|
||||
|
||||
device_t s3_diamond_stealth64_device =
|
||||
device_t s3_phoenix_vision864_pci_device =
|
||||
{
|
||||
"S3 Trio64 (Diamond Stealth64 DRAM)",
|
||||
0,
|
||||
"Phoenix S3 Vision864 PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_phoenix_vision864_init,
|
||||
s3_close,
|
||||
NULL,
|
||||
s3_phoenix_vision864_available,
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_add_status_info,
|
||||
s3_bahamas64_config
|
||||
};
|
||||
|
||||
device_t s3_diamond_stealth64_vlb_device =
|
||||
{
|
||||
"S3 Trio64 (Diamond Stealth64 DRAM) VLB",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_diamond_stealth64_init,
|
||||
s3_close,
|
||||
NULL,
|
||||
s3_diamond_stealth64_available,
|
||||
s3_speed_changed,
|
||||
s3_force_redraw,
|
||||
s3_add_status_info,
|
||||
s3_phoenix_trio64_config
|
||||
};
|
||||
|
||||
device_t s3_diamond_stealth64_pci_device =
|
||||
{
|
||||
"S3 Trio64 (Diamond Stealth64 DRAM) PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_diamond_stealth64_init,
|
||||
s3_close,
|
||||
|
||||
@@ -17,10 +17,16 @@
|
||||
* Copyright 2016-2017 Miran Grca.
|
||||
*/
|
||||
|
||||
device_t s3_bahamas64_device;
|
||||
device_t s3_9fx_device;
|
||||
device_t s3_phoenix_trio32_device;
|
||||
device_t s3_phoenix_trio64_device;
|
||||
device_t s3_phoenix_vision864_device;
|
||||
device_t s3_diamond_stealth64_device;
|
||||
device_t s3_bahamas64_vlb_device;
|
||||
device_t s3_bahamas64_pci_device;
|
||||
device_t s3_9fx_vlb_device;
|
||||
device_t s3_9fx_pci_device;
|
||||
device_t s3_phoenix_trio32_vlb_device;
|
||||
device_t s3_phoenix_trio32_pci_device;
|
||||
device_t s3_phoenix_trio64_vlb_device;
|
||||
device_t s3_phoenix_trio64_pci_device;
|
||||
device_t s3_phoenix_vision864_pci_device;
|
||||
device_t s3_phoenix_vision864_vlb_device;
|
||||
device_t s3_diamond_stealth64_pci_device;
|
||||
device_t s3_diamond_stealth64_vlb_device;
|
||||
/* device_t s3_miro_vision964_device; */
|
||||
|
||||
@@ -127,6 +127,7 @@ typedef struct virge_t
|
||||
uint8_t pci_regs[256];
|
||||
int card;
|
||||
|
||||
int pci;
|
||||
int is_375;
|
||||
|
||||
int bilinear_enabled;
|
||||
@@ -308,7 +309,7 @@ enum
|
||||
|
||||
static void s3_virge_update_irqs(virge_t *virge)
|
||||
{
|
||||
if (!PCI)
|
||||
if (!virge->pci)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -442,7 +443,7 @@ static void s3_virge_out(uint16_t addr, uint8_t val, void *p)
|
||||
case 2: case 3: svga->bpp = 15; break;
|
||||
case 4: case 5: svga->bpp = 16; break;
|
||||
case 7: svga->bpp = 24; break;
|
||||
case 13: svga->bpp = (gfxcard == GFX_VIRGEVX) ? 24 : 32; break;
|
||||
case 13: svga->bpp = ((gfxcard == GFX_VIRGEVX_VLB) || (gfxcard == GFX_VIRGEVX_PCI)) ? 24 : 32; break;
|
||||
default: svga->bpp = 8; break;
|
||||
}
|
||||
break;
|
||||
@@ -557,7 +558,7 @@ static void s3_virge_recalctimings(svga_t *svga)
|
||||
}
|
||||
}
|
||||
|
||||
if (gfxcard != GFX_VIRGEVX)
|
||||
if ((gfxcard != GFX_VIRGEVX_VLB) && (gfxcard != GFX_VIRGEVX_PCI))
|
||||
{
|
||||
if ((svga->bpp == 15) || (svga->bpp == 16))
|
||||
{
|
||||
@@ -621,7 +622,7 @@ static void s3_virge_recalctimings(svga_t *svga)
|
||||
if (((svga->miscout >> 2) & 3) == 3)
|
||||
{
|
||||
int n = svga->seqregs[0x12] & 0x1f;
|
||||
int r = (svga->seqregs[0x12] >> 5) & ((virge->is_375 || (gfxcard == GFX_VIRGEVX)) ? 7 : 3);
|
||||
int r = (svga->seqregs[0x12] >> 5) & ((virge->is_375 || ((gfxcard == GFX_VIRGEVX_VLB) || (gfxcard == GFX_VIRGEVX_PCI))) ? 7 : 3);
|
||||
int m = svga->seqregs[0x13] & 0x7f;
|
||||
double freq = (((double)m + 2) / (((double)n + 2) * (double)(1 << r))) * 14318184.0;
|
||||
|
||||
@@ -3767,8 +3768,10 @@ static void *s3_virge_init(device_t *info)
|
||||
s3_virge_overlay_draw);
|
||||
virge->svga.vblank_start = s3_virge_vblank_start;
|
||||
|
||||
virge->pci = !!(info->flags & DEVICE_PCI);
|
||||
|
||||
rom_init(&virge->bios_rom, L"roms/video/s3virge/s3virge.bin", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&virge->bios_rom.mapping);
|
||||
|
||||
mem_mapping_add(&virge->mmio_mapping, 0, 0, s3_virge_mmio_read,
|
||||
@@ -3801,14 +3804,17 @@ static void *s3_virge_init(device_t *info)
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, s3_virge_in, NULL, NULL, s3_virge_out, NULL, NULL, virge);
|
||||
|
||||
virge->pci_regs[4] = 3;
|
||||
virge->pci_regs[5] = 0;
|
||||
virge->pci_regs[6] = 0;
|
||||
virge->pci_regs[7] = 2;
|
||||
virge->pci_regs[0x32] = 0x0c;
|
||||
virge->pci_regs[0x3d] = 1;
|
||||
virge->pci_regs[0x3e] = 4;
|
||||
virge->pci_regs[0x3f] = 0xff;
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
virge->pci_regs[4] = 3;
|
||||
virge->pci_regs[5] = 0;
|
||||
virge->pci_regs[6] = 0;
|
||||
virge->pci_regs[7] = 2;
|
||||
virge->pci_regs[0x32] = 0x0c;
|
||||
virge->pci_regs[0x3d] = 1;
|
||||
virge->pci_regs[0x3e] = 4;
|
||||
virge->pci_regs[0x3f] = 0xff;
|
||||
}
|
||||
|
||||
virge->virge_id_high = 0x56;
|
||||
virge->virge_id_low = 0x31;
|
||||
@@ -3832,7 +3838,10 @@ static void *s3_virge_init(device_t *info)
|
||||
|
||||
virge->is_375 = 0;
|
||||
|
||||
virge->card = pci_add_card(PCI_ADD_VIDEO, s3_virge_pci_read, s3_virge_pci_write, virge);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
virge->card = pci_add_card(PCI_ADD_VIDEO, s3_virge_pci_read, s3_virge_pci_write, virge);
|
||||
}
|
||||
|
||||
virge->wake_render_thread = thread_create_event();
|
||||
virge->wake_main_thread = thread_create_event();
|
||||
@@ -3861,8 +3870,10 @@ static void *s3_virge_988_init(device_t *info)
|
||||
s3_virge_hwcursor_draw,
|
||||
s3_virge_overlay_draw);
|
||||
|
||||
virge->pci = !!(info->flags & DEVICE_PCI);
|
||||
|
||||
rom_init(&virge->bios_rom, L"roms/video/s3virge/diamondstealth3000.VBI", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&virge->bios_rom.mapping);
|
||||
|
||||
mem_mapping_add(&virge->mmio_mapping, 0, 0, s3_virge_mmio_read,
|
||||
@@ -3895,14 +3906,17 @@ static void *s3_virge_988_init(device_t *info)
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, s3_virge_in, NULL, NULL, s3_virge_out, NULL, NULL, virge);
|
||||
|
||||
virge->pci_regs[4] = 3;
|
||||
virge->pci_regs[5] = 0;
|
||||
virge->pci_regs[6] = 0;
|
||||
virge->pci_regs[7] = 2;
|
||||
virge->pci_regs[0x32] = 0x0c;
|
||||
virge->pci_regs[0x3d] = 1;
|
||||
virge->pci_regs[0x3e] = 4;
|
||||
virge->pci_regs[0x3f] = 0xff;
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
virge->pci_regs[4] = 3;
|
||||
virge->pci_regs[5] = 0;
|
||||
virge->pci_regs[6] = 0;
|
||||
virge->pci_regs[7] = 2;
|
||||
virge->pci_regs[0x32] = 0x0c;
|
||||
virge->pci_regs[0x3d] = 1;
|
||||
virge->pci_regs[0x3e] = 4;
|
||||
virge->pci_regs[0x3f] = 0xff;
|
||||
}
|
||||
|
||||
virge->virge_id_high = 0x88;
|
||||
virge->virge_id_low = 0x3d;
|
||||
@@ -3926,7 +3940,10 @@ static void *s3_virge_988_init(device_t *info)
|
||||
|
||||
virge->is_375 = 0;
|
||||
|
||||
virge->card = pci_add_card(PCI_ADD_VIDEO, s3_virge_pci_read, s3_virge_pci_write, virge);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
virge->card = pci_add_card(PCI_ADD_VIDEO, s3_virge_pci_read, s3_virge_pci_write, virge);
|
||||
}
|
||||
|
||||
virge->wake_render_thread = thread_create_event();
|
||||
virge->wake_main_thread = thread_create_event();
|
||||
@@ -3940,7 +3957,7 @@ static void *s3_virge_988_init(device_t *info)
|
||||
return virge;
|
||||
}
|
||||
|
||||
static void *s3_virge_375_init(wchar_t *romfn)
|
||||
static void *s3_virge_375_init(device_t *info, wchar_t *romfn)
|
||||
{
|
||||
virge_t *virge = malloc(sizeof(virge_t));
|
||||
memset(virge, 0, sizeof(virge_t));
|
||||
@@ -3955,8 +3972,10 @@ static void *s3_virge_375_init(wchar_t *romfn)
|
||||
s3_virge_hwcursor_draw,
|
||||
s3_virge_overlay_draw);
|
||||
|
||||
virge->pci = !!(info->flags & DEVICE_PCI);
|
||||
|
||||
rom_init(&virge->bios_rom, romfn, 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
if (PCI)
|
||||
if (info->flags & DEVICE_PCI)
|
||||
mem_mapping_disable(&virge->bios_rom.mapping);
|
||||
|
||||
mem_mapping_add(&virge->mmio_mapping, 0, 0, s3_virge_mmio_read,
|
||||
@@ -3989,14 +4008,17 @@ static void *s3_virge_375_init(wchar_t *romfn)
|
||||
|
||||
io_sethandler(0x03c0, 0x0020, s3_virge_in, NULL, NULL, s3_virge_out, NULL, NULL, virge);
|
||||
|
||||
virge->pci_regs[4] = 3;
|
||||
virge->pci_regs[5] = 0;
|
||||
virge->pci_regs[6] = 0;
|
||||
virge->pci_regs[7] = 2;
|
||||
virge->pci_regs[0x32] = 0x0c;
|
||||
virge->pci_regs[0x3d] = 1;
|
||||
virge->pci_regs[0x3e] = 4;
|
||||
virge->pci_regs[0x3f] = 0xff;
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
virge->pci_regs[4] = 3;
|
||||
virge->pci_regs[5] = 0;
|
||||
virge->pci_regs[6] = 0;
|
||||
virge->pci_regs[7] = 2;
|
||||
virge->pci_regs[0x32] = 0x0c;
|
||||
virge->pci_regs[0x3d] = 1;
|
||||
virge->pci_regs[0x3e] = 4;
|
||||
virge->pci_regs[0x3f] = 0xff;
|
||||
}
|
||||
|
||||
virge->virge_id_high = 0x8a;
|
||||
virge->virge_id_low = 0x01;
|
||||
@@ -4021,7 +4043,10 @@ static void *s3_virge_375_init(wchar_t *romfn)
|
||||
|
||||
virge->is_375 = 1;
|
||||
|
||||
virge->card = pci_add_card(PCI_ADD_VIDEO, s3_virge_pci_read, s3_virge_pci_write, virge);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
virge->card = pci_add_card(PCI_ADD_VIDEO, s3_virge_pci_read, s3_virge_pci_write, virge);
|
||||
}
|
||||
|
||||
virge->wake_render_thread = thread_create_event();
|
||||
virge->wake_main_thread = thread_create_event();
|
||||
@@ -4037,12 +4062,12 @@ static void *s3_virge_375_init(wchar_t *romfn)
|
||||
|
||||
static void *s3_virge_375_1_init(device_t *info)
|
||||
{
|
||||
return s3_virge_375_init(L"roms/video/s3virge/86c375_1.bin");
|
||||
return s3_virge_375_init(info, L"roms/video/s3virge/86c375_1.bin");
|
||||
}
|
||||
|
||||
static void *s3_virge_375_4_init(device_t *info)
|
||||
{
|
||||
return s3_virge_375_init(L"roms/video/s3virge/86c375_4.bin");
|
||||
return s3_virge_375_init(info, L"roms/video/s3virge/86c375_4.bin");
|
||||
}
|
||||
|
||||
static void s3_virge_close(void *p)
|
||||
@@ -4150,10 +4175,10 @@ static device_config_t s3_virge_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
device_t s3_virge_device =
|
||||
device_t s3_virge_vlb_device =
|
||||
{
|
||||
"Diamond Stealth 3D 2000 (S3 ViRGE)",
|
||||
0,
|
||||
"Diamond Stealth 3D 2000 (S3 ViRGE) VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_virge_init,
|
||||
s3_virge_close,
|
||||
@@ -4165,10 +4190,25 @@ device_t s3_virge_device =
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_988_device =
|
||||
device_t s3_virge_pci_device =
|
||||
{
|
||||
"Diamond Stealth 3D 3000 (S3 ViRGE/VX)",
|
||||
"Diamond Stealth 3D 2000 (S3 ViRGE) PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_virge_init,
|
||||
s3_virge_close,
|
||||
NULL,
|
||||
s3_virge_available,
|
||||
s3_virge_speed_changed,
|
||||
s3_virge_force_redraw,
|
||||
s3_virge_add_status_info,
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_988_vlb_device =
|
||||
{
|
||||
"Diamond Stealth 3D 3000 (S3 ViRGE/VX) VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_virge_988_init,
|
||||
s3_virge_close,
|
||||
@@ -4180,10 +4220,25 @@ device_t s3_virge_988_device =
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_375_device =
|
||||
device_t s3_virge_988_pci_device =
|
||||
{
|
||||
"S3 ViRGE/DX",
|
||||
"Diamond Stealth 3D 3000 (S3 ViRGE/VX) PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_virge_988_init,
|
||||
s3_virge_close,
|
||||
NULL,
|
||||
s3_virge_988_available,
|
||||
s3_virge_speed_changed,
|
||||
s3_virge_force_redraw,
|
||||
s3_virge_add_status_info,
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_375_vlb_device =
|
||||
{
|
||||
"S3 ViRGE/DX VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_virge_375_1_init,
|
||||
s3_virge_close,
|
||||
@@ -4195,10 +4250,40 @@ device_t s3_virge_375_device =
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_375_4_device =
|
||||
device_t s3_virge_375_pci_device =
|
||||
{
|
||||
"S3 ViRGE/DX (VBE 2.0)",
|
||||
"S3 ViRGE/DX PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_virge_375_1_init,
|
||||
s3_virge_close,
|
||||
NULL,
|
||||
s3_virge_375_1_available,
|
||||
s3_virge_speed_changed,
|
||||
s3_virge_force_redraw,
|
||||
s3_virge_add_status_info,
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_375_4_vlb_device =
|
||||
{
|
||||
"S3 ViRGE/DX (VBE 2.0) VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
s3_virge_375_4_init,
|
||||
s3_virge_close,
|
||||
NULL,
|
||||
s3_virge_375_4_available,
|
||||
s3_virge_speed_changed,
|
||||
s3_virge_force_redraw,
|
||||
s3_virge_add_status_info,
|
||||
s3_virge_config
|
||||
};
|
||||
|
||||
device_t s3_virge_375_4_pci_device =
|
||||
{
|
||||
"S3 ViRGE/DX (VBE 2.0) PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
s3_virge_375_4_init,
|
||||
s3_virge_close,
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
extern device_t s3_virge_device;
|
||||
extern device_t s3_virge_988_device;
|
||||
extern device_t s3_virge_375_device;
|
||||
extern device_t s3_virge_375_4_device;
|
||||
extern device_t s3_virge_vlb_device;
|
||||
extern device_t s3_virge_pci_device;
|
||||
extern device_t s3_virge_988_vlb_device;
|
||||
extern device_t s3_virge_988_pci_device;
|
||||
extern device_t s3_virge_375_vlb_device;
|
||||
extern device_t s3_virge_375_pci_device;
|
||||
extern device_t s3_virge_375_4_vlb_device;
|
||||
extern device_t s3_virge_375_4_pci_device;
|
||||
|
||||
@@ -55,6 +55,7 @@ typedef struct tgui_t
|
||||
rom_t bios_rom;
|
||||
|
||||
svga_t svga;
|
||||
int pci;
|
||||
|
||||
struct
|
||||
{
|
||||
@@ -229,7 +230,7 @@ void tgui_out(uint16_t addr, uint8_t val, void *p)
|
||||
case 0x21:
|
||||
if (old != val)
|
||||
{
|
||||
if (!PCI)
|
||||
if (!tgui->pci)
|
||||
{
|
||||
tgui->linear_base = ((val & 0xf) | ((val >> 2) & 0x30)) << 20;
|
||||
tgui->linear_size = (val & 0x10) ? 0x200000 : 0x100000;
|
||||
@@ -515,6 +516,8 @@ void *tgui9440_init(device_t *info)
|
||||
tgui->vram_size = device_get_config_int("memory") << 20;
|
||||
tgui->vram_mask = tgui->vram_size - 1;
|
||||
|
||||
tgui->pci = !!(info->flags & DEVICE_PCI);
|
||||
|
||||
rom_init(&tgui->bios_rom, L"roms/video/tgui9440/9440.vbi", 0xc0000, 0x8000, 0x7fff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
svga_init(&tgui->svga, tgui, tgui->vram_size,
|
||||
@@ -530,7 +533,10 @@ void *tgui9440_init(device_t *info)
|
||||
io_sethandler(0x03c0, 0x0020, tgui_in, NULL, NULL, tgui_out, NULL, NULL, tgui);
|
||||
io_sethandler(0x43c8, 0x0002, tgui_in, NULL, NULL, tgui_out, NULL, NULL, tgui);
|
||||
|
||||
pci_add_card(PCI_ADD_VIDEO, tgui_pci_read, tgui_pci_write, tgui);
|
||||
if (info->flags & DEVICE_PCI)
|
||||
{
|
||||
pci_add_card(PCI_ADD_VIDEO, tgui_pci_read, tgui_pci_write, tgui);
|
||||
}
|
||||
|
||||
tgui->wake_fifo_thread = thread_create_event();
|
||||
tgui->fifo_not_full_event = thread_create_event();
|
||||
@@ -1271,10 +1277,25 @@ static device_config_t tgui9440_config[] =
|
||||
}
|
||||
};
|
||||
|
||||
device_t tgui9440_device =
|
||||
device_t tgui9440_vlb_device =
|
||||
{
|
||||
"Trident TGUI 9440",
|
||||
0,
|
||||
"Trident TGUI 9440 VLB",
|
||||
DEVICE_VLB,
|
||||
0,
|
||||
tgui9440_init,
|
||||
tgui_close,
|
||||
NULL,
|
||||
tgui9440_available,
|
||||
tgui_speed_changed,
|
||||
tgui_force_redraw,
|
||||
tgui_add_status_info,
|
||||
tgui9440_config
|
||||
};
|
||||
|
||||
device_t tgui9440_pci_device =
|
||||
{
|
||||
"Trident TGUI 9440 PCI",
|
||||
DEVICE_PCI,
|
||||
0,
|
||||
tgui9440_init,
|
||||
tgui_close,
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/* Copyright holders: Sarah Walker
|
||||
see COPYING for more details
|
||||
*/
|
||||
extern device_t tgui9440_device;
|
||||
extern device_t tgui9440_vlb_device;
|
||||
extern device_t tgui9440_pci_device;
|
||||
|
||||
@@ -367,7 +367,7 @@ static device_config_t tvga_config[] =
|
||||
device_t tvga8900d_device =
|
||||
{
|
||||
"Trident TVGA 8900D",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
tvga8900d_init,
|
||||
tvga_close,
|
||||
|
||||
@@ -192,7 +192,7 @@ void vga_add_status_info(char *s, int max_len, void *p)
|
||||
device_t vga_device =
|
||||
{
|
||||
"VGA",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
vga_init,
|
||||
vga_close,
|
||||
@@ -206,7 +206,7 @@ device_t vga_device =
|
||||
device_t trigem_unk_device =
|
||||
{
|
||||
"VGA",
|
||||
0,
|
||||
DEVICE_ISA,
|
||||
0,
|
||||
trigem_unk_init,
|
||||
vga_close,
|
||||
|
||||
@@ -987,7 +987,7 @@ void wy700_speed_changed(void *p)
|
||||
device_t wy700_device =
|
||||
{
|
||||
"Wyse 700",
|
||||
0, 0,
|
||||
DEVICE_ISA, 0,
|
||||
wy700_init,
|
||||
wy700_close,
|
||||
NULL,
|
||||
|
||||
@@ -80,49 +80,62 @@ typedef struct
|
||||
|
||||
static VIDEO_CARD video_cards[] =
|
||||
{
|
||||
{"ATI Graphics Pro Turbo (Mach64 GX)", "mach64x", &mach64gx_device, GFX_MACH64GX},
|
||||
{"ATI Video Xpression (Mach64 VT2)", "mach64vt2", &mach64vt2_device, GFX_MACH64VT2},
|
||||
{"ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device, GFX_VGACHARGER},
|
||||
{"ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device, GFX_VGAWONDERXL24},
|
||||
{"ATI VGA Edge-16 (ATI-18800)", "ati18800", &ati18800_device, GFX_VGAEDGE16},
|
||||
{"CGA", "cga", &cga_device, GFX_CGA},
|
||||
{"Diamond Stealth 32 (Tseng ET4000/w32p)", "stealth32", &et4000w32p_device, GFX_ET4000W32},
|
||||
{"Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d", &s3_diamond_stealth64_device,GFX_STEALTH64},
|
||||
{"Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000", &s3_virge_device, GFX_VIRGE},
|
||||
{"Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000", &s3_virge_988_device, GFX_VIRGEVX},
|
||||
{"EGA", "ega", &ega_device, GFX_EGA},
|
||||
{"Chips & Technologies SuperEGA", "superega", &sega_device, GFX_SUPER_EGA},
|
||||
{"Compaq ATI VGA Wonder XL (ATI-28800-5)", "compaq_ati28800", &compaq_ati28800_device, GFX_VGAWONDERXL},
|
||||
{"Compaq EGA", "compaq_ega", &cpqega_device, GFX_COMPAQ_EGA},
|
||||
{"Hercules", "hercules", &hercules_device, GFX_HERCULES},
|
||||
{"Hercules Plus", "hercules_plus", &herculesplus_device, GFX_HERCULESPLUS},
|
||||
{"Hercules InColor", "incolor", &incolor_device, GFX_INCOLOR},
|
||||
{"MDA", "mda", &mda_device, GFX_MDA},
|
||||
{"MDSI Genius", "genius", &genius_device, GFX_GENIUS},
|
||||
{"Number Nine 9FX (S3 Trio64)", "n9_9fx", &s3_9fx_device, GFX_N9_9FX},
|
||||
{"[ISA] ATI VGA Charger (ATI-28800-5)", "ati28800", &ati28800_device, GFX_VGACHARGER},
|
||||
{"[ISA] ATI VGA Wonder XL24 (ATI-28800-6)", "ati28800w", &ati28800_wonderxl24_device, GFX_VGAWONDERXL24},
|
||||
{"[ISA] ATI VGA Edge-16 (ATI-18800)", "ati18800", &ati18800_device, GFX_VGAEDGE16},
|
||||
{"[ISA] CGA", "cga", &cga_device, GFX_CGA},
|
||||
{"[ISA] Chips & Technologies SuperEGA", "superega", &sega_device, GFX_SUPER_EGA},
|
||||
{"[ISA] Compaq ATI VGA Wonder XL (ATI-28800-5)","compaq_ati28800", &compaq_ati28800_device, GFX_VGAWONDERXL},
|
||||
{"[ISA] Compaq EGA", "compaq_ega", &cpqega_device, GFX_COMPAQ_EGA},
|
||||
{"[ISA] EGA", "ega", &ega_device, GFX_EGA},
|
||||
{"[ISA] Hercules", "hercules", &hercules_device, GFX_HERCULES},
|
||||
{"[ISA] Hercules Plus", "hercules_plus", &herculesplus_device, GFX_HERCULESPLUS},
|
||||
{"[ISA] Hercules InColor", "incolor", &incolor_device, GFX_INCOLOR},
|
||||
{"[ISA] MDA", "mda", &mda_device, GFX_MDA},
|
||||
{"[ISA] MDSI Genius", "genius", &genius_device, GFX_GENIUS},
|
||||
{"[ISA] OAK OTI-067", "oti067", &oti067_device, GFX_OTI067},
|
||||
{"[ISA] OAK OTI-077", "oti077", &oti077_device, GFX_OTI077},
|
||||
{"[ISA] Paradise WD90C11", "wd90c11", ¶dise_wd90c11_device, GFX_WD90C11},
|
||||
{"[ISA] Plantronics ColorPlus", "plantronics", &colorplus_device, GFX_COLORPLUS},
|
||||
{"[ISA] Trident TVGA8900D", "tvga8900d", &tvga8900d_device, GFX_TVGA},
|
||||
{"[ISA] Tseng ET4000AX", "et4000ax", &et4000_device, GFX_ET4000},
|
||||
{"[ISA] VGA", "vga", &vga_device, GFX_VGA},
|
||||
{"[ISA] Wyse 700", "wy700", &wy700_device, GFX_WY700},
|
||||
{"[VLB] ATI Graphics Pro Turbo (Mach64 GX)", "mach64x_vlb", &mach64gx_vlb_device, GFX_MACH64GX_VLB},
|
||||
{"[VLB] Diamond Stealth 32 (Tseng ET4000/w32p)","stealth32_vlb", &et4000w32p_vlb_device, GFX_ET4000W32_VLB},
|
||||
{"[VLB] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_vlb", &s3_virge_vlb_device, GFX_VIRGE_VLB},
|
||||
{"[VLB] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_vlb", &s3_virge_988_vlb_device, GFX_VIRGEVX_VLB},
|
||||
{"[VLB] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_vlb", &s3_diamond_stealth64_vlb_device, GFX_STEALTH64_VLB},
|
||||
{"[VLB] Number Nine 9FX (S3 Trio64)", "n9_9fx_vlb", &s3_9fx_vlb_device, GFX_N9_9FX_VLB},
|
||||
{"[VLB] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_vlb", &s3_bahamas64_vlb_device, GFX_BAHAMAS64_VLB},
|
||||
{"[VLB] Phoenix S3 Vision864", "px_vision864_vlb", &s3_phoenix_vision864_vlb_device, GFX_PHOENIX_VISION864_VLB},
|
||||
{"[VLB] Phoenix S3 Trio32", "px_trio32_vlb", &s3_phoenix_trio32_vlb_device, GFX_PHOENIX_TRIO32_VLB},
|
||||
{"[VLB] Phoenix S3 Trio64", "px_trio64_vlb", &s3_phoenix_trio64_vlb_device, GFX_PHOENIX_TRIO64_VLB},
|
||||
{"[VLB] S3 ViRGE/DX", "virge375_vlb", &s3_virge_375_vlb_device, GFX_VIRGEDX_VLB},
|
||||
{"[VLB] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_vlb", &s3_virge_375_4_vlb_device, GFX_VIRGEDX4_VLB},
|
||||
{"[VLB] Trident TGUI9440", "tgui9440_vlb", &tgui9440_vlb_device, GFX_TGUI9440_VLB},
|
||||
{"[PCI] ATI Graphics Pro Turbo (Mach64 GX)", "mach64x_pci", &mach64gx_pci_device, GFX_MACH64GX_PCI},
|
||||
{"[PCI] ATI Video Xpression (Mach64 VT2)", "mach64vt2", &mach64vt2_device, GFX_MACH64VT2},
|
||||
{"[PCI] Diamond Stealth 32 (Tseng ET4000/w32p)","stealth32_pci", &et4000w32p_pci_device, GFX_ET4000W32_PCI},
|
||||
{"[PCI] Diamond Stealth 3D 2000 (S3 ViRGE)", "stealth3d_2000_pci", &s3_virge_pci_device, GFX_VIRGE_PCI},
|
||||
{"[PCI] Diamond Stealth 3D 3000 (S3 ViRGE/VX)", "stealth3d_3000_pci", &s3_virge_988_pci_device, GFX_VIRGEVX_PCI},
|
||||
{"[PCI] Diamond Stealth 64 DRAM (S3 Trio64)", "stealth64d_pci", &s3_diamond_stealth64_pci_device, GFX_STEALTH64_PCI},
|
||||
#ifdef DEV_BRANCH
|
||||
#ifdef USE_RIVA
|
||||
{"nVidia RIVA 128", "riva128", &riva128_device, GFX_RIVA128},
|
||||
{"nVidia RIVA TNT", "rivatnt", &rivatnt_device, GFX_RIVATNT},
|
||||
{"nVidia RIVA TNT2", "rivatnt2", &rivatnt2_device, GFX_RIVATNT2},
|
||||
{"[PCI] nVidia RIVA 128", "riva128", &riva128_device, GFX_RIVA128},
|
||||
{"[PCI] nVidia RIVA TNT", "rivatnt", &rivatnt_device, GFX_RIVATNT},
|
||||
{"[PCI] nVidia RIVA TNT2", "rivatnt2", &rivatnt2_device, GFX_RIVATNT2},
|
||||
#endif
|
||||
#endif
|
||||
{"OAK OTI-067", "oti067", &oti067_device, GFX_OTI067},
|
||||
{"OAK OTI-077", "oti077", &oti077_device, GFX_OTI077},
|
||||
{"Paradise Bahamas 64 (S3 Vision864)", "bahamas64", &s3_bahamas64_device, GFX_BAHAMAS64},
|
||||
{"Paradise WD90C11", "wd90c11", ¶dise_wd90c11_device, GFX_WD90C11},
|
||||
{"Phoenix S3 Vision864", "px_vision864", &s3_phoenix_vision864_device,GFX_PHOENIX_VISION864},
|
||||
{"Phoenix S3 Trio32", "px_trio32", &s3_phoenix_trio32_device, GFX_PHOENIX_TRIO32},
|
||||
{"Phoenix S3 Trio64", "px_trio64", &s3_phoenix_trio64_device, GFX_PHOENIX_TRIO64},
|
||||
{"Plantronics ColorPlus", "plantronics", &colorplus_device, GFX_COLORPLUS},
|
||||
{"S3 ViRGE/DX", "virge375", &s3_virge_375_device, GFX_VIRGEDX},
|
||||
{"S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20", &s3_virge_375_4_device, GFX_VIRGEDX4},
|
||||
{"Trident TGUI9440", "tgui9440", &tgui9440_device, GFX_TGUI9440},
|
||||
{"Trident TVGA8900D", "tvga8900d", &tvga8900d_device, GFX_TVGA},
|
||||
{"Tseng ET4000AX", "et4000ax", &et4000_device, GFX_ET4000},
|
||||
{"VGA", "vga", &vga_device, GFX_VGA},
|
||||
{"Wyse 700", "wy700", &wy700_device, GFX_WY700},
|
||||
{"", "", NULL, 0}
|
||||
{"[PCI] Number Nine 9FX (S3 Trio64)", "n9_9fx_pci", &s3_9fx_pci_device, GFX_N9_9FX_PCI},
|
||||
{"[PCI] Paradise Bahamas 64 (S3 Vision864)", "bahamas64_pci", &s3_bahamas64_pci_device, GFX_BAHAMAS64_PCI},
|
||||
{"[PCI] Phoenix S3 Vision864", "px_vision864_pci", &s3_phoenix_vision864_pci_device, GFX_PHOENIX_VISION864_PCI},
|
||||
{"[PCI] Phoenix S3 Trio32", "px_trio32_pci", &s3_phoenix_trio32_pci_device, GFX_PHOENIX_TRIO32_PCI},
|
||||
{"[PCI] Phoenix S3 Trio64", "px_trio64_pci", &s3_phoenix_trio64_pci_device, GFX_PHOENIX_TRIO64_PCI},
|
||||
{"[PCI] S3 ViRGE/DX", "virge375_pci", &s3_virge_375_pci_device, GFX_VIRGEDX_PCI},
|
||||
{"[PCI] S3 ViRGE/DX (VBE 2.0)", "virge375_vbe20_pci", &s3_virge_375_4_pci_device, GFX_VIRGEDX4_PCI},
|
||||
{"[PCI] Trident TGUI9440", "tgui9440_pci", &tgui9440_pci_device, GFX_TGUI9440_PCI},
|
||||
{"", "", NULL, 0}
|
||||
};
|
||||
|
||||
int video_card_available(int card)
|
||||
|
||||
Reference in New Issue
Block a user