Allow use of ATAPI devices with XTIDE

This commit is contained in:
Alexander Babikov
2021-11-19 05:12:51 +05:00
parent 7698e18129
commit db239d64e5
2 changed files with 15 additions and 9 deletions

View File

@@ -417,7 +417,9 @@ is_valid_fdd(int i)
static inline int
is_valid_cdrom(int i)
{
if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
if ((cdrom[i].bus_type == CDROM_BUS_ATAPI) && !MACHINE_HAS_IDE &&
memcmp(hdc_get_internal_name(hdc_current), "xtide", 5) &&
memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
return 0;
if ((cdrom[i].bus_type == CDROM_BUS_SCSI) && !MACHINE_HAS_SCSI &&
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
@@ -430,7 +432,9 @@ is_valid_cdrom(int i)
static inline int
is_valid_zip(int i)
{
if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
if ((zip_drives[i].bus_type == ZIP_BUS_ATAPI) && !MACHINE_HAS_IDE &&
memcmp(hdc_get_internal_name(hdc_current), "xtide", 5) &&
memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
return 0;
if ((zip_drives[i].bus_type == ZIP_BUS_SCSI) && !MACHINE_HAS_SCSI &&
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&
@@ -443,7 +447,9 @@ is_valid_zip(int i)
static inline int
is_valid_mo(int i)
{
if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && !MACHINE_HAS_IDE && memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
if ((mo_drives[i].bus_type == MO_BUS_ATAPI) && !MACHINE_HAS_IDE &&
memcmp(hdc_get_internal_name(hdc_current), "xtide", 5) &&
memcmp(hdc_get_internal_name(hdc_current), "ide", 3))
return 0;
if ((mo_drives[i].bus_type == MO_BUS_SCSI) && !MACHINE_HAS_SCSI &&
(scsi_card_current[0] == 0) && (scsi_card_current[1] == 0) &&