diff --git a/src/scsi/scsi.c b/src/scsi/scsi.c index b898f9de8..7edfa1844 100644 --- a/src/scsi/scsi.c +++ b/src/scsi/scsi.c @@ -52,12 +52,17 @@ static uint8_t next_scsi_bus = 0; static const device_t scsi_none_device = { - "None", - "none", - 0, 0, - NULL, NULL, NULL, - { NULL }, NULL, NULL, - NULL + .name = "None", + .internal_name = "none", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; @@ -67,39 +72,41 @@ typedef const struct { static SCSI_CARD scsi_cards[] = { - { &scsi_none_device, }, - { &aha154xa_device, }, - { &aha154xb_device, }, - { &aha154xc_device, }, - { &aha154xcf_device, }, - { &aha154xcp_device, }, - { &buslogic_542b_device, }, - { &buslogic_542bh_device, }, - { &buslogic_545s_device, }, - { &buslogic_545c_device, }, - { &scsi_ls2000_device, }, - { &scsi_lcs6821n_device, }, - { &scsi_rt1000b_device, }, - { &scsi_t128_device, }, - { &scsi_t130b_device, }, +// clang-format off + { &scsi_none_device, }, + { &aha154xa_device, }, + { &aha154xb_device, }, + { &aha154xc_device, }, + { &aha154xcf_device, }, + { &aha154xcp_device, }, + { &buslogic_542b_device, }, + { &buslogic_542bh_device, }, + { &buslogic_545s_device, }, + { &buslogic_545c_device, }, + { &scsi_ls2000_device, }, + { &scsi_lcs6821n_device, }, + { &scsi_rt1000b_device, }, + { &scsi_t128_device, }, + { &scsi_t130b_device, }, #ifdef WALTJE - { &scsi_wd33c93_device, }, + { &scsi_wd33c93_device, }, #endif - { &aha1640_device, }, - { &buslogic_640a_device, }, - { &ncr53c90_mca_device, }, - { &spock_device, }, - { &buslogic_958d_pci_device, }, - { &ncr53c810_pci_device, }, - { &ncr53c815_pci_device, }, - { &ncr53c820_pci_device, }, - { &ncr53c825a_pci_device, }, - { &ncr53c860_pci_device, }, - { &ncr53c875_pci_device, }, - { &dc390_pci_device, }, - { &buslogic_445s_device, }, - { &buslogic_445c_device, }, - { NULL, }, + { &aha1640_device, }, + { &buslogic_640a_device, }, + { &ncr53c90_mca_device, }, + { &spock_device, }, + { &buslogic_958d_pci_device, }, + { &ncr53c810_pci_device, }, + { &ncr53c815_pci_device, }, + { &ncr53c820_pci_device, }, + { &ncr53c825a_pci_device, }, + { &ncr53c860_pci_device, }, + { &ncr53c875_pci_device, }, + { &dc390_pci_device, }, + { &buslogic_445s_device, }, + { &buslogic_445c_device, }, + { NULL, }, +// clang-format on }; diff --git a/src/scsi/scsi_aha154x.c b/src/scsi/scsi_aha154x.c index e47d61497..9fac11764 100644 --- a/src/scsi/scsi_aha154x.c +++ b/src/scsi/scsi_aha154x.c @@ -1320,61 +1320,85 @@ static const device_config_t aha_154xcf_config[] = { // clang-format on const device_t aha154xa_device = { - "Adaptec AHA-154xA", - "aha154xa", - DEVICE_ISA | DEVICE_AT, - AHA_154xA, - aha_init, x54x_close, NULL, - { NULL }, NULL, NULL, - aha_154xb_config + .name = "Adaptec AHA-154xA", + .internal_name = "aha154xa", + .flags = DEVICE_ISA | DEVICE_AT, + .local = AHA_154xA, + .init = aha_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = aha_154xb_config }; const device_t aha154xb_device = { - "Adaptec AHA-154xB", - "aha154xb", - DEVICE_ISA | DEVICE_AT, - AHA_154xB, - aha_init, x54x_close, NULL, - { NULL }, NULL, NULL, - aha_154xb_config + .name = "Adaptec AHA-154xB", + .internal_name = "aha154xb", + .flags = DEVICE_ISA | DEVICE_AT, + .local = AHA_154xB, + .init = aha_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = aha_154xb_config }; const device_t aha154xc_device = { - "Adaptec AHA-154xC", - "aha154xc", - DEVICE_ISA | DEVICE_AT, - AHA_154xC, - aha_init, x54x_close, NULL, - { NULL }, NULL, NULL, - aha_154x_config + .name = "Adaptec AHA-154xC", + .internal_name = "aha154xc", + .flags = DEVICE_ISA | DEVICE_AT, + .local = AHA_154xC, + .init = aha_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = aha_154x_config }; const device_t aha154xcf_device = { - "Adaptec AHA-154xCF", - "aha154xcf", - DEVICE_ISA | DEVICE_AT, - AHA_154xCF, - aha_init, x54x_close, NULL, - { NULL }, NULL, NULL, - aha_154xcf_config + .name = "Adaptec AHA-154xCF", + .internal_name = "aha154xcf", + .flags = DEVICE_ISA | DEVICE_AT, + .local = AHA_154xCF, + .init = aha_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = aha_154xcf_config }; const device_t aha154xcp_device = { - "Adaptec AHA-154xCP", - "aha154xcp", - DEVICE_ISA | DEVICE_AT, - AHA_154xCP, - aha_init, aha1542cp_close, NULL, - { NULL }, NULL, NULL, - NULL + .name = "Adaptec AHA-154xCP", + .internal_name = "aha154xcp", + .flags = DEVICE_ISA | DEVICE_AT, + .local = AHA_154xCP, + .init = aha_init, + .close = aha1542cp_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t aha1640_device = { - "Adaptec AHA-1640", - "aha1640", - DEVICE_MCA, - AHA_1640, - aha_init, x54x_close, NULL, - { NULL }, NULL, NULL, - NULL + .name = "Adaptec AHA-1640", + .internal_name = "aha1640", + .flags = DEVICE_MCA, + .local = AHA_1640, + .init = aha_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/scsi/scsi_buslogic.c b/src/scsi/scsi_buslogic.c index 84144383b..79a019821 100644 --- a/src/scsi/scsi_buslogic.c +++ b/src/scsi/scsi_buslogic.c @@ -1857,81 +1857,113 @@ static const device_config_t BT958D_Config[] = { // clang-format on const device_t buslogic_542b_device = { - "BusLogic BT-542B ISA", - "bt542b", - DEVICE_ISA | DEVICE_AT, - CHIP_BUSLOGIC_ISA_542B_1991_12_14, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT_ISA_Config + .name = "BusLogic BT-542B ISA", + .internal_name = "bt542b", + .flags = DEVICE_ISA | DEVICE_AT, + .local = CHIP_BUSLOGIC_ISA_542B_1991_12_14, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT_ISA_Config }; const device_t buslogic_545s_device = { - "BusLogic BT-545S ISA", - "bt545s", - DEVICE_ISA | DEVICE_AT, - CHIP_BUSLOGIC_ISA_545S_1992_10_05, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT_ISA_Config + .name = "BusLogic BT-545S ISA", + .internal_name = "bt545s", + .flags = DEVICE_ISA | DEVICE_AT, + .local = CHIP_BUSLOGIC_ISA_545S_1992_10_05, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT_ISA_Config }; const device_t buslogic_542bh_device = { - "BusLogic BT-542BH ISA", - "bt542bh", - DEVICE_ISA | DEVICE_AT, - CHIP_BUSLOGIC_ISA_542BH_1993_05_23, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT_ISA_Config + .name = "BusLogic BT-542BH ISA", + .internal_name = "bt542bh", + .flags = DEVICE_ISA | DEVICE_AT, + .local = CHIP_BUSLOGIC_ISA_542BH_1993_05_23, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT_ISA_Config }; const device_t buslogic_545c_device = { - "BusLogic BT-545C ISA", - "bt545c", - DEVICE_ISA | DEVICE_AT, - CHIP_BUSLOGIC_ISA_545C_1994_12_01, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT_ISA_Config + .name = "BusLogic BT-545C ISA", + .internal_name = "bt545c", + .flags = DEVICE_ISA | DEVICE_AT, + .local = CHIP_BUSLOGIC_ISA_545C_1994_12_01, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT_ISA_Config }; const device_t buslogic_640a_device = { - "BusLogic BT-640A MCA", - "bt640a", - DEVICE_MCA, - CHIP_BUSLOGIC_MCA_640A_1993_05_23, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - NULL + .name = "BusLogic BT-640A MCA", + .internal_name = "bt640a", + .flags = DEVICE_MCA, + .local = CHIP_BUSLOGIC_MCA_640A_1993_05_23, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t buslogic_445s_device = { - "BusLogic BT-445S VLB", - "bt445s", - DEVICE_VLB, - CHIP_BUSLOGIC_VLB_445S_1993_11_16, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT_ISA_Config + .name = "BusLogic BT-445S VLB", + .internal_name = "bt445s", + .flags = DEVICE_VLB, + .local = CHIP_BUSLOGIC_VLB_445S_1993_11_16, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT_ISA_Config }; const device_t buslogic_445c_device = { - "BusLogic BT-445C VLB", - "bt445c", - DEVICE_VLB, - CHIP_BUSLOGIC_VLB_445C_1994_12_01, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT_ISA_Config + .name = "BusLogic BT-445C VLB", + .internal_name = "bt445c", + .flags = DEVICE_VLB, + .local = CHIP_BUSLOGIC_VLB_445C_1994_12_01, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT_ISA_Config }; const device_t buslogic_958d_pci_device = { - "BusLogic BT-958D PCI", - "bt958d", - DEVICE_PCI, - CHIP_BUSLOGIC_PCI_958D_1995_12_30, - buslogic_init, x54x_close, NULL, - { NULL }, NULL, NULL, - BT958D_Config + .name = "BusLogic BT-958D PCI", + .internal_name = "bt958d", + .flags = DEVICE_PCI, + .local = CHIP_BUSLOGIC_PCI_958D_1995_12_30, + .init = buslogic_init, + .close = x54x_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = BT958D_Config }; diff --git a/src/scsi/scsi_ncr5380.c b/src/scsi/scsi_ncr5380.c index 083efabe4..1fa91f8c7 100644 --- a/src/scsi/scsi_ncr5380.c +++ b/src/scsi/scsi_ncr5380.c @@ -1707,62 +1707,72 @@ static const device_config_t t128_config[] = { }; // clang-format on -const device_t scsi_lcs6821n_device = -{ - "Longshine LCS-6821N", - "lcs6821n", - DEVICE_ISA, - 0, - ncr_init, ncr_close, NULL, - { lcs6821n_available }, - NULL, NULL, - ncr5380_mmio_config +const device_t scsi_lcs6821n_device = { + .name = "Longshine LCS-6821N", + .internal_name = "lcs6821n", + .flags = DEVICE_ISA, + .local = 0, + .init = ncr_init, + .close = ncr_close, + .reset = NULL, + { .available = lcs6821n_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ncr5380_mmio_config }; -const device_t scsi_rt1000b_device = -{ - "Rancho RT1000B", - "rt1000b", - DEVICE_ISA, - 1, - ncr_init, ncr_close, NULL, - { rt1000b_available }, - NULL, NULL, - rancho_config +const device_t scsi_rt1000b_device = { + .name = "Rancho RT1000B", + .internal_name = "rt1000b", + .flags = DEVICE_ISA, + .local = 1, + .init = ncr_init, + .close = ncr_close, + .reset = NULL, + { .available = rt1000b_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = rancho_config }; -const device_t scsi_t130b_device = -{ - "Trantor T130B", - "t130b", - DEVICE_ISA, - 2, - ncr_init, ncr_close, NULL, - { t130b_available }, - NULL, NULL, - t130b_config +const device_t scsi_t130b_device = { + .name = "Trantor T130B", + .internal_name = "t130b", + .flags = DEVICE_ISA, + .local = 2, + .init = ncr_init, + .close = ncr_close, + .reset = NULL, + { .available = t130b_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = t130b_config }; -const device_t scsi_t128_device = -{ - "Trantor T128", - "t128", - DEVICE_ISA, - 3, - ncr_init, ncr_close, NULL, - { t128_available }, - NULL, NULL, - t128_config +const device_t scsi_t128_device = { + .name = "Trantor T128", + .internal_name = "t128", + .flags = DEVICE_ISA, + .local = 3, + .init = ncr_init, + .close = ncr_close, + .reset = NULL, + { .available = t128_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = t128_config }; -const device_t scsi_ls2000_device = -{ - "Corel LS2000", - "ls2000", - DEVICE_ISA, - 4, - ncr_init, ncr_close, NULL, - { corel_ls2000_available }, - NULL, NULL, - ncr5380_mmio_config +const device_t scsi_ls2000_device = { + .name = "Corel LS2000", + .internal_name = "ls2000", + .flags = DEVICE_ISA, + .local = 4, + .init = ncr_init, + .close = ncr_close, + .reset = NULL, + { .available = corel_ls2000_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ncr5380_mmio_config }; diff --git a/src/scsi/scsi_ncr53c8xx.c b/src/scsi/scsi_ncr53c8xx.c index 12439e4ee..f438a342c 100644 --- a/src/scsi/scsi_ncr53c8xx.c +++ b/src/scsi/scsi_ncr53c8xx.c @@ -2648,80 +2648,100 @@ static const device_config_t ncr53c8xx_pci_config[] = { // clang-format on }; - -const device_t ncr53c810_pci_device = -{ - "NCR 53c810", - "ncr53c810", - DEVICE_PCI, - CHIP_810, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, - NULL +const device_t ncr53c810_pci_device = { + .name = "NCR 53c810", + .internal_name = "ncr53c810", + .flags = DEVICE_PCI, + .local = CHIP_810, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; -const device_t ncr53c810_onboard_pci_device = -{ - "NCR 53c810 On-Board", - "ncr53c810_onboard", - DEVICE_PCI, - 0x8001, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, - NULL +const device_t ncr53c810_onboard_pci_device = { + .name = "NCR 53c810 On-Board", + .internal_name = "ncr53c810_onboard", + .flags = DEVICE_PCI, + .local = 0x8001, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; -const device_t ncr53c815_pci_device = -{ - "NCR 53c815", - "ncr53c815", - DEVICE_PCI, - CHIP_815, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, +const device_t ncr53c815_pci_device = { + .name = "NCR 53c815", + .internal_name = "ncr53c815", + .flags = DEVICE_PCI, + .local = CHIP_815, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, ncr53c8xx_pci_config }; -const device_t ncr53c820_pci_device = -{ - "NCR 53c820", - "ncr53c820", - DEVICE_PCI, - CHIP_820, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, - NULL +const device_t ncr53c820_pci_device = { + .name = "NCR 53c820", + .internal_name = "ncr53c820", + .flags = DEVICE_PCI, + .local = CHIP_820, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; -const device_t ncr53c825a_pci_device = -{ - "NCR 53c825A", - "ncr53c825a", - DEVICE_PCI, - CHIP_825, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, - ncr53c8xx_pci_config +const device_t ncr53c825a_pci_device = { + .name = "NCR 53c825A", + .internal_name = "ncr53c825a", + .flags = DEVICE_PCI, + .local = CHIP_825, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ncr53c8xx_pci_config }; -const device_t ncr53c860_pci_device = -{ - "NCR 53c860", - "ncr53c860", - DEVICE_PCI, - CHIP_860, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, - ncr53c8xx_pci_config +const device_t ncr53c860_pci_device = { + .name = "NCR 53c860", + .internal_name = "ncr53c860", + .flags = DEVICE_PCI, + .local = CHIP_860, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ncr53c8xx_pci_config }; -const device_t ncr53c875_pci_device = -{ - "NCR 53c875", - "ncr53c875", - DEVICE_PCI, - CHIP_875, - ncr53c8xx_init, ncr53c8xx_close, NULL, - { NULL }, NULL, NULL, - ncr53c8xx_pci_config +const device_t ncr53c875_pci_device = { + .name = "NCR 53c875", + .internal_name = "ncr53c875", + .flags = DEVICE_PCI, + .local = CHIP_875, + .init = ncr53c8xx_init, + .close = ncr53c8xx_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ncr53c8xx_pci_config }; diff --git a/src/scsi/scsi_pcscsi.c b/src/scsi/scsi_pcscsi.c index aff95074e..74011b21b 100644 --- a/src/scsi/scsi_pcscsi.c +++ b/src/scsi/scsi_pcscsi.c @@ -2010,24 +2010,30 @@ static const device_config_t bios_enable_config[] = { // clang-format on }; -const device_t dc390_pci_device = -{ - "Tekram DC-390 PCI", - "dc390", - DEVICE_PCI, - 0, - dc390_init, esp_close, NULL, - { NULL }, NULL, NULL, - bios_enable_config +const device_t dc390_pci_device = { + .name = "Tekram DC-390 PCI", + .internal_name = "dc390", + .flags = DEVICE_PCI, + .local = 0, + .init = dc390_init, + .close = esp_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = bios_enable_config }; -const device_t ncr53c90_mca_device = -{ - "NCR 53c90 MCA", - "ncr53c90", - DEVICE_MCA, - 0, - ncr53c90_mca_init, esp_close, NULL, - { NULL }, NULL, NULL, - NULL +const device_t ncr53c90_mca_device = { + .name = "NCR 53c90 MCA", + .internal_name = "ncr53c90", + .flags = DEVICE_MCA, + .local = 0, + .init = ncr53c90_mca_init, + .close = esp_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/scsi/scsi_spock.c b/src/scsi/scsi_spock.c index 32ce2a812..f00782983 100644 --- a/src/scsi/scsi_spock.c +++ b/src/scsi/scsi_spock.c @@ -1170,14 +1170,16 @@ static const device_config_t spock_rom_config[] = { // clang-format on }; -const device_t spock_device = -{ - "IBM PS/2 SCSI Adapter (Spock)", - "spock", - DEVICE_MCA, - 0, - spock_init, spock_close, NULL, - { spock_available }, - NULL, NULL, - spock_rom_config +const device_t spock_device = { + .name = "IBM PS/2 SCSI Adapter (Spock)", + .internal_name = "spock", + .flags = DEVICE_MCA, + .local = 0, + .init = spock_init, + .close = spock_close, + .reset = NULL, + { .available = spock_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = spock_rom_config };