diff options
| author | 2023-05-05 19:22:00 +0200 | |
|---|---|---|
| committer | 2023-05-05 19:22:08 +0200 | |
| commit | b747acec69c0129ad15f14e6cea2dfa4f67e3a6e (patch) | |
| tree | fe2d2cf55d0469e640a7dcf99d82ead31bb22cd7 | |
| parent | 230df29789cc50a1f68cd4ce26926c0038a593b0 (diff) | |
atapicdr, cdromimg: Fix gdrom support
| -rw-r--r-- | src/devices/bus/ata/atapicdr.cpp | 3 | ||||
| -rw-r--r-- | src/devices/imagedev/cdromimg.cpp | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/devices/bus/ata/atapicdr.cpp b/src/devices/bus/ata/atapicdr.cpp index 69b19656f15..cea30292c00 100644 --- a/src/devices/bus/ata/atapicdr.cpp +++ b/src/devices/bus/ata/atapicdr.cpp @@ -2,6 +2,7 @@ // copyright-holders:smf #include "emu.h" #include "atapicdr.h" +#include "gdrom.h" #define SCSI_SENSE_ASC_MEDIUM_NOT_PRESENT 0x3a #define SCSI_SENSE_ASC_NOT_READY_TO_READY_TRANSITION 0x28 @@ -47,6 +48,8 @@ void atapi_cdrom_device::device_add_mconfig(machine_config &config) { if(type() == ATAPI_DVDROM || type() == ATAPI_FIXED_DVDROM) DVDROM(config, "image").set_interface("cdrom"); + else if(type() == ATAPI_GDROM) + GDROM(config, "image").set_interface("cdrom"); else CDROM(config, "image").set_interface("cdrom"); CDDA(config, "cdda"); diff --git a/src/devices/imagedev/cdromimg.cpp b/src/devices/imagedev/cdromimg.cpp index 78bb1bb1866..9871f630289 100644 --- a/src/devices/imagedev/cdromimg.cpp +++ b/src/devices/imagedev/cdromimg.cpp @@ -83,7 +83,7 @@ void cdrom_image_device::setup_current_preset_image() m_dvdrom_handle.reset(); chd_file *chd = current_preset_image_chd(); - if (chd->is_cd()) + if (chd->is_cd() || chd->is_gd()) m_cdrom_handle = std::make_unique<cdrom_file>(chd); else if(m_dvd_compat && chd->is_dvd()) m_dvdrom_handle = std::make_unique<dvdrom_file>(chd); @@ -130,7 +130,7 @@ std::pair<std::error_condition, std::string> cdrom_image_device::call_load() // open the CHD file if (chd) { - if (chd->is_cd()) + if (chd->is_cd() || chd->is_gd()) m_cdrom_handle.reset(new cdrom_file(chd)); else if(m_dvd_compat && chd->is_dvd()) m_dvdrom_handle.reset(new dvdrom_file(chd)); |
