Changed 'exitlauncher' commandline argument to 'uselauncher' (which makes

more sense, as it isn't a double-negative any more).

Made PropSet::getMD5() more explicitly return a boolean indicating if the
properties were found, vs. having a CartName of 'Untitled' indicating that
it wasn't found.

The file being used by Stella in multi-file ZIP archive is now shown in
the window title, vs. showing the name of the ZIP file itself.  Related
to this, a file with an extension of 'rom' is now valid inside ZIP
archives.

Updated documentation for bankswitch types, more clearly indicating which
ones support autodetection and the debugger.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1775 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-06-17 17:04:55 +00:00
parent 9b7963d3f3
commit f271830ed4
16 changed files with 109 additions and 51 deletions

View File

@ -12,6 +12,38 @@
Release History
===============================================================================
2.8 to 2.8.1: (June 19, 2009)
* Fixed OpenGL issue for some Windows users whereby the OpenGL TV
effects weren't available, even if the available version of OpenGL
was sufficient. Related to this, the OpenGL version found by
Stella is now reported in the TV effects dialog.
* Added fallback to software rendering when OpenGL rendering has been
requested, but for whatever reason fails to initialize.
* Added native support for 4in1, 8in1 and 32in1 multicart bankswitching
schemes. When using these schemes, the 'Reload ROM' action
(by default, Control-r) will switch between each game in the ROM.
* Added bankswitch support for ROMs smaller than 2K in size. These
will be treated as 2K ROMs natively, without having to manually
'pad' them to 2048 bytes.
* Added preliminary suppport for autodetection of X07 bankswitching.
* Tweaked PAL autodetection; it was marking some PAL ROMs as NTSC.
* Changed '-exitlauncher' commandline argument to '-uselauncher'.
This works as before except the launcher is never used at all if
the option is set to false.
* Fixed crash when launching Stella from the commandline and giving
a directory name instead of a rom filename.
-Have fun!
2.7.7 to 2.8: (June 9, 2009)
* Added CRT simulation effects as described in the AtariAge posting
@ -64,8 +96,6 @@
information built in to the internal database, taking into account
any information in 'personal' stella.pro files.
-Have fun!
2.7.6 to 2.7.7: (May 1, 2009)

View File

@ -847,6 +847,13 @@
and then exit Stella. This can be used for external frontends.</td>
</tr>
<tr>
<td><pre>-uselauncher &lt;1|0&gt;</pre></td>
<td>Use the built-in ROM launcher. If disabled, launching Stella will
simply print a help message, and exiting a ROM will completely
exit the program.</td>
</tr>
<tr>
<td><pre>-launcherres &lt;WxH&gt;</pre></td>
<td>Set the size of the ROM launcher.</td>
@ -865,12 +872,6 @@
gz, zip), 'LIST' is a ':' separated list of valid rom extensions.</td>
</tr>
<tr>
<td><pre>-exitlauncher &lt;1|0&gt;</pre></td>
<td>After exiting a ROM, either exit back to the launcher (1) or
completely exit the emulator (0).</td>
</tr>
<tr>
<td><pre>-romviewer &lt;0|1|2&gt;</pre></td>
<td>Hide ROM info viewer in ROM launcher mode (0), or use the
@ -1935,7 +1936,8 @@
</tr>
<tr>
<td>Reload current ROM (TIA mode)</td>
<td>Reload current ROM (singlecart ROM, TIA mode)<br>
Load next game in ROM (multicart ROM, TIA mode)</td>
<td>Control + r</td>
<td>Cmd + r</td>
</tr>
@ -2618,19 +2620,22 @@ Ms Pac-Man (Stella extended codes):
The value of this property must be either <b>Auto-detect</b> or one of the following
(for more information about bank-switching see Kevin Horton's 2600 bankswitching
document or the documentation in each cartridges source code file). Types marked
as (*) do not currently have reliable auto-detection, or may not be fully
supported in the debugger:
as (&#185;) do not currently have reliable auto-detection, those marked as (&#178;)
are not fully supported in the debugger:
<table cellpadding="2" border="1">
<tr><th>&nbsp;Type&nbsp;</th><th>Description</th></tr>
<tr><td>0840 </td><td>8K ECONObanking </td></tr>
<tr><td>4IN1 &#185;</td><td>8-32K Multicart (4 games) </td></tr>
<tr><td>8IN1 &#185;</td><td>16-64K Multicart (8 games) </td></tr>
<tr><td>32IN1 &#185;</td><td>64-128K Multicart (32 games) </td></tr>
<tr><td>2K </td><td>2K Atari </td></tr>
<tr><td>3E </td><td>32K Tigervision </td></tr>
<tr><td>3F </td><td>512K Tigervision </td></tr>
<tr><td>4A50 (*)</td><td>64K 4A50 + ram </td></tr>
<tr><td>4A50 &#185;&#178;</td><td>64K 4A50 + ram </td></tr>
<tr><td>4K </td><td>4K Atari </td></tr>
<tr><td>AR </td><td>Supercharger </td></tr>
<tr><td>AR &#178;</td><td>Supercharger </td></tr>
<tr><td>CV </td><td>Commavid extra ram </td></tr>
<tr><td>DPC </td><td>Pitfall II </td></tr>
<tr><td>DPC &#178;</td><td>Pitfall II </td></tr>
<tr><td>E0 </td><td>8K Parker Bros </td></tr>
<tr><td>E7 </td><td>16K M-network </td></tr>
<tr><td>EF </td><td>64K Homestar Runner </td></tr>
@ -2644,10 +2649,10 @@ Ms Pac-Man (Stella extended codes):
<tr><td>FASC </td><td>CBS RAM Plus </td></tr>
<tr><td>FE </td><td>8K Decathlon </td></tr>
<tr><td>MB </td><td>Dynacom Megaboy </td></tr>
<tr><td>MC </td><td>C. Wilkson Megacart </td></tr>
<tr><td>MC &#185;&#178;</td><td>C. Wilkson Megacart </td></tr>
<tr><td>SB </td><td>128-256k SUPERbanking </td></tr>
<tr><td>UA </td><td>8K UA Ltd. </td></tr>
<tr><td>X07 (*)</td><td>64K AtariAge </td></tr>
<tr><td>X07 &#185;&#178;</td><td>64K AtariAge </td></tr>
</table></td>
</tr>

View File

@ -159,8 +159,14 @@ int main(int argc, char* argv[])
// mode and let the main event loop take care of opening a new console/ROM.
if(argc == 1 || romfile == "" || !romnode.exists() || romnode.isDirectory())
{
if(!theOSystem->createLauncher())
if(theOSystem->settings().getBool("uselauncher"))
{
if(!theOSystem->createLauncher())
return Cleanup();
}
else
{
theOSystem->settings().usage();
return Cleanup();
}
}

View File

@ -283,12 +283,14 @@ void Cartridge4A50::checkBankSwitch(uInt16 address, uInt8 value)
void Cartridge4A50::bank(uInt16)
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int Cartridge4A50::bank()
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return 0;
}
@ -296,13 +298,16 @@ int Cartridge4A50::bank()
int Cartridge4A50::bankCount()
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return 1;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool Cartridge4A50::patch(uInt16 address, uInt8 value)
{
return false; // TODO
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return false;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -444,12 +444,14 @@ int CartridgeDPC::bank()
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeDPC::bankCount()
{
return 2; // TODO: support the display ROM somehow
// TODO - add support for debugger (support the display ROM somehow)
return 2;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeDPC::patch(uInt16 address, uInt8 value)
{
// TODO - check if this actually works
myProgramImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value;
return true;
}

View File

@ -192,12 +192,14 @@ void CartridgeE0::segmentTwo(uInt16 slice)
void CartridgeE0::bank(uInt16)
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeE0::bank()
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return 0;
}
@ -205,6 +207,7 @@ int CartridgeE0::bank()
int CartridgeE0::bankCount()
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return 1;
}

View File

@ -76,18 +76,22 @@ void CartridgeFE::poke(uInt16, uInt8)
void CartridgeFE::bank(uInt16 b)
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeFE::bank()
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeFE::bankCount()
{
// Doesn't support bankswitching in the normal sense
// TODO - add support for debugger
return 1;
}

View File

@ -196,27 +196,27 @@ void CartridgeMC::poke(uInt16 address, uInt8 value)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeMC::bank(uInt16 b)
{
// TODO: add support for debugger
// TODO - add support for debugger
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeMC::bank()
{
// TODO: add support for debugger
// TODO - add support for debugger
return 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
int CartridgeMC::bankCount()
{
// TODO: add support for debugger
// TODO - add support for debugger
return 1;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool CartridgeMC::patch(uInt16 address, uInt8 value)
{
// TODO: implement
// TODO - add support for debugger
return false;
}

View File

@ -974,7 +974,7 @@ void EventHandler::handleEvent(Event::Type event, int state)
myOSystem->settings().saveConfig();
// Go back to the launcher, or immediately quit
if(!myOSystem->settings().getBool("exitlauncher"))
if(myOSystem->settings().getBool("uselauncher"))
{
myOSystem->deleteConsole();
myOSystem->createLauncher();

View File

@ -617,6 +617,7 @@ Console* OSystem::openConsole(const string& romfile, string& md5)
if((image = openROM(romfile, md5, size)) != 0)
{
// Get a valid set of properties, including any entered on the commandline
// For initial creation of the Cart, we're only concerned with the BS type
Properties props;
myPropSet->getMD5(md5, props);
string s = "";
@ -633,11 +634,9 @@ Console* OSystem::openConsole(const string& romfile, string& md5)
if(props.get(Cartridge_MD5) != cartmd5)
{
string name = props.get(Cartridge_Name);
myPropSet->getMD5(cartmd5, props);
// Add appropriate name if none exists
if(props.get(Cartridge_Name) == "Untitled")
if(!myPropSet->getMD5(cartmd5, props))
{
// Cart md5 wasn't found, so we create a new props for it
props.set(Cartridge_MD5, cartmd5);
props.set(Cartridge_Name, name+id);
myPropSet->insert(props, false);
@ -675,7 +674,7 @@ Console* OSystem::openConsole(const string& romfile, string& md5)
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8* OSystem::openROM(const string& file, string& md5, uInt32& size)
uInt8* OSystem::openROM(string file, string& md5, uInt32& size)
{
// This method has a documented side-effect:
// It not only loads a ROM and creates an array with its contents,
@ -707,8 +706,12 @@ uInt8* OSystem::openROM(const string& file, string& md5, uInt32& size)
// Grab 3-character extension
char* ext = filename + strlen(filename) - 4;
if(!BSPF_strcasecmp(ext, ".bin") || !BSPF_strcasecmp(ext, ".a26"))
if(!BSPF_strcasecmp(ext, ".a26") || !BSPF_strcasecmp(ext, ".bin") ||
!BSPF_strcasecmp(ext, ".rom"))
{
file = filename;
break;
}
}
// Scan the next file in the zip
@ -761,18 +764,14 @@ uInt8* OSystem::openROM(const string& file, string& md5, uInt32& size)
// be an entry in stella.pro. In that case, we use the rom name
// and reinsert the properties object
Properties props;
myPropSet->getMD5(md5, props);
string name = props.get(Cartridge_Name);
if(name == "Untitled")
if(!myPropSet->getMD5(md5, props))
{
// Get the filename from the rom pathname
string::size_type pos = file.find_last_of(BSPF_PATH_SEPARATOR);
if(pos+1 != string::npos)
{
name = file.substr(pos+1);
props.set(Cartridge_MD5, md5);
props.set(Cartridge_Name, name);
props.set(Cartridge_Name, file.substr(pos+1));
myPropSet->insert(props, false);
}
}

View File

@ -572,7 +572,7 @@ class OSystem
@return Pointer to the array, with size >=0 indicating valid data
(calling method is responsible for deleting it)
*/
uInt8* openROM(const string& rom, string& md5, uInt32& size);
uInt8* openROM(string rom, string& md5, uInt32& size);
/**
Gets all possible info about the given console.

View File

@ -87,7 +87,7 @@ bool PropertiesSet::save(const string& filename) const
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void PropertiesSet::getMD5(const string& md5, Properties& properties,
bool PropertiesSet::getMD5(const string& md5, Properties& properties,
bool useDefaults) const
{
properties.setDefaults();
@ -146,6 +146,8 @@ void PropertiesSet::getMD5(const string& md5, Properties& properties,
low = i + 1; // look at upper range
}
}
return found;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -77,8 +77,10 @@ class PropertiesSet
properties if not found
@param defaults Use the built-in defaults, ignoring any properties
from an external file
@return True if the set with the specified md5 was found, else false
*/
void getMD5(const string& md5, Properties& properties,
bool getMD5(const string& md5, Properties& properties,
bool useDefaults = false) const;
/**

View File

@ -97,10 +97,10 @@ Settings::Settings(OSystem* osystem)
setInternal("eepromdir", "");
// ROM browser options
setInternal("uselauncher", "true");
setInternal("launcherres", "640x480");
setInternal("launcherfont", "medium");
setInternal("launcherexts", "allfiles");
setInternal("exitlauncher", "false");
setInternal("romviewer", "0");
setInternal("lastrom", "");
@ -363,13 +363,13 @@ void Settings::usage()
<< endl
<< " -rominfo <rom> Display detailed information for the given ROM\n"
<< " -listrominfo Display contents of stella.pro, one line per ROM entry\n"
<< " -uselauncher <1|0> Use the built-in ROM launcher\n"
<< " -launcherres <WxH> The resolution to use in ROM launcher mode\n"
<< " -launcherfont <small|medium| Use the specified font in the ROM launcher\n"
<< " large>\n"
<< " -launcherexts <allfiles| Show files with the given extensions in ROM launcher\n"
<< " allroms| (exts is a ':' separated list of extensions)\n"
<< " exts\n"
<< " -exitlauncher <1|0> Don't go back to ROM launcher after playing a game\n"
<< " -romviewer <0|1|2> Show ROM info viewer at given zoom level in ROM launcher (0 for off)\n"
<< " -uipalette <1|2> Used the specified palette for UI elements\n"
<< " -listdelay <delay> Time to wait between keypresses in list widgets (300-1000)\n"

View File

@ -119,10 +119,10 @@ UIDialog::UIDialog(OSystem* osystem, DialogContainer* parent,
wid.push_back(myRomViewerPopup);
ypos += lineHeight + 4;
// Should exiting a game go back to launcher
myExitLauncherBox = new CheckboxWidget(myTab, font, xpos+20, ypos+10,
"Enter launcher after exiting ROM");
wid.push_back(myExitLauncherBox);
// Should we use the built-in ROM launcher
myUseLauncherBox = new CheckboxWidget(myTab, font, xpos+20, ypos+10,
"Use ROM launcher");
wid.push_back(myUseLauncherBox);
// Add message concerning usage
xpos = vBorder; ypos += 2*(lineHeight + 4);
@ -284,8 +284,8 @@ void UIDialog::loadConfig()
const string& viewer = instance().settings().getString("romviewer");
myRomViewerPopup->setSelected(viewer, "0");
// Exit launcher after a game
myExitLauncherBox->setState(!instance().settings().getBool("exitlauncher"));
// Use ROM launcher
myUseLauncherBox->setState(instance().settings().getBool("uselauncher"));
// Debugger size
instance().settings().getSize("debuggerres", w, h);
@ -333,8 +333,8 @@ void UIDialog::saveConfig()
instance().settings().setString("romviewer",
myRomViewerPopup->getSelectedTag());
// Exit launcher after a game
instance().settings().setBool("exitlauncher", !myExitLauncherBox->getState());
// Use ROM launcher
instance().settings().setBool("uselauncher", myUseLauncherBox->getState());
// Debugger size
instance().settings().setSize("debuggerres",
@ -370,7 +370,7 @@ void UIDialog::setDefaults()
myLauncherHeightLabel->setValue(h);
myLauncherFontPopup->setSelected("medium", "");
myRomViewerPopup->setSelected("0", "");
myExitLauncherBox->setState(true);
myUseLauncherBox->setState(true);
break;
}

View File

@ -50,7 +50,7 @@ class UIDialog : public Dialog
StaticTextWidget* myLauncherHeightLabel;
PopUpWidget* myLauncherFontPopup;
PopUpWidget* myRomViewerPopup;
CheckboxWidget* myExitLauncherBox;
CheckboxWidget* myUseLauncherBox;
// Debugger options
SliderWidget* myDebuggerWidthSlider;