Implemented the CMD-648 PCI IDE controller, gave it to the CUBX which has it on-board, and added CMD-646 and CMD-648 as standalone options for PCI tertiary+quaternary controllers.

This commit is contained in:
OBattler
2025-07-26 20:38:15 +02:00
parent 6aec914b45
commit ca400e11dd
15 changed files with 639 additions and 252 deletions

View File

@@ -78,6 +78,8 @@ static const struct {
{ &xtide_at_2ch_device },
{ &xtide_at_ps2_device },
{ &xtide_at_ps2_2ch_device },
{ &ide_ter_device },
{ &ide_qua_device },
{ &st506_at_wd1003_device },
{ &esdi_at_wd1007vse1_device },
/* MCA */
@@ -88,6 +90,8 @@ static const struct {
{ &ide_vlb_device },
{ &ide_vlb_2ch_device },
/* PCI */
{ &ide_cmd646_ter_qua_device },
{ &ide_cmd648_ter_qua_device },
{ &ide_pci_device },
{ &ide_pci_2ch_device },
{ NULL }
@@ -108,18 +112,14 @@ hdc_init(void)
void
hdc_reset(void)
{
hdc_log("HDC: reset(current=%d, internal=%d)\n",
hdc_current[0], (machines[machine].flags & MACHINE_HDC) ? 1 : 0);
for (int i = 0; i < HDC_MAX; i++) {
hdc_log("HDC %i: reset(current=%d, internal=%d)\n", i,
hdc_current[i], hdc_current[i] == HDC_INTERNAL);
/* If we have a valid controller, add its device. */
if (hdc_current[0] > HDC_INTERNAL)
device_add(controllers[hdc_current[0]].device);
/* Now, add the tertiary and/or quaternary IDE controllers. */
if (ide_ter_enabled)
device_add(&ide_ter_device);
if (ide_qua_enabled)
device_add(&ide_qua_device);
/* If we have a valid controller, add its device. */
if (hdc_current[i] > HDC_INTERNAL)
device_add_inst(controllers[hdc_current[i]].device, i + 1);
}
}
const char *