Slot-independent HDD firmware (#996, PR #998)

. Move the 'read block' command into the emulator - to mirror the write command
. With emulated time to do the DMA for the r/w block command
This commit is contained in:
TomCh
2021-11-09 21:04:57 +00:00
committed by GitHub
parent d96ed5b8c5
commit 5ed901f720
6 changed files with 259 additions and 172 deletions
+8 -2
View File
@@ -178,11 +178,17 @@ void Disk2InterfaceCard::LoadLastDiskImage(const int drive)
char pathname[MAX_PATH];
std::string& regSection = RegGetConfigSlotSection(m_slot);
if (RegLoadString(regSection.c_str(), regKey.c_str(), TRUE, pathname, MAX_PATH, TEXT("")))
if (RegLoadString(regSection.c_str(), regKey.c_str(), TRUE, pathname, MAX_PATH, TEXT("")) && (pathname[0] != 0))
{
m_saveDiskImage = false;
InsertDisk(drive, pathname, IMAGE_USE_FILES_WRITE_PROTECT_STATUS, IMAGE_DONT_CREATE);
ImageError_e error = InsertDisk(drive, pathname, IMAGE_USE_FILES_WRITE_PROTECT_STATUS, IMAGE_DONT_CREATE);
m_saveDiskImage = true;
if (error != eIMAGE_ERROR_NONE)
{
NotifyInvalidImage(drive, pathname, error);
EjectDisk(drive);
}
}
}