diff --git a/src/device.h b/src/device.h index 58f143133..3c91dceef 100644 --- a/src/device.h +++ b/src/device.h @@ -39,7 +39,9 @@ enum { DEVICE_AT = 2, /* requires an AT-compatible system */ DEVICE_PS2 = 4, /* requires a PS/1 or PS/2 system */ DEVICE_MCA = 0x20, /* requires the MCA bus */ - DEVICE_PCI = 0x40 /* requires the PCI bus */ + DEVICE_VLB = 0x40, /* requires the PCI bus */ + DEVICE_PCI = 0x80, /* requires the VLB bus */ + DEVICE_AGP = 0x100 /* requires the AGP bus */ }; diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index de6e575d5..5485262db 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -1919,17 +1919,15 @@ nic_init(device_t *info) if (dev->is_pci) { dev->base_address = 0x340; dev->base_irq = 10; + dev->bios_addr = 0xD0000; + dev->has_bios = device_get_config_int("bios"); } else { dev->base_address = device_get_config_hex16("base"); dev->base_irq = device_get_config_int("irq"); + dev->bios_addr = device_get_config_hex20("bios_addr"); + dev->has_bios = !!dev->bios_addr; } - dev->bios_addr = device_get_config_hex20("bios_addr"); - if (dev->bios_addr) - dev->has_bios = 1; - else - dev->has_bios = 0; - /* See if we have a local MAC address configured. */ mac = device_get_config_mac("mac", -1); @@ -2219,31 +2217,8 @@ static device_config_t ne2000_config[] = static device_config_t rtl8029as_config[] = { - /* - * WTF. - * Even though it is PCI, the user should still have control - * over whether or not it's Option ROM BIOS will be enabled - * or not. - */ { - "bios_addr", "BIOS address", CONFIG_HEX20, "", 0, - { - { - "Disabled", 0x00000 - }, - { - "D000", 0xD0000 - }, - { - "D800", 0xD8000 - }, - { - "C800", 0xC8000 - }, - { - "" - } - }, + "bios", "Enable BIOS", CONFIG_BINARY, "", 0 }, { "mac", "MAC Address", CONFIG_MAC, "", -1 @@ -2275,7 +2250,7 @@ device_t ne2000_device = { device_t rtl8029as_device = { "Realtek RTL8029AS", - 0, + DEVICE_PCI, NE2K_RTL8029AS, nic_init, nic_close, NULL, NULL, NULL, NULL, NULL, diff --git a/src/scsi/scsi_buslogic.c b/src/scsi/scsi_buslogic.c index 2c9724636..84e3df90c 100644 --- a/src/scsi/scsi_buslogic.c +++ b/src/scsi/scsi_buslogic.c @@ -2881,11 +2881,6 @@ Buslogic_Init(device_t *info) memset(bl, 0x00, sizeof(Buslogic_t)); bl->chip = info->local; - if ((bl->chip == CHIP_BUSLOGIC_PCI) && !PCI) - { - /* This is just wrong. Simply disallow PCI cards in non-PCI systems! */ - bl->chip = CHIP_BUSLOGIC_ISA; - } bl->Base = device_get_config_hex16("base"); bl->PCIBase = 0; bl->MMIOBase = 0; @@ -3042,13 +3037,10 @@ BuslogicClose(void *p) } -static device_config_t BuslogicConfig[] = { +static device_config_t BT545C_Config[] = { { "base", "Address", CONFIG_HEX16, "", 0x334, { - { - "None", 0 - }, { "0x330", 0x330 }, @@ -3124,6 +3116,45 @@ static device_config_t BuslogicConfig[] = { }; +static device_config_t BT958D_Config[] = { + { + "base", "Legacy Address", CONFIG_HEX16, "", 0x334, + { + { + "None", 0 + }, + { + "0x330", 0x330 + }, + { + "0x334", 0x334 + }, + { + "0x230", 0x230 + }, + { + "0x234", 0x234 + }, + { + "0x130", 0x130 + }, + { + "0x134", 0x134 + }, + { + "" + } + }, + }, + { + "bios", "Enable BIOS", CONFIG_BINARY, "", 0 + }, + { + "", "", -1 + } +}; + + device_t buslogic_device = { "Buslogic BT-545C ISA", 0, @@ -3135,12 +3166,12 @@ device_t buslogic_device = { NULL, NULL, NULL, - BuslogicConfig + BT545C_Config }; device_t buslogic_pci_device = { "Buslogic BT-958D PCI", - 0, + DEVICE_PCI, CHIP_BUSLOGIC_PCI, Buslogic_Init, BuslogicClose, @@ -3149,5 +3180,5 @@ device_t buslogic_pci_device = { NULL, NULL, NULL, - BuslogicConfig + BT958D_Config }; diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 936543046..3028d9a49 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -1057,7 +1057,7 @@ static BOOL CALLBACK win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wPa { sound_dev = sound_card_getdevice(c); - if (!sound_dev || (sound_dev->flags & DEVICE_MCA) == (machines[temp_machine].flags & MACHINE_MCA)) + if (!sound_dev || (sound_dev->flags & DEVICE_MCA) == (machines[temp_machine].flags & MACHINE_MCA) || (sound_dev->flags & DEVICE_PCI) == (machines[temp_machine].flags & MACHINE_PCI)) { if (c == 0) { @@ -1409,6 +1409,16 @@ static void recalc_hdc_list(HWND hdlg, int machine, int use_selected_hdc) c++; continue; } + if ((hdc_get_flags(c) & DEVICE_VLB) && !(machines[machine].flags & MACHINE_VLB)) + { + c++; + continue; + } + if ((hdc_get_flags(c) & DEVICE_PCI) && !(machines[machine].flags & MACHINE_PCI)) + { + c++; + continue; + } if (!hdc_available(c)) { c++; @@ -1488,7 +1498,9 @@ static BOOL CALLBACK win_settings_peripherals_proc(HWND hdlg, UINT message, WPAR { scsi_dev = scsi_card_getdevice(c); - if (!scsi_dev || (scsi_dev->flags & DEVICE_MCA) == (machines[temp_machine].flags & MACHINE_MCA)) + if (!scsi_dev || ((scsi_dev->flags & DEVICE_MCA) == (machines[temp_machine].flags & MACHINE_MCA)) || + ((scsi_dev->flags & DEVICE_VLB) == (machines[temp_machine].flags & MACHINE_VLB)) || + ((scsi_dev->flags & DEVICE_PCI) == (machines[temp_machine].flags & MACHINE_PCI))) { if (c == 0) { @@ -1734,7 +1746,8 @@ static BOOL CALLBACK win_settings_network_proc(HWND hdlg, UINT message, WPARAM w settings_network_to_list[c] = d; - if (network_card_available(c)) + if (network_card_available(c) || ((network_card_getdevice(c)->flags & DEVICE_MCA) == (machines[temp_machine].flags & MACHINE_MCA)) || + ((network_card_getdevice(c)->flags & DEVICE_PCI) == (machines[temp_machine].flags & MACHINE_PCI))) { if (c == 0) {