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:
OBattler
2017-10-10 00:14:15 +02:00
parent efc129eb22
commit 253ad40376
55 changed files with 852 additions and 427 deletions

View File

@@ -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",