ti99/geneve: Replace fatal error with no action when accessing a MFM hard disk without image file.

This commit is contained in:
Michael Zapf 2024-06-28 22:55:10 +02:00
parent 59e807744f
commit 13caa1ec64

View File

@ -832,7 +832,9 @@ bool mfm_harddisk_device::read(attotime &from_when, const attotime &limit, uint1
if (track==nullptr)
{
// What shall we do in this case?
throw emu_fatalerror("Cannot read CHD image");
// throw emu_fatalerror("Cannot read CHD image"); // a bit too harsh, just return a constant 0
cdata = 0;
return false;
}
// Get a copy for later debug output
@ -871,7 +873,8 @@ bool mfm_harddisk_device::write(attotime &from_when, const attotime &limit, uint
if (track==nullptr)
{
// What shall we do in this case?
throw emu_fatalerror("Cannot read CHD image");
// throw emu_fatalerror("Cannot read CHD image"); // a bit too harsh, just return without doing anything
return false;
}
int bytepos = 0;
@ -1152,6 +1155,11 @@ uint16_t* mfmhd_trackimage_cache::get_trackimage(int cylinder, int head)
// Then look it up again, which will move it to the front
// previous points to the second to last element
// If still null, the cache was never initialized, which means there is no drive image
if (previous == nullptr)
return nullptr;
current = previous->next;
if (TRACE_CACHE) m_machine.logerror("[%s:cache] evict line (c=%d,h=%d)\n", m_mfmhd->tag(), current->cylinder, current->head);