mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
atapicdr, cdromimg: Fix gdrom support
This commit is contained in:
parent
230df29789
commit
b747acec69
@ -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");
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user