machine/akiko.cpp: fix regression crash (amiga/cubo.cpp games still don't automount)

This commit is contained in:
angelosa 2023-05-18 03:19:01 +02:00
parent c94f3c9519
commit b71a68dfd2
2 changed files with 4 additions and 4 deletions

View File

@ -153,7 +153,7 @@ void akiko_device::device_start()
void akiko_device::device_reset()
{
/* create the TOC table */
if ( m_cdrom != nullptr && m_cdrom->get_last_track() )
if ( m_cdrom->exists() && m_cdrom->get_last_track() )
{
uint8_t *p;
int i, addrctrl = m_cdrom->get_adr_control( 0 );
@ -709,7 +709,7 @@ void akiko_device::update_cdrom()
(void)cdda_getstatus(&lba);
if ( lba > 0 && m_cdrom != nullptr )
if ( lba > 0 && m_cdrom->exists() )
{
uint32_t disk_pos;
uint32_t track_pos;
@ -777,7 +777,7 @@ uint32_t akiko_device::read(offs_t offset)
switch( offset )
{
case 0x00/4: /* ID */
if ( m_cdrom != nullptr ) m_cdda->set_cdrom(m_cdrom);
if ( m_cdrom->exists() ) m_cdda->set_cdrom(m_cdrom);
return 0x0000cafe;
case 0x04/4: /* CDROM STATUS 1 */

View File

@ -1125,7 +1125,7 @@ void cubo_state::cubo(machine_config &config)
MICROTOUCH(config, m_microtouch, 9600).stx().set(FUNC(cubo_state::rs232_rx_w));
CDROM(config, "cd32_cdrom").set_interface("cd32_cdrom");
CDROM(config, "cdrom").set_interface("cdrom");
/* fdc */
AMIGA_FDC(config, m_fdc, amiga_state::CLK_7M_PAL);