Skip to content

Commit

Permalink
C64: added check for d1541ii ROM file
Browse files Browse the repository at this point in the history
  • Loading branch information
slajerek committed Oct 22, 2024
1 parent 0665e84 commit f1fe66a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
1 change: 1 addition & 0 deletions patch-format.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/sh
# example ./patch-format -1
git format-patch $*
22 changes: 17 additions & 5 deletions src/Emulators/vice/ViceInterface/CDebugInterfaceVice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2521,6 +2521,7 @@ void CDebugInterfaceVice::ScanFolderForRoms(const char *folderPath)
const char *CHARGEN_ROM_NAME = "chargen";
const char *DOS1541_ROM_NAME = "dos1541";
const char *DOS1541II_ROM_NAME = "dos1541ii";
const char *DOS1541II_ROM_NAME_2 = "d1541ii";

// kernal
sprintf(buf, "%s%c%s", folderPath, SYS_FILE_SYSTEM_PATH_SEPARATOR, KERNAL_ROM_NAME);
Expand Down Expand Up @@ -2590,10 +2591,21 @@ void CDebugInterfaceVice::ScanFolderForRoms(const char *folderPath)
sprintf(buf, "%s%c%s", folderPath, SYS_FILE_SYSTEM_PATH_SEPARATOR, DOS1541II_ROM_NAME);
if (SYS_FileExists(buf))
{
if (c64SettingsPathToRomC64Drive1541ii)
delete c64SettingsPathToRomC64Drive1541ii;
c64SettingsPathToRomC64Drive1541ii = new CSlrString(buf);
foundDos1541ii = true;
if (c64SettingsPathToRomC64Drive1541ii)
delete c64SettingsPathToRomC64Drive1541ii;
c64SettingsPathToRomC64Drive1541ii = new CSlrString(buf);
foundDos1541ii = true;
}
else
{
sprintf(buf, "%s%c%s", folderPath, SYS_FILE_SYSTEM_PATH_SEPARATOR, DOS1541II_ROM_NAME_2);
if (SYS_FileExists(buf))
{
if (c64SettingsPathToRomC64Drive1541ii)
delete c64SettingsPathToRomC64Drive1541ii;
c64SettingsPathToRomC64Drive1541ii = new CSlrString(buf);
foundDos1541ii = true;
}
}
if (!SYS_FileExists(c64SettingsPathToRomC64Drive1541ii))
{
Expand All @@ -2605,7 +2617,7 @@ void CDebugInterfaceVice::ScanFolderForRoms(const char *folderPath)

// Made more user-friendly: show filenames and path
// prepare message box
sprintf(buf, "C64 ROMs Status:\n\n"
sprintf(buf, "C64 ROMs Status:\n\n"
"Folder: '%s'\n\n"
"Kernal ROM (File: '%s'): %s\n"
"Basic ROM (File: '%s'): %s\n"
Expand Down

0 comments on commit f1fe66a

Please sign in to comment.