From 369f6774f951521d2265cb8debd4b94b05f48cf2 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 13 Mar 2022 09:37:19 -0400 Subject: [PATCH] src/disk --- src/disk/hdc.c | 45 ++++++---- src/disk/hdc_esdi_at.c | 19 ++-- src/disk/hdc_esdi_mca.c | 16 ++-- src/disk/hdc_ide.c | 174 +++++++++++++++++++++++------------- src/disk/hdc_ide_cmd640.c | 90 +++++++++++-------- src/disk/hdc_ide_cmd646.c | 54 ++++++----- src/disk/hdc_ide_opti611.c | 18 ++-- src/disk/hdc_ide_sff8038i.c | 22 ++--- src/disk/hdc_st506_at.c | 17 ++-- src/disk/hdc_st506_xt.c | 114 +++++++++++++---------- src/disk/hdc_xta.c | 36 +++++--- src/disk/hdc_xtide.c | 90 +++++++++++-------- 12 files changed, 424 insertions(+), 271 deletions(-) diff --git a/src/disk/hdc.c b/src/disk/hdc.c index 10b9ea72a..9fd3a2fab 100644 --- a/src/disk/hdc.c +++ b/src/disk/hdc.c @@ -52,49 +52,60 @@ hdc_log(const char *fmt, ...) #define hdc_log(fmt, ...) #endif - static void * -null_init(const device_t *info) +nullhdc_init(const device_t *info) { return(NULL); } - static void -null_close(void *priv) +nullhdc_close(void *priv) { } - static void * inthdc_init(const device_t *info) { return(NULL); } - static void inthdc_close(void *priv) { } - static const device_t hdc_none_device = { - "None", "none", 0, 0, - null_init, null_close, NULL, - { NULL }, NULL, NULL, NULL -}; -static const device_t hdc_internal_device = { - "Internal", "internal", 0, 0, - inthdc_init, inthdc_close, NULL, - { NULL }, NULL, NULL, NULL + .name = "None", + .internal_name = "none", + .flags = 0, + .local = 0, + .init = nullhdc_init, + .close = nullhdc_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; +static const device_t hdc_internal_device = { + .name = "Internal", + .internal_name = "internal", + .flags = 0, + .local = 0, + .init = inthdc_init, + .close = inthdc_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; static const struct { -// clang-format off const device_t *device; } controllers[] = { +// clang-format off { &hdc_none_device }, { &hdc_internal_device }, { &st506_xt_xebec_device }, @@ -118,7 +129,7 @@ static const struct { { &ide_pci_2ch_device }, { &ide_vlb_device }, { &ide_vlb_2ch_device }, - { NULL } + { NULL } // clang-format on }; diff --git a/src/disk/hdc_esdi_at.c b/src/disk/hdc_esdi_at.c index c68ec5cf3..fb9ef7479 100644 --- a/src/disk/hdc_esdi_at.c +++ b/src/disk/hdc_esdi_at.c @@ -845,12 +845,15 @@ wd1007vse1_available(void) const device_t esdi_at_wd1007vse1_device = { - "Western Digital WD1007V-SE1 (ESDI)", - "esdi_at", - DEVICE_ISA | DEVICE_AT, - 0, - wd1007vse1_init, wd1007vse1_close, NULL, - { wd1007vse1_available }, - NULL, NULL, - NULL + .name = "Western Digital WD1007V-SE1 (ESDI)", + .internal_name = "esdi_at", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 0, + .init = wd1007vse1_init, + .close = wd1007vse1_close, + .reset = NULL, + { .available = wd1007vse1_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_esdi_mca.c b/src/disk/hdc_esdi_mca.c index 6a8de8075..d3c2b9e88 100644 --- a/src/disk/hdc_esdi_mca.c +++ b/src/disk/hdc_esdi_mca.c @@ -1180,9 +1180,15 @@ esdi_available(void) const device_t esdi_ps2_device = { - "IBM PS/2 ESDI Fixed Disk Adapter (MCA)", - "esdi_mca", - DEVICE_MCA, 0, - esdi_init, esdi_close, NULL, - { esdi_available }, NULL, NULL, NULL + .name = "IBM PS/2 ESDI Fixed Disk Adapter (MCA)", + .internal_name = "esdi_mca", + .flags = DEVICE_MCA, + .local = 0, + .init = esdi_init, + .close = esdi_close, + .reset = NULL, + { .available = esdi_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 7350f6d84..d0ca2c84e 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -3064,57 +3064,87 @@ ide_close(void *priv) const device_t ide_isa_device = { - "ISA PC/AT IDE Controller", - "ide_isa", - DEVICE_ISA | DEVICE_AT, - 0, - ide_init, ide_close, ide_reset, - { NULL }, NULL, NULL, NULL + .name = "ISA PC/AT IDE Controller", + .internal_name = "ide_isa", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 0, + .init = ide_init, + .close = ide_close, + .reset = ide_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_isa_2ch_device = { - "ISA PC/AT IDE Controller (Dual-Channel)", - "ide_isa_2ch", - DEVICE_ISA | DEVICE_AT, - 1, - ide_init, ide_close, ide_reset, - { NULL }, NULL, NULL, NULL + .name = "ISA PC/AT IDE Controller (Dual-Channel)", + .internal_name = "ide_isa_2ch", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 1, + .init = ide_init, + .close = ide_close, + .reset = ide_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_vlb_device = { - "VLB IDE Controller", - "ide_vlb", - DEVICE_VLB | DEVICE_AT, - 2, - ide_init, ide_close, ide_reset, - { NULL }, NULL, NULL, NULL + .name = "VLB IDE Controller", + .internal_name = "ide_vlb", + .flags = DEVICE_VLB | DEVICE_AT, + .local = 2, + .init = ide_init, + .close = ide_close, + .reset = ide_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_vlb_2ch_device = { - "VLB IDE Controller (Dual-Channel)", - "ide_vlb_2ch", - DEVICE_VLB | DEVICE_AT, - 3, - ide_init, ide_close, ide_reset, - { NULL }, NULL, NULL, NULL + .name = "VLB IDE Controller (Dual-Channel)", + .internal_name = "ide_vlb_2ch", + .flags = DEVICE_VLB | DEVICE_AT, + .local = 3, + .init = ide_init, + .close = ide_close, + .reset = ide_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_pci_device = { - "PCI IDE Controller", - "ide_pci", - DEVICE_PCI | DEVICE_AT, - 4, - ide_init, ide_close, ide_reset, - { NULL }, NULL, NULL, NULL + .name = "PCI IDE Controller", + .internal_name = "ide_pci", + .flags = DEVICE_PCI | DEVICE_AT, + .local = 4, + .init = ide_init, + .close = ide_close, + .reset = ide_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_pci_2ch_device = { - "PCI IDE Controller (Dual-Channel)", - "ide_pci_2ch", - DEVICE_PCI | DEVICE_AT, - 5, - ide_init, ide_close, ide_reset, - { NULL }, NULL, NULL, NULL + .name = "PCI IDE Controller (Dual-Channel)", + .internal_name = "ide_pci_2ch", + .flags = DEVICE_PCI | DEVICE_AT, + .local = 5, + .init = ide_init, + .close = ide_close, + .reset = ide_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; // clang-format off @@ -3160,41 +3190,57 @@ static const device_config_t ide_qua_config[] = { // clang-format on const device_t ide_ter_device = { - "Tertiary IDE Controller", - "ide_ter", - DEVICE_AT, - 0, - ide_ter_init, ide_ter_close, NULL, - { NULL }, NULL, NULL, - ide_ter_config + .name = "Tertiary IDE Controller", + .internal_name = "ide_ter", + .flags = DEVICE_AT, + .local = 0, + .init = ide_ter_init, + .close = ide_ter_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ide_ter_config }; const device_t ide_ter_pnp_device = { - "Tertiary IDE Controller (Plug and Play only)", - "ide_ter_pnp", - DEVICE_AT, - 1, - ide_ter_init, ide_ter_close, NULL, - { NULL }, NULL, NULL, - NULL + .name = "Tertiary IDE Controller (Plug and Play only)", + .internal_name = "ide_ter_pnp", + .flags = DEVICE_AT, + .local = 1, + .init = ide_ter_init, + .close = ide_ter_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_qua_device = { - "Quaternary IDE Controller", - "ide_qua", - DEVICE_AT, - 0, - ide_qua_init, ide_qua_close, NULL, - { NULL }, NULL, NULL, - ide_qua_config + .name = "Quaternary IDE Controller", + .internal_name = "ide_qua", + .flags = DEVICE_AT, + .local = 0, + .init = ide_qua_init, + .close = ide_qua_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ide_qua_config }; const device_t ide_qua_pnp_device = { - "Quaternary IDE Controller (Plug and Play only)", - "ide_qua_pnp", - DEVICE_AT, - 1, - ide_qua_init, ide_qua_close, NULL, - { NULL }, NULL, NULL, - ide_qua_config + .name = "Quaternary IDE Controller (Plug and Play only)", + .internal_name = "ide_qua_pnp", + .flags = DEVICE_AT, + .local = 1, + .init = ide_qua_init, + .close = ide_qua_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ide_qua_config }; diff --git a/src/disk/hdc_ide_cmd640.c b/src/disk/hdc_ide_cmd640.c index f07caa0a8..dec8fac18 100644 --- a/src/disk/hdc_ide_cmd640.c +++ b/src/disk/hdc_ide_cmd640.c @@ -493,51 +493,71 @@ cmd640_init(const device_t *info) const device_t ide_cmd640_vlb_device = { - "CMD PCI-0640B VLB", - "ide_cmd640_vlb", - DEVICE_VLB, - 0x0078, - cmd640_init, cmd640_close, cmd640_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0640B VLB", + .internal_name = "ide_cmd640_vlb", + .flags = DEVICE_VLB, + .local = 0x0078, + .init = cmd640_init, + .close = cmd640_close, + .reset = cmd640_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_cmd640_vlb_178_device = { - "CMD PCI-0640B VLB (Port 178h)", - "ide_cmd640_vlb_178", - DEVICE_VLB, - 0x0178, - cmd640_init, cmd640_close, cmd640_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0640B VLB (Port 178h)", + .internal_name = "ide_cmd640_vlb_178", + .flags = DEVICE_VLB, + .local = 0x0178, + .init = cmd640_init, + .close = cmd640_close, + .reset = cmd640_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_cmd640_pci_device = { - "CMD PCI-0640B PCI", - "ide_cmd640_pci", - DEVICE_PCI, - 0x0a, - cmd640_init, cmd640_close, cmd640_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0640B PCI", + .internal_name = "ide_cmd640_pci", + .flags = DEVICE_PCI, + .local = 0x0a, + .init = cmd640_init, + .close = cmd640_close, + .reset = cmd640_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_cmd640_pci_legacy_only_device = { - "CMD PCI-0640B PCI (Legacy Mode Only)", - "ide_cmd640_pci_legacy_only", - DEVICE_PCI, - 0x00, - cmd640_init, cmd640_close, cmd640_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0640B PCI (Legacy Mode Only)", + .internal_name = "ide_cmd640_pci_legacy_only", + .flags = DEVICE_PCI, + .local = 0x00, + .init = cmd640_init, + .close = cmd640_close, + .reset = cmd640_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_cmd640_pci_single_channel_device = { - "CMD PCI-0640B PCI", - "ide_cmd640_pci_single_channel", - DEVICE_PCI, - 0x2000a, - cmd640_init, cmd640_close, cmd640_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0640B PCI", + .internal_name = "ide_cmd640_pci_single_channel", + .flags = DEVICE_PCI, + .local = 0x2000a, + .init = cmd640_init, + .close = cmd640_close, + .reset = cmd640_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_ide_cmd646.c b/src/disk/hdc_ide_cmd646.c index d2b2fe978..960a07b16 100644 --- a/src/disk/hdc_ide_cmd646.c +++ b/src/disk/hdc_ide_cmd646.c @@ -408,31 +408,43 @@ cmd646_init(const device_t *info) const device_t ide_cmd646_device = { - "CMD PCI-0646", - "ide_cmd646", - DEVICE_PCI, - 0x8a, - cmd646_init, cmd646_close, cmd646_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0646", + .internal_name = "ide_cmd646", + .flags = DEVICE_PCI, + .local = 0x8a, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_cmd646_legacy_only_device = { - "CMD PCI-0646 (Legacy Mode Only)", - "ide_cmd646_legacy_only", - DEVICE_PCI, - 0x80, - cmd646_init, cmd646_close, cmd646_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0646 (Legacy Mode Only)", + .internal_name = "ide_cmd646_legacy_only", + .flags = DEVICE_PCI, + .local = 0x80, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t ide_cmd646_single_channel_device = { - "CMD PCI-0646", - "ide_cmd646_single_channel", - DEVICE_PCI, - 0x2008a, - cmd646_init, cmd646_close, cmd646_reset, - { NULL }, NULL, NULL, - NULL + .name = "CMD PCI-0646", + .internal_name = "ide_cmd646_single_channel", + .flags = DEVICE_PCI, + .local = 0x2008a, + .init = cmd646_init, + .close = cmd646_close, + .reset = cmd646_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_ide_opti611.c b/src/disk/hdc_ide_opti611.c index c8f5ac838..e53971768 100644 --- a/src/disk/hdc_ide_opti611.c +++ b/src/disk/hdc_ide_opti611.c @@ -313,11 +313,15 @@ opti611_init(const device_t *info) const device_t ide_opti611_vlb_device = { - "OPTi 82C611/82C611A VLB", - "ide_opti611_vlb", - 0, - 0, - opti611_init, opti611_close, NULL, - { NULL }, NULL, NULL, - NULL + .name = "OPTi 82C611/82C611A VLB", + .internal_name = "ide_opti611_vlb", + .flags = DEVICE_VLB, + .local = 0, + .init = opti611_init, + .close = opti611_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_ide_sff8038i.c b/src/disk/hdc_ide_sff8038i.c index 82b417b3d..7caecc37d 100644 --- a/src/disk/hdc_ide_sff8038i.c +++ b/src/disk/hdc_ide_sff8038i.c @@ -587,15 +587,15 @@ static void const device_t sff8038i_device = { - "SFF-8038i IDE Bus Master", - "sff8038i", - DEVICE_PCI, - 0, - sff_init, - sff_close, - sff_reset, - { NULL }, - NULL, - NULL, - NULL + .name = "SFF-8038i IDE Bus Master", + .internal_name = "sff8038i", + .flags = DEVICE_PCI, + .local = 0, + .init = sff_init, + .close = sff_close, + .reset = sff_reset, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_st506_at.c b/src/disk/hdc_st506_at.c index 7177d37bd..c510f5319 100644 --- a/src/disk/hdc_st506_at.c +++ b/src/disk/hdc_st506_at.c @@ -769,10 +769,15 @@ mfm_close(void *priv) const device_t st506_at_wd1003_device = { - "WD1003 AT MFM/RLL Controller", - "st506_at", - DEVICE_ISA | DEVICE_AT, - 0, - mfm_init, mfm_close, NULL, - { NULL }, NULL, NULL, NULL + .name = "WD1003 AT MFM/RLL Controller", + .internal_name = "st506_at", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 0, + .init = mfm_init, + .close = mfm_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_st506_xt.c b/src/disk/hdc_st506_xt.c index fd2ef2b9b..10e3c3731 100644 --- a/src/disk/hdc_st506_xt.c +++ b/src/disk/hdc_st506_xt.c @@ -1737,67 +1737,85 @@ static const device_config_t wd_rll_config[] = { // clang-format on const device_t st506_xt_xebec_device = { - "IBM PC Fixed Disk Adapter (MFM)", - "st506_xt", - DEVICE_ISA, - (HDD_BUS_MFM << 8) | 0, - st506_init, st506_close, NULL, - { xebec_available }, - NULL, NULL, - NULL + .name = "IBM PC Fixed Disk Adapter (MFM)", + .internal_name = "st506_xt", + .flags = DEVICE_ISA, + .local = (HDD_BUS_MFM << 8) | 0, + .init = st506_init, + .close = st506_close, + .reset = NULL, + { .available = xebec_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t st506_xt_dtc5150x_device = { - "DTC 5150X MFM Fixed Disk Adapter", - "st506_xt_dtc5150x", - DEVICE_ISA, - (HDD_BUS_MFM << 8) | 1, - st506_init, st506_close, NULL, - { dtc5150x_available }, - NULL, NULL, - dtc_config + .name = "DTC 5150X MFM Fixed Disk Adapter", + .internal_name = "st506_xt_dtc5150x", + .flags = DEVICE_ISA, + .local = (HDD_BUS_MFM << 8) | 1, + .init = st506_init, + .close = st506_close, + .reset = NULL, + { .available = dtc5150x_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = dtc_config }; const device_t st506_xt_st11_m_device = { - "ST-11M MFM Fixed Disk Adapter", - "st506_xt_st11_m", - DEVICE_ISA, - (HDD_BUS_MFM << 8) | 11, - st506_init, st506_close, NULL, - { st11_m_available }, - NULL, NULL, - st11_config + .name = "ST-11M MFM Fixed Disk Adapter", + .internal_name = "st506_xt_st11_m", + .flags = DEVICE_ISA, + .local = (HDD_BUS_MFM << 8) | 11, + .init = st506_init, + .close = st506_close, + .reset = NULL, + { .available = st11_m_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = st11_config }; const device_t st506_xt_st11_r_device = { - "ST-11R RLL Fixed Disk Adapter", - "st506_xt_st11_r", - DEVICE_ISA, - (HDD_BUS_MFM << 8) | 12, - st506_init, st506_close, NULL, - { st11_r_available }, - NULL, NULL, - st11_config + .name = "ST-11R RLL Fixed Disk Adapter", + .internal_name = "st506_xt_st11_r", + .flags = DEVICE_ISA, + .local = (HDD_BUS_MFM << 8) | 12, + .init = st506_init, + .close = st506_close, + .reset = NULL, + { .available = st11_r_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = st11_config }; const device_t st506_xt_wd1002a_wx1_device = { - "WD1002A-WX1 MFM Fixed Disk Adapter", - "st506_xt_wd1002a_wx1", - DEVICE_ISA, - (HDD_BUS_MFM << 8) | 21, - st506_init, st506_close, NULL, - { wd1002a_wx1_available }, - NULL, NULL, - wd_config + .name = "WD1002A-WX1 MFM Fixed Disk Adapter", + .internal_name = "st506_xt_wd1002a_wx1", + .flags = DEVICE_ISA, + .local = (HDD_BUS_MFM << 8) | 21, + .init = st506_init, + .close = st506_close, + .reset = NULL, + { .available = wd1002a_wx1_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = wd_config }; const device_t st506_xt_wd1002a_27x_device = { - "WD1002A-27X RLL Fixed Disk Adapter", - "st506_xt_wd1002a_27x", - DEVICE_ISA, - (HDD_BUS_MFM << 8) | 22, - st506_init, st506_close, NULL, - { wd1002a_27x_available }, - NULL, NULL, - wd_rll_config + .name = "WD1002A-27X RLL Fixed Disk Adapter", + .internal_name = "st506_xt_wd1002a_27x", + .flags = DEVICE_ISA, + .local = (HDD_BUS_MFM << 8) | 22, + .init = st506_init, + .close = st506_close, + .reset = NULL, + { .available = wd1002a_27x_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = wd_rll_config }; diff --git a/src/disk/hdc_xta.c b/src/disk/hdc_xta.c index 03a7c6fb2..754a4114a 100644 --- a/src/disk/hdc_xta.c +++ b/src/disk/hdc_xta.c @@ -1134,21 +1134,29 @@ static const device_config_t wdxt150_config[] = { }; const device_t xta_wdxt150_device = { - "WDXT-150 XTA Fixed Disk Controller", - "xta_wdxt150", - DEVICE_ISA, - 0, - xta_init, xta_close, NULL, - { xta_available }, NULL, NULL, - wdxt150_config + .name = "WDXT-150 XTA Fixed Disk Controller", + .internal_name = "xta_wdxt150", + .flags = DEVICE_ISA, + .local = 0, + .init = xta_init, + .close = xta_close, + .reset = NULL, + { .available = xta_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = wdxt150_config }; const device_t xta_hd20_device = { - "EuroPC HD20 Fixed Disk Controller", - "xta_hd20", - DEVICE_ISA, - 1, - xta_init, xta_close, NULL, - { NULL }, NULL, NULL, - NULL + .name = "EuroPC HD20 Fixed Disk Controller", + .internal_name = "xta_hd20", + .flags = DEVICE_ISA, + .local = 1, + .init = xta_init, + .close = xta_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; diff --git a/src/disk/hdc_xtide.c b/src/disk/hdc_xtide.c index 84b31bc8d..51c8dbf4a 100644 --- a/src/disk/hdc_xtide.c +++ b/src/disk/hdc_xtide.c @@ -261,51 +261,71 @@ xtide_at_close(void *priv) const device_t xtide_device = { - "PC/XT XTIDE", - "xtide", - DEVICE_ISA, - 0, - xtide_init, xtide_close, NULL, - { xtide_available }, NULL, NULL, - NULL + .name = "PC/XT XTIDE", + .internal_name = "xtide", + .flags = DEVICE_ISA, + .local = 0, + .init = xtide_init, + .close = xtide_close, + .reset = NULL, + { .available = xtide_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t xtide_at_device = { - "PC/AT XTIDE", - "xtide_at", - DEVICE_ISA | DEVICE_AT, - 0, - xtide_at_init, xtide_at_close, NULL, - { xtide_at_available }, NULL, NULL, - NULL + .name = "PC/AT XTIDE", + .internal_name = "xtide_at", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 0, + .init = xtide_at_init, + .close = xtide_at_close, + .reset = NULL, + { .available = xtide_at_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t xtide_at_386_device = { - "PC/AT XTIDE (386)", - "xtide_at_386", - DEVICE_ISA | DEVICE_AT, - 1, - xtide_at_init, xtide_at_close, NULL, - { xtide_at_386_available }, NULL, NULL, - NULL + .name = "PC/AT XTIDE (386)", + .internal_name = "xtide_at_386", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 1, + .init = xtide_at_init, + .close = xtide_at_close, + .reset = NULL, + { .available = xtide_at_386_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t xtide_acculogic_device = { - "Acculogic XT IDE", - "xtide_acculogic", - DEVICE_ISA, - 0, - xtide_acculogic_init, xtide_close, NULL, - { xtide_acculogic_available }, NULL, NULL, - NULL + .name = "Acculogic XT IDE", + .internal_name = "xtide_acculogic", + .flags = DEVICE_ISA, + .local = 0, + .init = xtide_acculogic_init, + .close = xtide_close, + .reset = NULL, + { .available = xtide_acculogic_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL }; const device_t xtide_at_ps2_device = { - "PS/2 AT XTIDE (1.1.5)", - "xtide_at_ps2", - DEVICE_ISA | DEVICE_AT, - 0, - xtide_at_ps2_init, xtide_at_close, NULL, - { xtide_at_ps2_available }, NULL, NULL, - NULL + .name = "PS/2 AT XTIDE (1.1.5)", + .internal_name = "xtide_at_ps2", + .flags = DEVICE_ISA | DEVICE_AT, + .local = 0, + .init = xtide_at_ps2_init, + .close = xtide_at_close, + .reset = NULL, + { .available = xtide_at_ps2_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL };