From a7b3ee4448238e6f7d53733e3dc1345208acffcc Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 11 Jun 2017 13:02:47 -0230 Subject: [PATCH] Debugger lst and sym files now follow ROM filename, not properties filename. --- Changes.txt | 5 +++-- src/debugger/CartDebug.cxx | 30 ++++++++++++------------------ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/Changes.txt b/Changes.txt index 581b3d275..44a4a0407 100644 --- a/Changes.txt +++ b/Changes.txt @@ -19,14 +19,13 @@ * New TIA core: TODO - gather info on all new functionality: - RSYNC - YStart autodetection + - Proper emulation of RDY during write cycles (WSYNC). - ... * Implemented new phosphor emulation mode, which is much closer to real TV output. Special thanks to Thomas Jentzsch for the idea and implementation. - * Proper emulation of RDY during write cycles. - * Much improved RIOT timer emulation never before seen in any emulator. Special thanks to DirtyHairy for the implementation, and alex_79 for finding documentation that finally describes in more detail how the @@ -60,6 +59,8 @@ - In general, input error checking is much more strictly enforced - Read-only UI items now have a different background color, to clearly indicate if an item can be modified. + - Debugger '.lst' and '.sym' files are now searched based on the name + of the ROM file, and not on the internal properties name. * Mouse grabbing is now enabled in windowed mode only when the ROM is using a virtual analog controller (paddles, trakball, etc). diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index 0ddc9a3ef..d1acd75b9 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -676,19 +676,16 @@ int CartDebug::getAddress(const string& label) const // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string CartDebug::loadListFile() { - // Currently, the default naming/location for list files is: - // 1) ROM dir based on properties entry name + // The default naming/location for list files is the ROM dir based on the + // actual ROM filename if(myListFile == "") { - const string& propsname = - myConsole.properties().get(Cartridge_Name) + ".lst"; - - FilesystemNode case1(myOSystem.romFile().getParent().getPath() + propsname); - if(case1.isFile() && case1.isReadable()) - myListFile = case1.getPath(); + FilesystemNode lst(myOSystem.romFile().getPathWithExt("") + ".lst"); + if(lst.isFile() && lst.isReadable()) + myListFile = lst.getPath(); else - return DebuggerParser::red("list file not found in:\n " + case1.getShortPath()); + return DebuggerParser::red("list file not found in:\n " + lst.getShortPath()); } FilesystemNode node(myListFile); @@ -740,19 +737,16 @@ string CartDebug::loadListFile() // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string CartDebug::loadSymbolFile() { - // Currently, the default naming/location for symbol files is: - // 1) ROM dir based on properties entry name + // The default naming/location for symbol files is the ROM dir based on the + // actual ROM filename if(mySymbolFile == "") { - const string& propsname = - myConsole.properties().get(Cartridge_Name) + ".sym"; - - FilesystemNode case1(myOSystem.romFile().getParent().getPath() + propsname); - if(case1.isFile() && case1.isReadable()) - mySymbolFile = case1.getPath(); + FilesystemNode sym(myOSystem.romFile().getPathWithExt("") + ".sym"); + if(sym.isFile() && sym.isReadable()) + mySymbolFile = sym.getPath(); else - return DebuggerParser::red("symbol file not found in:\n " + case1.getShortPath()); + return DebuggerParser::red("symbol file not found in:\n " + sym.getShortPath()); } FilesystemNode node(mySymbolFile);