From 20b2b1c90177b5a60bcd7ad7f8b3e70342aa35d3 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sun, 18 May 2025 02:40:49 +0200 Subject: [PATCH] RZ-1000: Do not initialize the second IDE channel if the controller is single-channel. --- src/disk/hdc_ide_rz1000.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/disk/hdc_ide_rz1000.c b/src/disk/hdc_ide_rz1000.c index 2c1a09e8e..e2c7179ad 100644 --- a/src/disk/hdc_ide_rz1000.c +++ b/src/disk/hdc_ide_rz1000.c @@ -272,7 +272,10 @@ rz1000_init(const device_t *info) dev->channels = ((info->local & 0x60000) >> 17) & 0x03; - device_add(&ide_pci_2ch_device); + if (dev->channels & 0x02) + device_add(&ide_pci_2ch_device); + else + device_add(&ide_pci_device); if (info->local & 0x80000) pci_add_card(PCI_ADD_NORMAL, rz1000_pci_read, rz1000_pci_write, dev, &dev->pci_slot);