mirror of
https://github.com/holub/mame
synced 2025-04-23 00:39:36 +03:00
ti99/geneve: Replace fatal error with no action when accessing a MFM hard disk without image file.
This commit is contained in:
parent
59e807744f
commit
13caa1ec64
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user