clean up device_config_t formatting

This commit is contained in:
Jasmine Iwanek
2022-02-26 23:31:28 -05:00
parent f4587949a7
commit 801f81fbda
61 changed files with 2679 additions and 4300 deletions

View File

@@ -92,35 +92,36 @@ static const device_t hdc_internal_device = {
static const struct {
// clang-format off
const device_t *device;
} controllers[] = {
{ &hdc_none_device },
{ &hdc_internal_device },
{ &st506_xt_xebec_device },
{ &st506_xt_dtc5150x_device },
{ &st506_xt_st11_m_device },
{ &st506_xt_wd1002a_wx1_device },
{ &st506_at_wd1003_device },
{ &st506_xt_st11_r_device },
{ &st506_xt_wd1002a_27x_device },
{ &esdi_at_wd1007vse1_device },
{ &ide_isa_device },
{ &ide_isa_2ch_device },
{ &xtide_at_device },
{ &xtide_at_386_device },
{ &xtide_at_ps2_device },
{ &xta_wdxt150_device },
{ &xtide_acculogic_device },
{ &xtide_device },
{ &esdi_ps2_device },
{ &ide_pci_device },
{ &ide_pci_2ch_device },
{ &ide_vlb_device },
{ &ide_vlb_2ch_device },
{ &hdc_none_device },
{ &hdc_internal_device },
{ &st506_xt_xebec_device },
{ &st506_xt_dtc5150x_device },
{ &st506_xt_st11_m_device },
{ &st506_xt_wd1002a_wx1_device },
{ &st506_at_wd1003_device },
{ &st506_xt_st11_r_device },
{ &st506_xt_wd1002a_27x_device },
{ &esdi_at_wd1007vse1_device },
{ &ide_isa_device },
{ &ide_isa_2ch_device },
{ &xtide_at_device },
{ &xtide_at_386_device },
{ &xtide_at_ps2_device },
{ &xta_wdxt150_device },
{ &xtide_acculogic_device },
{ &xtide_device },
{ &esdi_ps2_device },
{ &ide_pci_device },
{ &ide_pci_2ch_device },
{ &ide_vlb_device },
{ &ide_vlb_2ch_device },
{ NULL }
// clang-format on
};
/* Initialize the 'hdc_current' value based on configured HDC name. */
void
hdc_init(void)

View File

@@ -3117,95 +3117,47 @@ const device_t ide_pci_2ch_device = {
{ NULL }, NULL, NULL, NULL
};
static const device_config_t ide_ter_config[] =
{
// clang-format off
static const device_config_t ide_ter_config[] = {
{
"irq", "IRQ", CONFIG_SELECTION, "", 10, "", { 0 },
{
"irq", "IRQ", CONFIG_SELECTION, "", 10, "", { 0 },
{
{
"Plug and Play", -1
},
{
"IRQ 2", 2
},
{
"IRQ 3", 3
},
{
"IRQ 4", 4
},
{
"IRQ 5", 5
},
{
"IRQ 7", 7
},
{
"IRQ 9", 9
},
{
"IRQ 10", 10
},
{
"IRQ 11", 11
},
{
"IRQ 12", 12
},
{
""
}
}
},
{
"", "", -1
{ "Plug and Play", -1 },
{ "IRQ 2", 2 },
{ "IRQ 3", 3 },
{ "IRQ 4", 4 },
{ "IRQ 5", 5 },
{ "IRQ 7", 7 },
{ "IRQ 9", 9 },
{ "IRQ 10", 10 },
{ "IRQ 11", 11 },
{ "IRQ 12", 12 },
{ "" }
}
},
{ "", "", -1 }
};
static const device_config_t ide_qua_config[] =
{
static const device_config_t ide_qua_config[] = {
{
"irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 },
{
"irq", "IRQ", CONFIG_SELECTION, "", 11, "", { 0 },
{
{
"Plug and Play", -1
},
{
"IRQ 2", 2
},
{
"IRQ 3", 3
},
{
"IRQ 4", 4
},
{
"IRQ 5", 5
},
{
"IRQ 7", 7
},
{
"IRQ 9", 9
},
{
"IRQ 10", 10
},
{
"IRQ 11", 11
},
{
"IRQ 12", 12
},
{
""
}
}
},
{
"", "", -1
{ "Plug and Play", -1 },
{ "IRQ 2", 2 },
{ "IRQ 3", 3 },
{ "IRQ 4", 4 },
{ "IRQ 5", 5 },
{ "IRQ 7", 7 },
{ "IRQ 9", 9 },
{ "IRQ 10", 10 },
{ "IRQ 11", 11 },
{ "IRQ 12", 12 },
{ "" }
}
},
{ "", "", -1 }
};
// clang-format on
const device_t ide_ter_device = {
"Tertiary IDE Controller",

View File

@@ -1614,223 +1614,127 @@ wd1002a_27x_available(void)
return(rom_present(WD1002A_27X_BIOS_FILE));
}
// clang-format off
static const device_config_t dtc_config[] = {
{
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{
"Disabled", 0x00000
},
{
"C800H", 0xc8000
},
{
"CA00H", 0xca000
},
{
"D800H", 0xd8000
},
{
"F400H", 0xf4000
},
{
""
}
}
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{ "Disabled", 0x00000 },
{ "C800H", 0xc8000 },
{ "CA00H", 0xca000 },
{ "D800H", 0xd8000 },
{ "F400H", 0xf4000 },
{ "" }
}
},
{
"", "", -1
}
{ "", "", -1 }
};
static const device_config_t st11_config[] = {
{
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
{
{
"320H", 0x0320
},
{
"324H", 0x0324
},
{
"328H", 0x0328
},
{
"32CH", 0x032c
},
{
""
}
}
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
{
{ "320H", 0x0320 },
{ "324H", 0x0324 },
{ "328H", 0x0328 },
{ "32CH", 0x032c },
{ "" }
}
},
{
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
{
{
"IRQ 2", 2
},
{
"IRQ 5", 5
},
{
""
}
}
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
{
{ "IRQ 2", 2 },
{ "IRQ 5", 5 },
{ "" }
}
},
{
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{
"Disabled", 0x00000
},
{
"C800H", 0xc8000
},
{
"D000H", 0xd0000
},
{
"D800H", 0xd8000
},
{
"E000H", 0xe0000
},
{
""
}
}
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{ "Disabled", 0x00000 },
{ "C800H", 0xc8000 },
{ "D000H", 0xd0000 },
{ "D800H", 0xd8000 },
{ "E000H", 0xe0000 },
{ "" }
}
},
{
"revision", "Board Revision", CONFIG_SELECTION, "", 19, "", { 0 },
{
{
"Rev. 05 (v1.7)", 5
},
{
"Rev. 19 (v2.0)", 19
},
{
""
}
}
"revision", "Board Revision", CONFIG_SELECTION, "", 19, "", { 0 },
{
{ "Rev. 05 (v1.7)", 5 },
{ "Rev. 19 (v2.0)", 19 },
{ "" }
}
},
{
"", "", -1
}
{ "", "", -1 }
};
static const device_config_t wd_config[] = {
{
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{
"Disabled", 0x00000
},
{
"C800H", 0xc8000
},
{
""
}
}
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{ "Disabled", 0x00000 },
{ "C800H", 0xc8000 },
{ "" }
}
},
{
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
{
{
"320H", 0x0320
},
{
"324H", 0x0324
},
{
""
}
}
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
{
{ "320H", 0x0320 },
{ "324H", 0x0324 },
{ "" }
}
},
{
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
{
{
"IRQ 2", 2
},
{
"IRQ 5", 5
},
{
""
}
}
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
{
{ "IRQ 2", 2 },
{ "IRQ 5", 5 },
{ "" }
}
},
{
"", "", -1
}
{ "", "", -1 }
};
static const device_config_t wd_rll_config[] = {
{
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{
"Disabled", 0x00000
},
{
"C800H", 0xc8000
},
{
""
}
}
"bios_addr", "BIOS address", CONFIG_HEX20, "", 0xc8000, "", { 0 },
{
{ "Disabled", 0x00000 },
{ "C800H", 0xc8000 },
{ "" }
}
},
{
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
{
{
"320H", 0x0320
},
{
"324H", 0x0324
},
{
""
}
}
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 },
{
{ "320H", 0x0320 },
{ "324H", 0x0324 },
{ "" }
}
},
{
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
{
{
"IRQ 2", 2
},
{
"IRQ 5", 5
},
{
""
}
}
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 },
{
{ "IRQ 2", 2 },
{ "IRQ 5", 5 },
{ "" }
}
},
{
"translate", "Translate 26 -> 17", CONFIG_SELECTION, "", 0, "", { 0 },
{
{
"Off", 0
},
{
"On", 1
},
{
""
}
}
"translate", "Translate 26 -> 17", CONFIG_SELECTION, "", 0, "", { 0 },
{
{ "Off", 0 },
{ "On", 1 },
{ "" }
}
},
{
"", "", -1
}
{ "", "", -1 }
};
// clang-format on
const device_t st506_xt_xebec_device = {
"IBM PC Fixed Disk Adapter (MFM)",

View File

@@ -1104,54 +1104,35 @@ xta_close(void *priv)
static const device_config_t wdxt150_config[] = {
// clang-format off
{
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, /*W2*/
{
"base", "Address", CONFIG_HEX16, "", 0x0320, "", { 0 }, /*W2*/
{
{
"320H", 0x0320
},
{
"324H", 0x0324
},
{
""
}
},
{ "320H", 0x0320 },
{ "324H", 0x0324 },
{ "" }
},
},
{
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, /*W3*/
{
"irq", "IRQ", CONFIG_SELECTION, "", 5, "", { 0 }, /*W3*/
{
{
"IRQ 5", 5
},
{
"IRQ 4", 4
},
{
""
}
},
{ "IRQ 5", 5 },
{ "IRQ 4", 4 },
{ "" }
},
},
{
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, /*W1*/
{
"bios_addr", "BIOS Address", CONFIG_HEX20, "", 0xc8000, "", { 0 }, /*W1*/
{
{
"C800H", 0xc8000
},
{
"CA00H", 0xca000
},
{
""
}
},
{ "C800H", 0xc8000 },
{ "CA00H", 0xca000 },
{ "" }
},
{
"", "", -1
}
},
{ "", "", -1 }
// clang-format off
};
const device_t xta_wdxt150_device = {
"WDXT-150 XTA Fixed Disk Controller",
"xta_wdxt150",
@@ -1162,7 +1143,6 @@ const device_t xta_wdxt150_device = {
wdxt150_config
};
const device_t xta_hd20_device = {
"EuroPC HD20 Fixed Disk Controller",
"xta_hd20",