From 24421fa9ee5399fa87bb108ce41f71a670268d19 Mon Sep 17 00:00:00 2001
From: Stephen Anthony If this is your first time starting Stella, you may have to navigate to your ROMs.
The path of the first ROM you play automatically defines the default ROM path. You
- can change it later in the Configure Paths dialog.
-
At this point, you may want to set the locations for snapshots and other - external paths. This is described in more detail in - Advanced Configuration - Snapshot Settings and - Advanced Configuration - Configure Paths. +
At this point, you may want to set the locations for snapshots. This is described in more detail in Advanced Configuration - Snapshot Settings. These settings are optional, and can be left at the defaults if you won't be using snapshots in the ROM launcher.
@@ -2348,36 +2344,6 @@-statedir <dir>
-cheatfile <file>
-palettefile <file>
-propsfile <file>
-nvramdir <dir>
-cfgdir <dir>
-avoxport <name>
-basedir <dir>
-baseinappdir
-help
Configure Paths dialog:
-![]() |
- - |
-
|
-
Developer Settings dialog:
Linux/Unix | -~/.stella/nvram/atarivox_eeprom.dat - ~/.stella/nvram/savekey_eeprom.dat |
+ $HOME/.config/stella/nvram/atarivox_eeprom.dat + $HOME/.config/stella/nvram/savekey_eeprom.dat |
Macintosh | -~/Library/Application Support/Stella/nvram/atarivox_eeprom.dat - ~/Library/Application Support/Stella/nvram/savekey_eeprom.dat |
+ $HOME/Library/Application Support/Stella/nvram/atarivox_eeprom.dat + $HOME/Library/Application Support/Stella/nvram/savekey_eeprom.dat |
Windows | %APPDATA%\Stella\nvram\atarivox_eeprom.dat - %APPDATA%\Stella\nvram\savekey_eeprom.dat - OR - _BASEDIR_\nvram\atarivox_eeprom.dat - _BASEDIR_\nvram\savekey_eeprom.dat - (if a file named 'basedir.txt' exists in the application - directory containing the full pathname for _BASEDIR_) + %APPDATA%\Stella\nvram\savekey_eeprom.dat |
|
If using 'basedir' or 'baseinappdir' |
+ _BASEDIR_/nvram/atarivox_eeprom.dat + _BASEDIR_/nvram/savekey_eeprom.dat |
+
Note that these EEPROM files will be created when necessary, and @@ -3490,7 +3442,7 @@
The settings file has a special name/location depending on which version of Stella - you use, which is currently not configurable:
+ you use, which is not configurable:Macintosh | -Not applicable; settings are saved in ~/Library/Preferences/Stella-emu.plist | +Not applicable; settings are saved in $HOME/Library/Preferences/Stella-emu.plist |
Windows | -%APPDATA%\Stella\stella.ini
- OR - _BASEDIR_\stella.ini - (if a file named 'basedir.txt' exists in the application - directory containing the full pathname for _BASEDIR_) - |
+ %APPDATA%\Stella\stella.ini | +
If using 'basedir' or 'baseinappdir' |
+ _BASEDIR_/stellarc (or stella.ini) |
The name of the cheat database file is configurable through the - '-cheatfile' commandline argument and within the application itself - (see Advanced Configuration - Configure Paths). If the - path for this file hasn't been set, the default filename will depend on the - version of Stella, as follows:
+The name of the cheat database file will depend on the version of Stella, as follows:
Macintosh | -~/Library/Application Support/Stella/stella.cht | +$HOME/Library/Application Support/Stella/stella.cht |
Windows | -%APPDATA%\Stella\stella.cht
- OR - _BASEDIR_\stella.cht - (if a file named 'basedir.txt' exists in the application - directory containing the full pathname for _BASEDIR_) - |
+ %APPDATA%\Stella\stella.cht | +
If using 'basedir' or 'baseinappdir' |
+ _BASEDIR_/stella.cht |
Stella will require a restart for changes to this file to take effect.
@@ -3931,11 +3877,7 @@ Ms Pac-Man (Stella extended codes): -The name of the properties file is configurable through the - '-propsfile' commandline argument and within the application itself - (see Advanced Configuration - Configure Paths). If the - path for this file hasn't been set, the default filename will depend on the - version of Stella, as follows:
+The name of the properties file will depend on the version of Stella, as follows:
Macintosh | -~/Library/Application Support/Stella/stella.pro | +$HOME/Library/Application Support/Stella/stella.pro |
Windows | -%APPDATA%\Stella\stella.pro
- OR - _BASEDIR_\stella.pro - (if a file named 'basedir.txt' exists in the application - directory containing the full pathname for _BASEDIR_) - |
-
+ %APPDATA%\Stella\stella.pro | +
If using 'basedir' or 'baseinappdir' |
+ _BASEDIR_/stella.pro |
Stella will require a restart for changes to this file to take effect.
@@ -3996,11 +3936,7 @@ Ms Pac-Man (Stella extended codes): need to specify those colours in the palette file. -The name of the palette file is configurable through the - '-palettefile' commandline argument and within the application itself - (see Advanced Configuration - Configure Paths). If the - path for this file hasn't been set, the default filename will depend on the - version of Stella, as follows:
+The name of the palette file will depend on the version of Stella, as follows:
Macintosh | -~/Library/Application Support/Stella/stella.pal | +%HOME/Library/Application Support/Stella/stella.pal |
Windows | -%APPDATA%\Stella\stella.pal
- OR - _BASEDIR_\stella.pal - (if a file named 'basedir.txt' exists in the application - directory containing the full pathname for _BASEDIR_) - |
+ %APPDATA%\Stella\stella.pal | +
If using 'basedir' or 'baseinappdir' |
+ _BASEDIR_/stella.pal |
Note that to actually use the external palette, the palette file must
diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx
index 660dbceec..0ea5ee036 100644
--- a/src/debugger/CartDebug.cxx
+++ b/src/debugger/CartDebug.cxx
@@ -696,7 +696,7 @@ string CartDebug::loadListFile()
if(lst.isFile() && lst.isReadable())
myListFile = lst.getPath();
else
- return DebuggerParser::red("list file not found in:\n " + lst.getShortPath());
+ return DebuggerParser::red("list file \'" + lst.getShortPath() + "\' not found");
}
FilesystemNode node(myListFile);
@@ -741,7 +741,7 @@ string CartDebug::loadListFile()
}
myDebugger.rom().invalidate();
- return "loaded " + node.getShortPath() + " OK";
+ return "list file '" + node.getShortPath() + "' loaded OK";
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -756,7 +756,7 @@ string CartDebug::loadSymbolFile()
if(sym.isFile() && sym.isReadable())
mySymbolFile = sym.getPath();
else
- return DebuggerParser::red("symbol file not found in:\n " + sym.getShortPath());
+ return DebuggerParser::red("symbol file \'" + sym.getShortPath() + "\' not found");
}
FilesystemNode node(mySymbolFile);
@@ -801,32 +801,22 @@ string CartDebug::loadSymbolFile()
}
myDebugger.rom().invalidate();
- return "loaded " + node.getShortPath() + " OK";
+ return "symbol file '" + node.getShortPath() + "' loaded OK";
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string CartDebug::loadConfigFile()
{
- // There are two possible locations for loading config files
- // (in order of decreasing relevance):
- // 1) ROM dir based on properties entry name
- // 2) CFG dir based on properties entry name
+ // The default naming/location for config files is the ROM dir based on the
+ // actual ROM filename
if(myCfgFile == "")
{
- const string& propsname =
- myConsole.properties().get(PropType::Cart_Name) + ".cfg";
-
- FilesystemNode case1(myOSystem.romFile().getParent().getPath() + propsname);
- FilesystemNode case2(myOSystem.cfgDir() + propsname);
-
- if(case1.isFile() && case1.isReadable())
- myCfgFile = case1.getPath();
- else if(case2.isFile() && case2.isReadable())
- myCfgFile = case2.getPath();
+ FilesystemNode cfg(myOSystem.romFile().getPathWithExt("") + ".cfg");
+ if(cfg.isFile() && cfg.isReadable())
+ myCfgFile = cfg.getPath();
else
- return DebuggerParser::red("config file not found in:\n " +
- case1.getShortPath() + "\n " + case2.getShortPath());
+ return DebuggerParser::red("config file \'" + cfg.getShortPath() + "\' not found");
}
FilesystemNode node(myCfgFile);
@@ -910,7 +900,7 @@ string CartDebug::loadConfigFile()
stringstream retVal;
if(myConsole.cartridge().bankCount() > 1)
retVal << DebuggerParser::red("config file for multi-bank ROM not fully supported\n");
- retVal << "loaded " << node.getShortPath() << " OK";
+ retVal << "config file '" << node.getShortPath() << "' loaded OK";
return retVal.str();
}
@@ -918,29 +908,25 @@ string CartDebug::loadConfigFile()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string CartDebug::saveConfigFile()
{
- // While there are two possible locations for loading config files,
- // the main 'config' directory is used whenever possible when saving,
- // unless the rom-specific file already exists
+ // The default naming/location for config files is the ROM dir based on the
+ // actual ROM filename
- FilesystemNode node;
-
- FilesystemNode case0(myCfgFile);
- if(myCfgFile != "" && case0.isFile() && case0.isWritable())
- node = case0;
- else
+ FilesystemNode cfg;
+ if(myCfgFile == "")
{
- const string& propsname =
- myConsole.properties().get(PropType::Cart_Name) + ".cfg";
-
- node = FilesystemNode(myOSystem.cfgDir() + propsname);
+ cfg = FilesystemNode(myOSystem.romFile().getPathWithExt("") + ".cfg");
+ if(cfg.isFile() && cfg.isWritable())
+ myCfgFile = cfg.getPath();
+ else
+ return DebuggerParser::red("config file \'" + cfg.getShortPath() + "\' not writable");
}
const string& name = myConsole.properties().get(PropType::Cart_Name);
const string& md5 = myConsole.properties().get(PropType::Cart_MD5);
- ofstream out(node.getPath());
+ ofstream out(cfg.getPath());
if(!out.is_open())
- return "Unable to save directives to " + node.getShortPath();
+ return "Unable to save directives to " + cfg.getShortPath();
// Store all bank information
out << "//Stella.pro: \"" << name << "\"" << endl
@@ -955,7 +941,7 @@ string CartDebug::saveConfigFile()
stringstream retVal;
if(myConsole.cartridge().bankCount() > 1)
retVal << DebuggerParser::red("config file for multi-bank ROM not fully supported\n");
- retVal << "saved " << node.getShortPath() << " OK";
+ retVal << "config file '" << cfg.getShortPath() << "' saved OK";
return retVal.str();
}
diff --git a/src/emucore/OSystem.cxx b/src/emucore/OSystem.cxx
index 19049450b..356418c7d 100644
--- a/src/emucore/OSystem.cxx
+++ b/src/emucore/OSystem.cxx
@@ -276,9 +276,6 @@ void OSystem::setConfigPaths()
buildDirIfRequired(myStateDir, myBaseDir + "state");
buildDirIfRequired(myNVRamDir, myBaseDir + "nvram");
-#ifdef DEBUGGER_SUPPORT
- buildDirIfRequired(myCfgDir, myBaseDir + "cfg");
-#endif
#ifdef PNG_SUPPORT
mySnapshotSaveDir = mySettings->getString("snapsavedir");
@@ -303,7 +300,6 @@ void OSystem::setConfigPaths()
dbgPath("base dir ", myBaseDir);
dbgPath("state dir ", myStateDir);
dbgPath("nvram dir ", myNVRamDir);
- dbgPath("cfg dir ", myCfgDir);
dbgPath("ssave dir ", mySnapshotSaveDir);
dbgPath("sload dir ", mySnapshotLoadDir);
dbgPath("cheat file", myCheatFile);
diff --git a/src/emucore/OSystem.hxx b/src/emucore/OSystem.hxx
index bb2874bb0..da0dc471b 100644
--- a/src/emucore/OSystem.hxx
+++ b/src/emucore/OSystem.hxx
@@ -262,13 +262,6 @@ class OSystem
const string& cheatFile() const { return myCheatFile; }
#endif
- #ifdef DEBUGGER_SUPPORT
- /**
- Return the full/complete directory name for storing Distella cfg files.
- */
- const string& cfgDir() const { return myCfgDir; }
- #endif
-
#ifdef PNG_SUPPORT
/**
Return the full/complete directory name for saving and loading
@@ -540,7 +533,6 @@ class OSystem
string mySnapshotSaveDir;
string mySnapshotLoadDir;
string myNVRamDir;
- string myCfgDir;
string myDefaultSaveDir;
string myDefaultLoadDir;
diff --git a/src/emucore/Settings.cxx b/src/emucore/Settings.cxx
index 330aa541d..5846fc365 100644
--- a/src/emucore/Settings.cxx
+++ b/src/emucore/Settings.cxx
@@ -495,7 +495,7 @@ void Settings::usage() const
<< " -ctrldelay