stella/stella/src/emucore/Console.cxx

641 lines
17 KiB
C++
Raw Normal View History

//============================================================================
//
// SSSS tt lll lll
// SS SS tt ll ll
// SS tttttt eeee ll ll aaaa
// SSSS tt ee ee ll ll aa
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
// SS SS tt ee ll ll aa aa
// SSSS ttt eeeee llll llll aaaaa
//
// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team
//
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Console.cxx,v 1.70 2005-09-11 22:55:51 stephena Exp $
//============================================================================
#include <assert.h>
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
#include <iostream>
#include <sstream>
#include <fstream>
#include "Booster.hxx"
#include "Cart.hxx"
#include "Console.hxx"
#include "Control.hxx"
#include "Driving.hxx"
#include "Event.hxx"
#include "EventHandler.hxx"
#include "Joystick.hxx"
#include "Keyboard.hxx"
#include "M6502Hi.hxx"
#include "M6532.hxx"
#include "MD5.hxx"
#include "MediaSrc.hxx"
#include "Paddles.hxx"
#include "Props.hxx"
#include "PropsSet.hxx"
#include "Settings.hxx"
#include "Sound.hxx"
#include "Switches.hxx"
#include "System.hxx"
#include "TIA.hxx"
#include "FrameBuffer.hxx"
#include "OSystem.hxx"
#include "Menu.hxx"
#include "CommandMenu.hxx"
#include "Version.hxx"
#ifdef SNAPSHOT_SUPPORT
#include "Snapshot.hxx"
#endif
#ifdef DEVELOPER_SUPPORT
#include "Debugger.hxx"
#endif
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Console::Console(const uInt8* image, uInt32 size, OSystem* osystem)
: myOSystem(osystem)
{
myControllers[0] = 0;
myControllers[1] = 0;
myMediaSource = 0;
mySwitches = 0;
mySystem = 0;
myEvent = 0;
// Attach the event subsystem to the current console
myEvent = myOSystem->eventHandler().event();
// Get the MD5 message-digest for the ROM image
string md5 = MD5(image, size);
// Search for the properties based on MD5
myOSystem->propSet().getMD5(md5, myProperties);
// Make sure the MD5 value of the cartridge is set in the properties
if(myProperties.get("Cartridge.MD5") == "")
myProperties.set("Cartridge.MD5", md5);
// A developer can override properties from the commandline
setDeveloperProperties();
// Make sure height is set properly for PAL ROM
if(myProperties.get("Display.Format") == "PAL")
if(myProperties.get("Display.Height") == "210")
myProperties.set("Display.Height", "250");
// Setup the controllers based on properties
string left = myProperties.get("Controller.Left");
string right = myProperties.get("Controller.Right");
// Construct left controller
if(left == "Booster-Grip")
{
myControllers[0] = new BoosterGrip(Controller::Left, *myEvent);
}
else if(left == "Driving")
{
myControllers[0] = new Driving(Controller::Left, *myEvent);
}
else if((left == "Keyboard") || (left == "Keypad"))
{
myControllers[0] = new Keyboard(Controller::Left, *myEvent);
}
else if(left == "Paddles")
{
myControllers[0] = new Paddles(Controller::Left, *myEvent);
}
else
{
myControllers[0] = new Joystick(Controller::Left, *myEvent);
}
// Construct right controller
if(right == "Booster-Grip")
{
myControllers[1] = new BoosterGrip(Controller::Right, *myEvent);
}
else if(right == "Driving")
{
myControllers[1] = new Driving(Controller::Right, *myEvent);
}
else if((right == "Keyboard") || (right == "Keypad"))
{
myControllers[1] = new Keyboard(Controller::Right, *myEvent);
}
else if(right == "Paddles")
{
myControllers[1] = new Paddles(Controller::Right, *myEvent);
}
else
{
myControllers[1] = new Joystick(Controller::Right, *myEvent);
}
// Create switches for the console
mySwitches = new Switches(*myEvent, myProperties);
// Now, we can construct the system and components
mySystem = new System(13, 6);
M6502* m6502;
m6502 = new M6502High(1);
#ifdef DEVELOPER_SUPPORT
m6502->attach(myOSystem->debugger());
#endif
M6532* m6532 = new M6532(*this);
TIA *tia = new TIA(*this, myOSystem->settings());
tia->setSound(myOSystem->sound());
Cartridge* cartridge = Cartridge::create(image, size, myProperties);
mySystem->attach(m6502);
mySystem->attach(m6532);
mySystem->attach(tia);
mySystem->attach(cartridge);
// Remember what my media source is
myMediaSource = tia;
myCart = cartridge;
myRiot = m6532;
// Reset, the system to its power-on state
mySystem->reset();
// Set the correct framerate based on the format of the ROM
// This can be overridden by changing the framerate in the
// VideoDialog box or on the commandline, but it can't be saved
// (ie, framerate is now solely determined based on ROM format).
uInt32 framerate = myOSystem->settings().getInt("framerate");
if(framerate == 0)
{
if(myProperties.get("Display.Format") == "NTSC")
framerate = 60;
else if(myProperties.get("Display.Format") == "PAL")
framerate = 50;
else
framerate = 60;
}
myOSystem->setFramerate(framerate);
// Initialize the framebuffer interface.
// This must be done *after* a reset, since it needs updated values.
initializeVideo();
// Initialize the sound interface.
// The # of channels can be overridden in the AudioDialog box or on
// the commandline, but it can't be saved.
uInt32 channels = myOSystem->settings().getInt("channels");
if(channels == 0)
{
if(myProperties.get("Cartridge.Sound") == "Stereo")
channels = 2;
else if(myProperties.get("Cartridge.Sound") == "Mono")
channels = 1;
else
channels = 1;
}
myOSystem->sound().setChannels(channels);
myOSystem->sound().setFrameRate(framerate);
myOSystem->sound().initialize();
// Initialize the options menu system with updated values from the framebuffer
myOSystem->menu().initialize();
myOSystem->menu().setGameProfile(myProperties);
// Initialize the command menu system with updated values from the framebuffer
myOSystem->commandMenu().initialize();
#ifdef DEVELOPER_SUPPORT
// Finally, initialize the debugging system, since it depends on the current ROM
myOSystem->debugger().setConsole(this);
myOSystem->debugger().initialize();
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Console::Console(const Console& console)
: myOSystem(console.myOSystem)
{
// TODO: Write this method
assert(false);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Console::~Console()
{
delete mySystem;
delete mySwitches;
delete myControllers[0];
delete myControllers[1];
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
const Properties& Console::properties() const
{
return myProperties;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Console& Console::operator = (const Console&)
{
// TODO: Write this method
assert(false);
return *this;
}
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::toggleFormat()
{
string format = myProperties.get("Display.Format");
uInt32 framerate = 60;
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
if(format == "NTSC")
{
myProperties.set("Display.Format", "PAL");
mySystem->reset();
myOSystem->frameBuffer().showMessage("PAL Mode");
framerate = 50;
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
else if(format == "PAL")
{
myProperties.set("Display.Format", "NTSC");
mySystem->reset();
myOSystem->frameBuffer().showMessage("NTSC Mode");
framerate = 60;
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
setPalette();
myOSystem->setFramerate(framerate);
myOSystem->sound().setFrameRate(framerate);
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::togglePalette(const string& palette)
{
string message, type;
// Since the toggle cycles in order, if we know which palette to switch
// to we set the 'type' to the previous one in the sequence
if(palette != "")
{
if(palette == "Standard")
type = "z26";
else if(palette == "Original")
type = "standard";
else if(palette == "Z26")
type = "original";
else
type = "";
}
else
type = myOSystem->settings().getString("palette");
if(type == "standard") // switch to original
{
type = "original";
message = "Original Stella colors";
}
else if(type == "original") // switch to z26
{
type = "z26";
message = "Z26 colors";
}
else if(type == "z26") // switch to standard
{
type = "standard";
message = "Standard Stella colors";
}
else // switch to standard mode if we get this far
{
type = "standard";
message = "Standard Stella colors";
}
myOSystem->settings().setString("palette", type);
myOSystem->frameBuffer().showMessage(message);
setPalette();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::saveProperties(string filename, bool merge)
{
// Merge the current properties into the PropertiesSet file
if(merge)
{
if(myOSystem->propSet().merge(myProperties, filename))
myOSystem->frameBuffer().showMessage("Properties merged");
else
myOSystem->frameBuffer().showMessage("Error merging properties");
}
else // Save to the specified file directly
{
ofstream out(filename.c_str(), ios::out);
if(out && out.is_open())
{
myProperties.save(out);
out.close();
myOSystem->frameBuffer().showMessage("Properties saved");
}
else
{
myOSystem->frameBuffer().showMessage("Error saving properties");
}
}
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::initializeVideo()
{
string title = string("Stella ") + STELLA_VERSION +
": \"" + myProperties.get("Cartridge.Name") + "\"";
myOSystem->frameBuffer().initialize(title,
myMediaSource->width() << 1,
myMediaSource->height());
setPalette();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::initializeAudio()
{
myMediaSource->setSound(myOSystem->sound());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::setPalette()
{
myOSystem->frameBuffer().setPalette(myMediaSource->palette());
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/* Original frying research and code by Fred Quimby.
I've tried the following variations on this code:
- Both OR and Exclusive OR instead of AND. This generally crashes the game
without ever giving us realistic "fried" effects.
- Loop only over the RIOT RAM. This still gave us frying-like effects, but
it seemed harder to duplicate most effects. I have no idea why, but
munging the TIA regs seems to have some effect (I'd think it wouldn't).
Fred says he also tried mangling the PC and registers, but usually it'd just
crash the game (e.g. black screen, no way out of it).
It's definitely easier to get some effects (e.g. 255 lives in Battlezone)
with this code than it is on a real console. My guess is that most "good"
frying effects come from a RIOT location getting cleared to 0. Fred's
code is more likely to accomplish this than frying a real console is...
Until someone comes up with a more accurate way to emulate frying, I'm
leaving this as Fred posted it. -- B.
*/
void Console::fry()
{
for (int ZPmem=0; ZPmem<0x100; ZPmem += rand() % 4)
mySystem->poke(ZPmem, mySystem->peek(ZPmem) & (uInt8)rand() % 256);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
void Console::changeXStart(const uInt32 direction)
{
Int32 xstart = atoi(myProperties.get("Display.XStart").c_str());
uInt32 width = atoi(myProperties.get("Display.Width").c_str());
ostringstream strval;
string message;
if(direction == 1) // increase XStart
{
xstart += 4;
if(xstart > 80)
{
myOSystem->frameBuffer().showMessage("XStart at maximum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
else if((width + xstart) > 160)
{
myOSystem->frameBuffer().showMessage("XStart no effect");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
else if(direction == 0) // decrease XStart
{
xstart -= 4;
if(xstart < 0)
{
myOSystem->frameBuffer().showMessage("XStart at minimum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
strval << xstart;
myProperties.set("Display.XStart", strval.str());
mySystem->reset();
initializeVideo();
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
message = "XStart ";
message += strval.str();
myOSystem->frameBuffer().showMessage(message);
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::changeYStart(const uInt32 direction)
{
Int32 ystart = atoi(myProperties.get("Display.YStart").c_str());
ostringstream strval;
string message;
if(direction == 1) // increase YStart
{
ystart++;
if(ystart > 64)
{
myOSystem->frameBuffer().showMessage("YStart at maximum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
else if(direction == 0) // decrease YStart
{
ystart--;
if(ystart < 0)
{
myOSystem->frameBuffer().showMessage("YStart at minimum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
strval << ystart;
myProperties.set("Display.YStart", strval.str());
mySystem->reset();
initializeVideo();
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
message = "YStart ";
message += strval.str();
myOSystem->frameBuffer().showMessage(message);
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::changeWidth(const uInt32 direction)
{
uInt32 xstart = atoi(myProperties.get("Display.XStart").c_str());
Int32 width = atoi(myProperties.get("Display.Width").c_str());
ostringstream strval;
string message;
if(direction == 1) // increase Width
{
width += 4;
if((width > 160) || ((width % 4) != 0))
{
myOSystem->frameBuffer().showMessage("Width at maximum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
else if((width + xstart) > 160)
{
myOSystem->frameBuffer().showMessage("Width no effect");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
else if(direction == 0) // decrease Width
{
width -= 4;
if(width < 80)
{
myOSystem->frameBuffer().showMessage("Width at minimum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
strval << width;
myProperties.set("Display.Width", strval.str());
mySystem->reset();
initializeVideo();
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
message = "Width ";
message += strval.str();
myOSystem->frameBuffer().showMessage(message);
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::changeHeight(const uInt32 direction)
{
Int32 height = atoi(myProperties.get("Display.Height").c_str());
ostringstream strval;
string message;
if(direction == 1) // increase Height
{
height++;
if(height > 256)
{
myOSystem->frameBuffer().showMessage("Height at maximum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
else if(direction == 0) // decrease Height
{
height--;
if(height < 100)
{
myOSystem->frameBuffer().showMessage("Height at minimum");
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
return;
}
}
strval << height;
myProperties.set("Display.Height", strval.str());
mySystem->reset();
initializeVideo();
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
message = "Height ";
message += strval.str();
myOSystem->frameBuffer().showMessage(message);
Added ability to change XStart. YStart, Width, Height, and Format both from the commandline (by passing in a user-defined properties object to the Console constructor) and at runtime (by calling various methods in the Console class). Methods are defined as follows: Console::changeXStart() & Console::changeYStart() - Changes the "Display.XStart" and "Display.YStart" variables. Console::changeWidth() & Console::changeHeight() - Changes the "Display.Width" and "Display.Height" variables. Console::toggleFormat() - Changes the "Display.Format" variable, switching between NTSC and PAL modes. Console::saveProperties() - Saves the current properties (including changes made in the current session) to the given filename. Some notes on the new methods: - The GUI's will need to be adapted to see the updated information and act accordingly. - This new code is only activated by '#define DEVELOPER_SUPPORT'. You are encouraged to wrap calls to these new methods (in the GUI) in an appropriate #ifdef. Publicly released binaries probably SHOULD NOT have this stuff activated. - All change methods (except for NTSC/PAL switching) currently do a full system reset after making a change, so that the whole system will see the changes. This means that if you are playing a game and call one of these methods, the game will be reset. In the future, the core may be enhanced so that changes are detected without a full reset. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@121 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2002-11-09 23:29:51 +00:00
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::toggleTIABit(TIA::TIABit bit, const string& bitname, bool show)
{
bool result = ((TIA*)myMediaSource)->toggleBit(bit);
string message = bitname + (result ? " enabled" : " disabled");
myOSystem->frameBuffer().showMessage(message);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::enableBits(bool enable)
{
((TIA*)myMediaSource)->enableBits(enable);
string message = string("TIA bits") + (enable ? " enabled" : " disabled");
myOSystem->frameBuffer().showMessage(message);
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void Console::setDeveloperProperties()
{
Settings& settings = myOSystem->settings();
string s;
s = settings.getString("type");
if(s != "")
myProperties.set("Cartridge.Type", s);
s = settings.getString("ld");
if(s != "")
myProperties.set("Console.LeftDifficulty", s);
s = settings.getString("rd");
if(s != "")
myProperties.set("Console.RightDifficulty", s);
s = settings.getString("tv");
if(s != "")
myProperties.set("Console.TelevisionType", s);
s = settings.getString("lc");
if(s != "")
myProperties.set("Controller.Left", s);
s = settings.getString("rc");
if(s != "")
myProperties.set("Controller.Right", s);
s = settings.getString("bc");
if(s != "")
{
myProperties.set("Controller.Left", s);
myProperties.set("Controller.Right", s);
}
s = settings.getString("format");
if(s != "")
myProperties.set("Display.Format", s);
s = settings.getString("xstart");
if(s != "")
myProperties.set("Display.XStart", s);
s = settings.getString("ystart");
if(s != "")
myProperties.set("Display.YStart", s);
s = settings.getString("width");
if(s != "")
myProperties.set("Display.Width", s);
s = settings.getString("height");
if(s != "")
myProperties.set("Display.Height", s);
s = settings.getString("cpu");
if(s != "")
myProperties.set("Emulation.CPU", s);
s = settings.getString("hmove");
if(s != "")
myProperties.set("Emulation.HmoveBlanks", s);
}