The location of EEPROM files (actually, the parent directory) can now

be changed with the '-eepromdir' commandline argument as well as within
the 'Config Files' UI.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1650 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-01-21 12:03:17 +00:00
parent 812c1bc941
commit dea17160d5
9 changed files with 79 additions and 119 deletions

View File

@ -20,7 +20,19 @@
* Fixed bug where volume wasn't being saved in 'Audio Settings' when * Fixed bug where volume wasn't being saved in 'Audio Settings' when
started from the ROM launcher. started from the ROM launcher.
* Made the ROM launcher filename filtering be case-insensitive. * Fixed crash which sometimes occurred when viewing snapshots in the
ROM Info viewer.
* Allow setting window sizes for the ROM launcher and debugger to be larger
than your desktop resolution. Be careful with this feature, as switching
to fullscreen mode may cause problems in such cases.
* Made the ROM launcher filename filtering be case-insensitive. This fixes
a bug whereby ROMs with uppercase extensions were marked as invalid.
* The location of EEPROM files used for AtariVox/Savekey emulation can
now be changed with the '-eepromdir' commandline argument as well as
in the UI.
* Removed 'Emulation_HmoveBlanks' ROM property and associated UI item. * Removed 'Emulation_HmoveBlanks' ROM property and associated UI item.
You can no longer optionally turn off HMOVE blanking; it is always You can no longer optionally turn off HMOVE blanking; it is always

View File

@ -10,7 +10,7 @@
<br><br> <br><br>
<center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center> <center><h2><b>A multi-platform Atari 2600 VCS emulator</b></h2></center>
<center><h4><b>Release 2.7</b></h4></center> <center><h4><b>Release 2.7.1</b></h4></center>
<br><br> <br><br>
<center><h2><b>User's Guide</b></h2></center> <center><h2><b>User's Guide</b></h2></center>
@ -222,106 +222,6 @@
DS and Playstation Portable (among others). DS and Playstation Portable (among others).
</p> </p>
<h2><b>New in Release 2.7</b></h2>
<ul>
<li>Totally reworked the built-in UI to be font-sensitive and use higher-resolution
fonts. Stella now requires a minimum screen size of 640x480.
If used in a resolution smaller than that, the fonts will be reduced
accordingly. Related to this, switching between software and OpenGL
rendering now requires an application restart.</li>
<li>Added three different sized fonts (small, medium, large) which can be
used in the ROM launcher.</li>
<li>Added ability to temporarily override ROM properties from the UI. This
is tied to a right mouse button context menu in the ROM launcher, and
is very useful when you want to use a set of properties for all
subsequent ROMs without having to manually change each one.</li>
<li>Added ability to filter the files shown in the ROM launcher. Currently,
the choices are 'all files', 'all roms', or 'roms ending with a certain
extension'. This functionality is tied to a right mouse button context
menu in the ROM launcher. Extensions can also be set with the
'-launcherexts' commandline argument.</li>
<li>Added ability to reload the listing in the ROM launcher, either from
a right mouse button context menu or pressing the Control/Cmd-R key.</li>
<li>Made the ROM info viewer in the ROM launcher configurable to show
snapshots in 1x or 2x mode.</li>
<li>Made the delay between consecutive keys being recognized as one word
configurable in the ROM launcher. This is useful if you find that you
have to press keys too quickly to jump to a specific ROM. This can be
set in the UI or using the '-listdelay' commandline argument.</li>
<li>Updated internal ROM properties database to ROM-Hunter version 4
(thanks go to RomHunter for his tireless research in this area).</li>
<li>Expanded the statistics overlay for the TIA image to also show
Display Format and Bankswitch type information.</li>
<li>Added '-ss1x' commandline argument and associated UI item, used to
generate snapshots in 1x mode, independent of the filtering/scaling
currently in use.</li>
<li>Various path textboxes in the UI now recognize './' (or '.\') to mean
the current directory and '~/' (or '~\') to mean your home directory
(for Windows, home directory will be your 'My Documents' folder).</li>
<li>Large speedup in loading directories with many files in the ROM launcher.</li>
<li>Fixed reset issue in 3E, 4A50, AR, CV, E7, F4SC, F6SC, F8SC, FASC and MC
ROMs; the internal RAM wasn't being randomized after the initial reset.</li>
<li>M6532/RIOT RAM is now randomized at every reset, not just when the
emulation starts.</li>
<li>Fixed bug in _diff pseudo-registers in the debugger; they were actually
defined backwards.</li>
<li>Added fix for 'Challenge/Surfers Delight' ROM; the startup bank was
incorrect. Combined with the new 'Override Properties' functionality,
you can now play both games directly from the UI (no need to use the
commandline).</li>
<li>Fixed paddle issue with Activision Casino ROM; the last card in game 4
can now be reached.</li>
<li>Added new pseudo-registers to the debugger, useful for conditional
breakpoints (_fcount, _cclocks, _vsync, _vblank).</li>
<li>Added 'timing' commandline argument functionality to the UI, so you no
longer need to use the commandline to set it.</li>
<li>Size restrictions on the TIA image are now strictly enforced. The
maximum height of a 1x TIA image is now 256 lines.</li>
<li>Added a new setting to the 'fullres' option named 'auto'. Using
'auto' will let Stella decide the best videomode to use in fullscreen.</li>
<li>Changed 'gl_fsmax' option to mean 'scale TIA image in fullscreen'. It
will have no effect on UI modes.</li>
<li>Changed 'gl_aspect' option to range 80-100 (previously, it was 50-100).</li>
<li>Removed 'ui_zoom' and 'tia_zoom' options, replacing them with
'tia_filter' (which can be zoom1x, zoom2x, etc). There is no equivalent
for ui_zoom, since the UI can no longer be scaled.</li>
<li>Added experimental 64-bit version for Vista64 (may also work on WinXP64).
This hasn't been extensively tested, and is probably quite a bit slower
than the 32-bit version.</li>
<li>OSX port now requires at least 10.3 and XCode 3.0 to compile. Sorry,
but I no longer have access to older systems to compile for 10.2.</li>
<li>Huge updates to the documentation, particularly concerning the debugger.
Many features that have been in Stella for a while are now documented for
the first time.</li>
</ul>
<p> <p>
<h2><b>Features</b></h2> <h2><b>Features</b></h2>
@ -2267,8 +2167,11 @@
This is very useful in the testing stages of creating a new game, since This is very useful in the testing stages of creating a new game, since
writing to a real EEPROM many times will eventually wear it out.</p> writing to a real EEPROM many times will eventually wear it out.</p>
<p>The EEPROM files have a special name/location depending on which <p>The location of the EEPROM files are configurable through the
version of Stella you use, which are currently not configurable:</p> '<i>-eepromdir</i>' commandline argument and within the application itself
(see <b>Section 5 - <a href="#Starting">Starting a Game</a></b>). If the
path for these files hasn't been set, the default location will depend on the
version of Stella, as follows:</p>
<p><table cellpadding="5" border="1"> <p><table cellpadding="5" border="1">
<tr> <tr>

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Console.cxx,v 1.152 2009-01-19 16:52:32 stephena Exp $ // $Id: Console.cxx,v 1.153 2009-01-21 12:03:16 stephena Exp $
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
@ -669,15 +669,15 @@ void Console::setControllers()
} }
else if(right == "ATARIVOX") else if(right == "ATARIVOX")
{ {
string eepromfile = myOSystem->baseDir() + BSPF_PATH_SEPARATOR + const string& eepromfile = myOSystem->eepromDir() + BSPF_PATH_SEPARATOR +
"atarivox_eeprom.dat"; "atarivox_eeprom.dat";
myControllers[rightPort] = myAVox = myControllers[rightPort] = myAVox =
new AtariVox(Controller::Right, *myEvent, *mySystem, myOSystem->serialPort(), new AtariVox(Controller::Right, *myEvent, *mySystem, myOSystem->serialPort(),
myOSystem->settings().getString("avoxport"), eepromfile); myOSystem->settings().getString("avoxport"), eepromfile);
} }
else if(right == "SAVEKEY") else if(right == "SAVEKEY")
{ {
string eepromfile = myOSystem->baseDir() + BSPF_PATH_SEPARATOR + const string& eepromfile = myOSystem->eepromDir() + BSPF_PATH_SEPARATOR +
"savekey_eeprom.dat"; "savekey_eeprom.dat";
myControllers[rightPort] = new SaveKey(Controller::Right, *myEvent, *mySystem, myControllers[rightPort] = new SaveKey(Controller::Right, *myEvent, *mySystem,
eepromfile); eepromfile);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: OSystem.cxx,v 1.150 2009-01-20 16:21:28 stephena Exp $ // $Id: OSystem.cxx,v 1.151 2009-01-21 12:03:17 stephena Exp $
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
@ -292,6 +292,14 @@ void OSystem::setConfigPaths()
if(!node.isDirectory()) if(!node.isDirectory())
AbstractFilesystemNode::makeDir(mySnapshotDir); AbstractFilesystemNode::makeDir(mySnapshotDir);
s = mySettings->getString("eepromdir");
if(s == "") s = myBaseDir;
mySettings->setString("eepromdir", s);
node = FilesystemNode(s);
myEEPROMDir = node.getPath();
if(!node.isDirectory())
AbstractFilesystemNode::makeDir(myEEPROMDir);
s = mySettings->getString("cheatfile"); s = mySettings->getString("cheatfile");
if(s == "") s = myBaseDir + BSPF_PATH_SEPARATOR + "stella.cht"; if(s == "") s = myBaseDir + BSPF_PATH_SEPARATOR + "stella.cht";
mySettings->setString("cheatfile", s); mySettings->setString("cheatfile", s);

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: OSystem.hxx,v 1.77 2009-01-16 21:46:30 stephena Exp $ // $Id: OSystem.hxx,v 1.78 2009-01-21 12:03:17 stephena Exp $
//============================================================================ //============================================================================
#ifndef OSYSTEM_HXX #ifndef OSYSTEM_HXX
@ -56,7 +56,7 @@ typedef Common::Array<Resolution> ResolutionList;
other objects belong. other objects belong.
@author Stephen Anthony @author Stephen Anthony
@version $Id: OSystem.hxx,v 1.77 2009-01-16 21:46:30 stephena Exp $ @version $Id: OSystem.hxx,v 1.78 2009-01-21 12:03:17 stephena Exp $
*/ */
class OSystem class OSystem
{ {
@ -264,6 +264,11 @@ class OSystem
*/ */
const string& snapshotDir() const { return mySnapshotDir; } const string& snapshotDir() const { return mySnapshotDir; }
/**
Return the full/complete directory name for storing EEPROM files.
*/
const string& eepromDir() const { return myEEPROMDir; }
/** /**
This method should be called to get the full path of the cheat file. This method should be called to get the full path of the cheat file.
@ -490,6 +495,7 @@ class OSystem
string myBaseDir, myBaseDirExpanded; string myBaseDir, myBaseDirExpanded;
string myStateDir; string myStateDir;
string mySnapshotDir; string mySnapshotDir;
string myEEPROMDir;
string myCheatFile; string myCheatFile;
string myConfigFile; string myConfigFile;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: Settings.cxx,v 1.159 2009-01-20 16:33:06 stephena Exp $ // $Id: Settings.cxx,v 1.160 2009-01-21 12:03:17 stephena Exp $
//============================================================================ //============================================================================
#include <cassert> #include <cassert>
@ -85,6 +85,7 @@ Settings::Settings(OSystem* osystem)
setInternal("cheatfile", ""); setInternal("cheatfile", "");
setInternal("palettefile", ""); setInternal("palettefile", "");
setInternal("propsfile", ""); setInternal("propsfile", "");
setInternal("eepromdir", "");
// ROM browser options // ROM browser options
setInternal("launcherres", "640x480"); setInternal("launcherres", "640x480");
@ -346,6 +347,7 @@ void Settings::usage()
<< " -cheatfile <file> Full pathname of cheatfile database\n" << " -cheatfile <file> Full pathname of cheatfile database\n"
<< " -palettefile <file> Full pathname of user-defined palette file\n" << " -palettefile <file> Full pathname of user-defined palette file\n"
<< " -propsfile <file> Full pathname of ROM properties file\n" << " -propsfile <file> Full pathname of ROM properties file\n"
<< " -eepromdir <dir> Directory in which to save EEPROM files\n"
<< " -avoxport <name> The name of the serial port where an AtariVox is connected\n" << " -avoxport <name> The name of the serial port where an AtariVox is connected\n"
<< " -help Show the text you're now reading\n" << " -help Show the text you're now reading\n"
#ifdef DEBUGGER_SUPPORT #ifdef DEBUGGER_SUPPORT

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FileSnapDialog.cxx,v 1.29 2009-01-16 21:46:31 stephena Exp $ // $Id: FileSnapDialog.cxx,v 1.30 2009-01-21 12:03:17 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -49,7 +49,7 @@ FileSnapDialog::FileSnapDialog(
// Set real dimensions // Set real dimensions
_w = 52 * fontWidth + 8; _w = 52 * fontWidth + 8;
_h = 10 * (lineHeight + 4) + 10; _h = 11 * (lineHeight + 4) + 10;
xpos = vBorder; ypos = vBorder; xpos = vBorder; ypos = vBorder;
@ -113,6 +113,16 @@ FileSnapDialog::FileSnapDialog(
_w - xpos - 10, lineHeight, ""); _w - xpos - 10, lineHeight, "");
wid.push_back(mySnapPath); wid.push_back(mySnapPath);
// EEPROM directory
xpos = vBorder; ypos += b->getHeight() + 3;
b = new ButtonWidget(this, font, xpos, ypos, buttonWidth, buttonHeight,
"EEPROM path:", kChooseEEPROMDirCmd);
wid.push_back(b);
xpos += buttonWidth + 10;
myEEPROMPath = new EditTextWidget(this, font, xpos, ypos + 2,
_w - xpos - 10, lineHeight, "");
wid.push_back(myEEPROMPath);
// Snapshot single or multiple saves // Snapshot single or multiple saves
xpos = 30; ypos += b->getHeight() + 5; xpos = 30; ypos += b->getHeight() + 5;
mySnapSingle = new CheckboxWidget(this, font, xpos, ypos, mySnapSingle = new CheckboxWidget(this, font, xpos, ypos,
@ -161,6 +171,7 @@ void FileSnapDialog::loadConfig()
myPaletteFile->setEditString(settings.getString("palettefile")); myPaletteFile->setEditString(settings.getString("palettefile"));
myPropsFile->setEditString(settings.getString("propsfile")); myPropsFile->setEditString(settings.getString("propsfile"));
mySnapPath->setEditString(settings.getString("ssdir")); mySnapPath->setEditString(settings.getString("ssdir"));
myEEPROMPath->setEditString(settings.getString("eepromdir"));
mySnapSingle->setState(!settings.getBool("sssingle")); mySnapSingle->setState(!settings.getBool("sssingle"));
mySnap1x->setState(settings.getBool("ss1x")); mySnap1x->setState(settings.getBool("ss1x"));
} }
@ -174,6 +185,7 @@ void FileSnapDialog::saveConfig()
instance().settings().setString("palettefile", myPaletteFile->getEditString()); instance().settings().setString("palettefile", myPaletteFile->getEditString());
instance().settings().setString("propsfile", myPropsFile->getEditString()); instance().settings().setString("propsfile", myPropsFile->getEditString());
instance().settings().setString("ssdir", mySnapPath->getEditString()); instance().settings().setString("ssdir", mySnapPath->getEditString());
instance().settings().setString("eepromdir", myEEPROMPath->getEditString());
instance().settings().setBool("sssingle", !mySnapSingle->getState()); instance().settings().setBool("sssingle", !mySnapSingle->getState());
instance().settings().setBool("ss1x", mySnap1x->getState()); instance().settings().setBool("ss1x", mySnap1x->getState());
@ -192,12 +204,14 @@ void FileSnapDialog::setDefaults()
const string& palettefile = basedir + BSPF_PATH_SEPARATOR + "stella.pal"; const string& palettefile = basedir + BSPF_PATH_SEPARATOR + "stella.pal";
const string& propsfile = basedir + BSPF_PATH_SEPARATOR + "stella.pro"; const string& propsfile = basedir + BSPF_PATH_SEPARATOR + "stella.pro";
const string& ssdir = basedir + BSPF_PATH_SEPARATOR + "snapshots"; const string& ssdir = basedir + BSPF_PATH_SEPARATOR + "snapshots";
const string& eepromdir = basedir;
myRomPath->setEditString(romdir); myRomPath->setEditString(romdir);
myStatePath->setEditString(statedir); myStatePath->setEditString(statedir);
myCheatFile->setEditString(cheatfile); myCheatFile->setEditString(cheatfile);
myPaletteFile->setEditString(palettefile); myPaletteFile->setEditString(palettefile);
myPropsFile->setEditString(propsfile); myPropsFile->setEditString(propsfile);
myEEPROMPath->setEditString(eepromdir);
mySnapPath->setEditString(ssdir); mySnapPath->setEditString(ssdir);
mySnapSingle->setState(true); mySnapSingle->setState(true);
@ -251,6 +265,11 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
FilesystemNode::kListDirectoriesOnly, kSnapDirChosenCmd); FilesystemNode::kListDirectoriesOnly, kSnapDirChosenCmd);
break; break;
case kChooseEEPROMDirCmd:
myBrowser->show("Select EEPROM directory:", myEEPROMPath->getEditString(),
FilesystemNode::kListDirectoriesOnly, kEEPROMDirChosenCmd);
break;
case kRomDirChosenCmd: case kRomDirChosenCmd:
{ {
FilesystemNode dir(myBrowser->getResult()); FilesystemNode dir(myBrowser->getResult());
@ -293,6 +312,13 @@ void FileSnapDialog::handleCommand(CommandSender* sender, int cmd,
break; break;
} }
case kEEPROMDirChosenCmd:
{
FilesystemNode dir(myBrowser->getResult());
myEEPROMPath->setEditString(dir.getPath());
break;
}
case kReloadRomDirCmd: case kReloadRomDirCmd:
sendCommand(kReloadRomDirCmd, 0, 0); sendCommand(kReloadRomDirCmd, 0, 0);
break; break;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FileSnapDialog.hxx,v 1.13 2009-01-04 22:27:43 stephena Exp $ // $Id: FileSnapDialog.hxx,v 1.14 2009-01-21 12:03:17 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -56,10 +56,12 @@ class FileSnapDialog : public Dialog, public CommandSender
kChoosePaletteFileCmd = 'LOpf', // palette file (stella.pal) kChoosePaletteFileCmd = 'LOpf', // palette file (stella.pal)
kChoosePropsFileCmd = 'LOpr', // properties file (stella.pro) kChoosePropsFileCmd = 'LOpr', // properties file (stella.pro)
kChooseSnapDirCmd = 'LOsn', // snapshot dir kChooseSnapDirCmd = 'LOsn', // snapshot dir
kChooseEEPROMDirCmd = 'LOee', // eeprom dir
kStateDirChosenCmd = 'LOsc', // state dir changed kStateDirChosenCmd = 'LOsc', // state dir changed
kCheatFileChosenCmd = 'LOcc', // cheatfile changed kCheatFileChosenCmd = 'LOcc', // cheatfile changed
kPaletteFileChosenCmd = 'LOpc', // palette file changed kPaletteFileChosenCmd = 'LOpc', // palette file changed
kPropsFileChosenCmd = 'LOrc' // properties file changed kPropsFileChosenCmd = 'LOrc', // properties file changed
kEEPROMDirChosenCmd = 'LOec' // eeprom dir changed
}; };
BrowserDialog* myBrowser; BrowserDialog* myBrowser;
@ -67,6 +69,7 @@ class FileSnapDialog : public Dialog, public CommandSender
// Config paths // Config paths
EditTextWidget* myRomPath; EditTextWidget* myRomPath;
EditTextWidget* myStatePath; EditTextWidget* myStatePath;
EditTextWidget* myEEPROMPath;
EditTextWidget* myCheatFile; EditTextWidget* myCheatFile;
EditTextWidget* myPaletteFile; EditTextWidget* myPaletteFile;
EditTextWidget* myPropsFile; EditTextWidget* myPropsFile;

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of // See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES. // this file, and for a DISCLAIMER OF ALL WARRANTIES.
// //
// $Id: FSNodeWin32.cxx,v 1.23 2009-01-17 15:14:46 stephena Exp $ // $Id: FSNodeWin32.cxx,v 1.24 2009-01-21 12:03:17 stephena Exp $
// //
// Based on code from ScummVM - Scumm Interpreter // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -388,9 +388,9 @@ bool WindowsFilesystemNode::
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AbstractFilesystemNode* WindowsFilesystemNode::getParent() const AbstractFilesystemNode* WindowsFilesystemNode::getParent() const
{ {
assert(_isValid || _isPseudoRoot); // assert(_isValid || _isPseudoRoot);
if (_isPseudoRoot) if (!_isValid || _isPseudoRoot)
return 0; return 0;
WindowsFilesystemNode* p = new WindowsFilesystemNode(); WindowsFilesystemNode* p = new WindowsFilesystemNode();