2001-12-27 19:54:36 +00:00
|
|
|
//============================================================================
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
2015-12-29 19:22:46 +00:00
|
|
|
// Copyright (c) 1995-2016 by Bradford W. Mott, Stephen Anthony
|
2010-04-10 21:37:23 +00:00
|
|
|
// and the Stella Team
|
2001-12-27 19:54:36 +00:00
|
|
|
//
|
2010-01-10 03:23:32 +00:00
|
|
|
// See the file "License.txt" for information on usage and redistribution of
|
2001-12-27 19:54:36 +00:00
|
|
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|
|
|
//
|
2009-05-13 13:55:40 +00:00
|
|
|
// $Id$
|
2001-12-27 19:54:36 +00:00
|
|
|
//============================================================================
|
|
|
|
|
2006-12-28 18:31:27 +00:00
|
|
|
#include <cassert>
|
2002-11-09 23:29:51 +00:00
|
|
|
#include <iostream>
|
|
|
|
#include <sstream>
|
|
|
|
#include <fstream>
|
|
|
|
|
2006-06-09 02:45:11 +00:00
|
|
|
#include "AtariVox.hxx"
|
2001-12-27 19:54:36 +00:00
|
|
|
#include "Booster.hxx"
|
|
|
|
#include "Cart.hxx"
|
|
|
|
#include "Control.hxx"
|
2010-10-18 18:39:57 +00:00
|
|
|
#include "Cart.hxx"
|
2001-12-27 19:54:36 +00:00
|
|
|
#include "Driving.hxx"
|
|
|
|
#include "Event.hxx"
|
2003-09-04 16:50:48 +00:00
|
|
|
#include "EventHandler.hxx"
|
2001-12-27 19:54:36 +00:00
|
|
|
#include "Joystick.hxx"
|
|
|
|
#include "Keyboard.hxx"
|
2009-03-16 00:23:42 +00:00
|
|
|
#include "KidVid.hxx"
|
2010-02-23 14:49:12 +00:00
|
|
|
#include "Genesis.hxx"
|
2012-01-02 16:37:17 +00:00
|
|
|
#include "MindLink.hxx"
|
|
|
|
#include "CompuMate.hxx"
|
2009-05-17 19:30:10 +00:00
|
|
|
#include "M6502.hxx"
|
2001-12-27 19:54:36 +00:00
|
|
|
#include "M6532.hxx"
|
|
|
|
#include "Paddles.hxx"
|
|
|
|
#include "Props.hxx"
|
|
|
|
#include "PropsSet.hxx"
|
2008-04-29 15:13:16 +00:00
|
|
|
#include "SaveKey.hxx"
|
2003-09-04 16:50:48 +00:00
|
|
|
#include "Settings.hxx"
|
Huge changes across the map. Lets see if I can remember it all ...
There is now an SDL OpenGL port with filtering and alpha-blending.
It's a work in progress right now, but is already quite stable.
It's not as optimized as the software version yet, but this will
change as well. For now, you have to compile the SDL version in
either normal software mode or OpenGL mode. This will change
before the 1.4 release.
When entering menu mode, the emulation is now suspended. And when
pause is pressed, you can't enter menu mode. Because of these changes,
CPU use has dropped dramatically when viewing menus. This will benefit
all ports, since menus are now redrawn only when necessary, instead of
at the current framerate.
For a reference, on a Pentium-IV 2.4GHz, the software SDL version
maxes CPU usage at 9%, and the SDL OpenGL version at 13.5%. This is
at 60 fps and a zoomlevel of 4. While some small improvements can
(possibly) be made to the OpenGL version, I think we'll soon be hitting
the glass ceiling.
Work on the Porting.txt document is progressing, and I estimate it to
be 45% complete.
The Windows version still doesn't compile, and I still haven't looked
at it. Rest assured that it will be done before 1.4. There will be
a simultaneous release, even if the Linux versions are finished.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@200 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-06 22:22:33 +00:00
|
|
|
#include "Sound.hxx"
|
2001-12-27 19:54:36 +00:00
|
|
|
#include "Switches.hxx"
|
|
|
|
#include "System.hxx"
|
|
|
|
#include "TIA.hxx"
|
2008-05-12 22:40:26 +00:00
|
|
|
#include "TrackBall.hxx"
|
2003-10-17 18:02:16 +00:00
|
|
|
#include "FrameBuffer.hxx"
|
2005-02-21 02:23:57 +00:00
|
|
|
#include "OSystem.hxx"
|
2005-03-14 04:08:15 +00:00
|
|
|
#include "Menu.hxx"
|
2005-08-29 18:36:42 +00:00
|
|
|
#include "CommandMenu.hxx"
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
#include "Serializable.hxx"
|
2005-06-25 17:26:32 +00:00
|
|
|
#include "Version.hxx"
|
2001-12-27 19:54:36 +00:00
|
|
|
|
2006-12-15 16:43:12 +00:00
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2005-08-24 22:54:30 +00:00
|
|
|
#include "Debugger.hxx"
|
|
|
|
#endif
|
|
|
|
|
2005-11-27 00:17:16 +00:00
|
|
|
#ifdef CHEATCODE_SUPPORT
|
|
|
|
#include "CheatManager.hxx"
|
|
|
|
#endif
|
|
|
|
|
2010-10-18 18:39:57 +00:00
|
|
|
#include "Console.hxx"
|
|
|
|
|
2001-12-27 19:54:36 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2015-06-14 20:02:32 +00:00
|
|
|
Console::Console(OSystem& osystem, unique_ptr<Cartridge>& cart,
|
|
|
|
const Properties& props)
|
Some configure work:
- removed TEXTURES_ARE_DIRTY logic, and just recreate the GL textures
when a screenmode changes
- enable checking for machine type and if nasm is available
- logic to enable scaler mode only when in OpenGL mode (still not complete
and defaults to off)
First pass at adding scaler code to OpenGL. Still much work TODO,
but the C version is working correctly (asm is causing crashes,
haven't figured out why). GL quad coordinates aren't properly
set yet, so the image always appears in the upper left corner, and
is not scaled to the window size. CPU usage is also quite high,
but I'm on a 1GHz laptop with i950 GL, so that may explain it.
Fixed long-standing bug in software rendering, where switching to a
lower-res screen while a message is being displayed would cause a
segfault.
Large refactoring of mainSDL. Specifically, OSystem now owns all
the subsystems except for Settings, taking responsibility for creating
and destroying them.
Properties fixes for 'Tomarc the Barbarian' and 'Gyruss'.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1136 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-10-22 18:58:46 +00:00
|
|
|
: myOSystem(osystem),
|
2014-05-12 23:34:25 +00:00
|
|
|
myEvent(osystem.eventHandler().event()),
|
2006-12-28 18:31:27 +00:00
|
|
|
myProperties(props),
|
2015-06-14 20:02:32 +00:00
|
|
|
myCart(std::move(cart)),
|
2012-12-17 22:04:20 +00:00
|
|
|
myDisplayFormat(""), // Unknown TV format @ start
|
|
|
|
myFramerate(0.0), // Unknown framerate @ start
|
|
|
|
myCurrentFormat(0), // Unknown format @ start
|
2006-12-26 17:06:01 +00:00
|
|
|
myUserPaletteDefined(false)
|
2001-12-27 19:54:36 +00:00
|
|
|
{
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
// Load user-defined palette for this ROM
|
2006-11-25 01:34:35 +00:00
|
|
|
loadUserPalette();
|
|
|
|
|
2014-11-03 16:24:05 +00:00
|
|
|
// Create subsystems for the console
|
|
|
|
my6502 = make_ptr<M6502>(myOSystem.settings());
|
|
|
|
myRiot = make_ptr<M6532>(*this, myOSystem.settings());
|
|
|
|
myTIA = make_ptr<TIA>(*this, myOSystem.sound(), myOSystem.settings());
|
2014-11-02 23:40:20 +00:00
|
|
|
mySwitches = make_ptr<Switches>(myEvent, myProperties);
|
2008-04-13 23:43:14 +00:00
|
|
|
|
|
|
|
// Construct the system and components
|
2014-11-03 16:24:05 +00:00
|
|
|
mySystem = make_ptr<System>(osystem, *my6502, *myRiot, *myTIA, *myCart);
|
2008-04-13 23:43:14 +00:00
|
|
|
|
2012-01-13 21:13:10 +00:00
|
|
|
// The real controllers for this console will be added later
|
|
|
|
// For now, we just add dummy joystick controllers, since autodetection
|
|
|
|
// runs the emulation for a while, and this may interfere with 'smart'
|
|
|
|
// controllers such as the AVox and SaveKey
|
2014-11-04 00:34:56 +00:00
|
|
|
myLeftControl = make_ptr<Joystick>(Controller::Left, myEvent, *mySystem);
|
|
|
|
myRightControl = make_ptr<Joystick>(Controller::Right, myEvent, *mySystem);
|
2008-05-19 02:53:58 +00:00
|
|
|
|
2014-11-03 16:24:05 +00:00
|
|
|
// We can only initialize after all the devices/components have been created
|
|
|
|
mySystem->initialize();
|
2008-04-13 23:43:14 +00:00
|
|
|
|
2006-12-26 00:39:44 +00:00
|
|
|
// Auto-detect NTSC/PAL mode if it's requested
|
2009-02-01 22:17:09 +00:00
|
|
|
string autodetected = "";
|
2006-12-26 00:39:44 +00:00
|
|
|
myDisplayFormat = myProperties.get(Display_Format);
|
2014-05-12 23:34:25 +00:00
|
|
|
if(myDisplayFormat == "AUTO" || myOSystem.settings().getBool("rominfo"))
|
2006-12-26 00:39:44 +00:00
|
|
|
{
|
2012-01-17 22:20:20 +00:00
|
|
|
// Run the TIA, looking for PAL scanline patterns
|
2009-06-09 14:27:21 +00:00
|
|
|
// We turn off the SuperCharger progress bars, otherwise the SC BIOS
|
|
|
|
// will take over 250 frames!
|
|
|
|
// The 'fastscbios' option must be changed before the system is reset
|
2014-05-12 23:34:25 +00:00
|
|
|
bool fastscbios = myOSystem.settings().getBool("fastscbios");
|
|
|
|
myOSystem.settings().setValue("fastscbios", true);
|
2011-05-24 16:04:48 +00:00
|
|
|
mySystem->reset(true); // autodetect in reset enabled
|
2006-12-26 17:06:01 +00:00
|
|
|
for(int i = 0; i < 60; ++i)
|
2009-01-19 16:52:32 +00:00
|
|
|
myTIA->update();
|
2012-06-05 16:32:35 +00:00
|
|
|
myDisplayFormat = myTIA->isPAL() ? "PAL" : "NTSC";
|
2012-07-14 18:56:57 +00:00
|
|
|
if(myProperties.get(Display_Format) == "AUTO")
|
2012-06-05 16:32:35 +00:00
|
|
|
{
|
2009-02-01 22:17:09 +00:00
|
|
|
autodetected = "*";
|
2012-06-05 16:32:35 +00:00
|
|
|
myCurrentFormat = 0;
|
|
|
|
}
|
2009-06-09 14:27:21 +00:00
|
|
|
|
|
|
|
// Don't forget to reset the SC progress bars again
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.settings().setValue("fastscbios", fastscbios);
|
2006-12-26 00:39:44 +00:00
|
|
|
}
|
2009-02-01 22:17:09 +00:00
|
|
|
myConsoleInfo.DisplayFormat = myDisplayFormat + autodetected;
|
2006-12-26 00:39:44 +00:00
|
|
|
|
Added 'gl_texrect' commandline argument, which toggles use of the
GL_TEXTURE_RECTANGLE OpenGL extension. For now, this will default to
off, since some people are having OpenGL issues that I can't seem to
track down.
Added NTSC50 and SECAM60 modes. Switching between formats will now
use the current scanline count. So, if we're on a 60Hz/262 scanline
cart, the switchable formats are NTSC, PAL60, SECAM60. Otherwise,
the formats are NTSC50, PAL, SECAM. This makes the switching of cart
format act more like z26, where only the palette is changed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1369 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-09-10 15:47:00 +00:00
|
|
|
// Set up the correct properties used when toggling format
|
|
|
|
// Note that this can be overridden if a format is forced
|
|
|
|
// For example, if a PAL ROM is forced to be NTSC, it will use NTSC-like
|
2012-06-05 16:32:35 +00:00
|
|
|
// properties (60Hz, 262 scanlines, etc), but likely result in flicker
|
2008-05-21 21:36:18 +00:00
|
|
|
// The TIA will self-adjust the framerate if necessary
|
2012-06-05 16:32:35 +00:00
|
|
|
setTIAProperties();
|
|
|
|
if(myDisplayFormat == "NTSC") myCurrentFormat = 1;
|
|
|
|
else if(myDisplayFormat == "PAL") myCurrentFormat = 2;
|
|
|
|
else if(myDisplayFormat == "SECAM") myCurrentFormat = 3;
|
|
|
|
else if(myDisplayFormat == "NTSC50") myCurrentFormat = 4;
|
|
|
|
else if(myDisplayFormat == "PAL60") myCurrentFormat = 5;
|
|
|
|
else if(myDisplayFormat == "SECAM60") myCurrentFormat = 6;
|
2006-12-26 00:39:44 +00:00
|
|
|
|
2012-01-13 21:13:10 +00:00
|
|
|
// Add the real controllers for this system
|
|
|
|
// This must be done before the debugger is initialized
|
|
|
|
const string& md5 = myProperties.get(Cartridge_MD5);
|
|
|
|
setControllers(md5);
|
|
|
|
|
|
|
|
// Bumper Bash always requires all 4 directions
|
|
|
|
// Other ROMs can use it if the setting is enabled
|
|
|
|
bool joyallow4 = md5 == "aa1c41f86ec44c0a44eb64c332ce08af" ||
|
|
|
|
md5 == "1bf503c724001b09be79c515ecfcbd03" ||
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.settings().getBool("joyallow4");
|
|
|
|
myOSystem.eventHandler().allowAllDirections(joyallow4);
|
2012-01-13 21:13:10 +00:00
|
|
|
|
2008-05-08 20:23:31 +00:00
|
|
|
// Reset the system to its power-on state
|
|
|
|
mySystem->reset();
|
2012-01-13 21:13:10 +00:00
|
|
|
|
2009-01-01 00:08:59 +00:00
|
|
|
// Finally, add remaining info about the console
|
|
|
|
myConsoleInfo.CartName = myProperties.get(Cartridge_Name);
|
|
|
|
myConsoleInfo.CartMD5 = myProperties.get(Cartridge_MD5);
|
2014-11-04 00:34:56 +00:00
|
|
|
myConsoleInfo.Control0 = myLeftControl->about();
|
|
|
|
myConsoleInfo.Control1 = myRightControl->about();
|
2014-11-03 16:24:05 +00:00
|
|
|
myConsoleInfo.BankSwitch = myCart->about();
|
2012-04-14 19:28:53 +00:00
|
|
|
|
2014-11-03 16:24:05 +00:00
|
|
|
myCart->setRomName(myConsoleInfo.CartName);
|
2001-12-27 19:54:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
Console::~Console()
|
|
|
|
{
|
Broke the dependency between the FrameBuffer and Sound classes
wrt to the MediaSource.
Previously, in the main run loop for a port, you had to call
FrameBuffer::update and then
Sound::updateSound(FrameBuffer::MediaSource). Now, you can call
FrameBuffer::update() and then Sound::update(). But since the
ordering here is important, I've introduced a Console::update()
that does it all. So the main run loop for each port just
got a bit simpler.
Also changed around the Snapshot class a bit. All this is to
reinforce the fact that the MediaSource is owned by the core,
and the FrameBuffer, Sound, and Snapshot classes make use of
it. Previously, it seemed as if the FrameBuffer owned the
MediaSource.
I'm finding all these little inconsistencies because of
writing the Porting.txt document, and trying to explain
why something is being done a certain way (and if I
can't explain it, I rewrite it). So if for no other
reason, the Porting.txt document has already been
valuable.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@214 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2003-11-19 15:57:11 +00:00
|
|
|
}
|
|
|
|
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
bool Console::save(Serializer& out) const
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// First save state for the system
|
|
|
|
if(!mySystem->save(out))
|
|
|
|
return false;
|
|
|
|
|
2012-01-14 17:12:25 +00:00
|
|
|
// Now save the console controllers and switches
|
2014-11-04 00:34:56 +00:00
|
|
|
if(!(myLeftControl->save(out) && myRightControl->save(out) &&
|
2012-01-14 17:12:25 +00:00
|
|
|
mySwitches->save(out)))
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
return false;
|
|
|
|
}
|
2012-05-25 12:41:19 +00:00
|
|
|
catch(...)
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
{
|
2012-05-25 12:41:19 +00:00
|
|
|
cerr << "ERROR: Console::save" << endl;
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true; // success
|
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
OK, this looks like a huge update, but it's only because of some Serializer
class reworking. Serializer class now handles read/write of state from
files as well as in-memory streams. As a result, Deserializer class has
been removed.
Added state rewinding to the debugger. For now, this is limited to 100
levels of undo, with a new state generated each time a step/trace/frame/
scanline advance is performed. The undo level is 'rolling', in that it
remembers the last 100 levels (so you lose the oldest states when you
start adding more than 100). For now, this is tied to the 'Alt-r' key
in the debugger. Still TODO is add a button for it, and clean up some
TIA output issues when rewinding.
Added support for 6K version of Supercharger ROMs (this fixes issues
with the 6K version of Cubis).
Cleaned up the Serializable infrastructure, making sure that all
classes that need to implement it actually do so now.
Fixed issue with editable widgets in the UI, where pressing Enter
on the keypad wasn't actually being registered.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1849 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2009-08-05 16:05:34 +00:00
|
|
|
bool Console::load(Serializer& in)
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
// First load state for the system
|
|
|
|
if(!mySystem->load(in))
|
|
|
|
return false;
|
|
|
|
|
2012-01-14 17:12:25 +00:00
|
|
|
// Then load the console controllers and switches
|
2014-11-04 00:34:56 +00:00
|
|
|
if(!(myLeftControl->load(in) && myRightControl->load(in) &&
|
2012-01-14 17:12:25 +00:00
|
|
|
mySwitches->load(in)))
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
return false;
|
|
|
|
}
|
2012-05-25 12:41:19 +00:00
|
|
|
catch(...)
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
{
|
2012-05-25 12:41:19 +00:00
|
|
|
cerr << "ERROR: Console::load" << endl;
|
OK, another huge commit. I need to commit this now, because things are
starting to go out of sync on my development machines. OK, where to
begin ...
Changed state file format, so older state files will no longer work. The
changes aren't finalized yet, so expect more breakage.
Added getByte() and putByte() methods to serialized data, resulting in
smaller state files (previously, 1-byte values were stored as 4-byte ints).
Totally reworked controller handling code. Controller state is now
explicitly set with an ::update() method, making it easier to serialize.
Some work is still required on the serialization stuff for more advanced
controllers.
Added a 'Serializable' interface to all carts, device, controllers, etc
that can be (de)serialized. This fixes a long-standing design issue
which I personally caused many years ago.
Console switches state (SWCHB register) is now saved to state files.
Added beginnings of movie support. Basically, this saves an initial
state file, and thereafter continuously saves controller and console
switches state. Support is still somewhat rough and there's no UI for
it, but it does successfully save and later load/play state movies.
Removed specific events for driving controllers, and have them use
joystick events instead. This has the nice side effect that
joystick direction remapping 'just works' for driving controllers too.
Fixed issues with paddle emulation seen in 'Night Driver' ROM. Related
to this, removed a hack wrt paddles when grabmouse is enabled. There's
still some work to do when using the mouse to emulate paddles, but the
Stelladaptor and real paddles work fine.
Added beginnings of TrackBall CX-22 controller emulation. It doesn't
actually do anything yet, but the class is there :)
Probably some other stuff that I'm forgetting ...
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1385 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-10-03 21:41:19 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return true; // success
|
|
|
|
}
|
|
|
|
|
2002-11-09 23:29:51 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2012-06-05 16:32:35 +00:00
|
|
|
void Console::toggleFormat(int direction)
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2012-06-05 16:32:35 +00:00
|
|
|
string saveformat, message;
|
Added 'gl_texrect' commandline argument, which toggles use of the
GL_TEXTURE_RECTANGLE OpenGL extension. For now, this will default to
off, since some people are having OpenGL issues that I can't seem to
track down.
Added NTSC50 and SECAM60 modes. Switching between formats will now
use the current scanline count. So, if we're on a 60Hz/262 scanline
cart, the switchable formats are NTSC, PAL60, SECAM60. Otherwise,
the formats are NTSC50, PAL, SECAM. This makes the switching of cart
format act more like z26, where only the palette is changed.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1369 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2007-09-10 15:47:00 +00:00
|
|
|
|
2012-06-05 16:32:35 +00:00
|
|
|
if(direction == 1)
|
|
|
|
myCurrentFormat = (myCurrentFormat + 1) % 7;
|
|
|
|
else if(direction == -1)
|
|
|
|
myCurrentFormat = myCurrentFormat > 0 ? (myCurrentFormat - 1) : 6;
|
|
|
|
|
|
|
|
switch(myCurrentFormat)
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2012-06-05 16:32:35 +00:00
|
|
|
case 0: // auto-detect
|
|
|
|
myTIA->update();
|
|
|
|
myDisplayFormat = myTIA->isPAL() ? "PAL" : "NTSC";
|
|
|
|
message = "Auto-detect mode: " + myDisplayFormat;
|
2012-07-14 18:56:57 +00:00
|
|
|
saveformat = "AUTO";
|
2012-06-05 16:32:35 +00:00
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
saveformat = myDisplayFormat = "NTSC";
|
|
|
|
message = "NTSC mode";
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
saveformat = myDisplayFormat = "PAL";
|
|
|
|
message = "PAL mode";
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
saveformat = myDisplayFormat = "SECAM";
|
|
|
|
message = "SECAM mode";
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
saveformat = myDisplayFormat = "NTSC50";
|
|
|
|
message = "NTSC50 mode";
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
saveformat = myDisplayFormat = "PAL60";
|
|
|
|
message = "PAL60 mode";
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
saveformat = myDisplayFormat = "SECAM60";
|
|
|
|
message = "SECAM60 mode";
|
|
|
|
break;
|
2002-11-09 23:29:51 +00:00
|
|
|
}
|
2012-06-05 16:32:35 +00:00
|
|
|
myProperties.set(Display_Format, saveformat);
|
2006-12-26 02:09:29 +00:00
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
setPalette(myOSystem.settings().getString("palette"));
|
2012-06-05 16:32:35 +00:00
|
|
|
setTIAProperties();
|
|
|
|
myTIA->frameReset();
|
|
|
|
initializeVideo(); // takes care of refreshing the screen
|
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2002-11-09 23:29:51 +00:00
|
|
|
}
|
|
|
|
|
2006-12-26 17:06:01 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::toggleColorLoss()
|
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
bool colorloss = !myOSystem.settings().getBool("colorloss");
|
|
|
|
myOSystem.settings().setValue("colorloss", colorloss);
|
2009-09-01 11:54:59 +00:00
|
|
|
myTIA->enableColorLoss(colorloss);
|
2006-12-26 17:06:01 +00:00
|
|
|
|
|
|
|
string message = string("PAL color-loss ") +
|
|
|
|
(colorloss ? "enabled" : "disabled");
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2006-12-26 17:06:01 +00:00
|
|
|
}
|
|
|
|
|
2012-01-17 22:20:20 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::toggleColorLoss(bool state)
|
|
|
|
{
|
|
|
|
myTIA->enableColorLoss(state);
|
|
|
|
}
|
|
|
|
|
2002-11-09 23:29:51 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-11-25 01:34:35 +00:00
|
|
|
void Console::togglePalette()
|
2003-12-04 19:18:45 +00:00
|
|
|
{
|
2006-11-25 01:34:35 +00:00
|
|
|
string palette, message;
|
2014-05-12 23:34:25 +00:00
|
|
|
palette = myOSystem.settings().getString("palette");
|
2015-12-04 19:08:14 +00:00
|
|
|
|
2007-07-27 13:49:16 +00:00
|
|
|
if(palette == "standard") // switch to z26
|
2003-12-04 19:18:45 +00:00
|
|
|
{
|
2006-11-25 01:34:35 +00:00
|
|
|
palette = "z26";
|
2006-11-27 02:18:47 +00:00
|
|
|
message = "Z26 palette";
|
2003-12-04 19:18:45 +00:00
|
|
|
}
|
2006-11-25 01:34:35 +00:00
|
|
|
else if(palette == "z26") // switch to user or standard
|
2003-12-04 19:18:45 +00:00
|
|
|
{
|
2006-11-25 01:34:35 +00:00
|
|
|
// If we have a user-defined palette, it will come next in
|
|
|
|
// the sequence; otherwise loop back to the standard one
|
|
|
|
if(myUserPaletteDefined)
|
|
|
|
{
|
|
|
|
palette = "user";
|
2006-11-27 02:18:47 +00:00
|
|
|
message = "User-defined palette";
|
2006-11-25 01:34:35 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
palette = "standard";
|
2006-11-27 02:18:47 +00:00
|
|
|
message = "Standard Stella palette";
|
2006-11-25 01:34:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(palette == "user") // switch to standard
|
|
|
|
{
|
|
|
|
palette = "standard";
|
2006-11-27 02:18:47 +00:00
|
|
|
message = "Standard Stella palette";
|
2003-12-04 19:18:45 +00:00
|
|
|
}
|
|
|
|
else // switch to standard mode if we get this far
|
|
|
|
{
|
2006-11-25 01:34:35 +00:00
|
|
|
palette = "standard";
|
2006-11-27 02:18:47 +00:00
|
|
|
message = "Standard Stella palette";
|
2003-12-04 19:18:45 +00:00
|
|
|
}
|
2005-03-14 04:08:15 +00:00
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.settings().setValue("palette", palette);
|
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2005-05-05 00:10:49 +00:00
|
|
|
|
2006-11-25 01:34:35 +00:00
|
|
|
setPalette(palette);
|
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::setPalette(const string& type)
|
|
|
|
{
|
2007-07-27 13:49:16 +00:00
|
|
|
// Look at all the palettes, since we don't know which one is
|
|
|
|
// currently active
|
2013-09-13 10:46:21 +00:00
|
|
|
static uInt32* palettes[3][3] = {
|
|
|
|
{ &ourNTSCPalette[0], &ourPALPalette[0], &ourSECAMPalette[0] },
|
|
|
|
{ &ourNTSCPaletteZ26[0], &ourPALPaletteZ26[0], &ourSECAMPaletteZ26[0] },
|
|
|
|
{ &ourUserNTSCPalette[0], &ourUserPALPalette[0], &ourUserSECAMPalette[0] }
|
2007-07-27 13:49:16 +00:00
|
|
|
};
|
|
|
|
|
2006-11-25 01:34:35 +00:00
|
|
|
// See which format we should be using
|
2007-07-27 13:49:16 +00:00
|
|
|
int paletteNum = 0;
|
2006-11-25 01:34:35 +00:00
|
|
|
if(type == "standard")
|
2007-07-27 13:49:16 +00:00
|
|
|
paletteNum = 0;
|
2006-11-25 01:34:35 +00:00
|
|
|
else if(type == "z26")
|
2007-07-27 13:49:16 +00:00
|
|
|
paletteNum = 1;
|
2006-11-25 01:34:35 +00:00
|
|
|
else if(type == "user" && myUserPaletteDefined)
|
2007-07-27 13:49:16 +00:00
|
|
|
paletteNum = 2;
|
2006-11-25 01:34:35 +00:00
|
|
|
|
2007-07-27 13:49:16 +00:00
|
|
|
// Now consider the current display format
|
|
|
|
const uInt32* palette =
|
|
|
|
(myDisplayFormat.compare(0, 3, "PAL") == 0) ? palettes[paletteNum][1] :
|
|
|
|
(myDisplayFormat.compare(0, 5, "SECAM") == 0) ? palettes[paletteNum][2] :
|
|
|
|
palettes[paletteNum][0];
|
2006-11-25 01:34:35 +00:00
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().setPalette(palette);
|
2003-12-04 19:18:45 +00:00
|
|
|
}
|
|
|
|
|
2006-01-11 14:13:19 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::togglePhosphor()
|
|
|
|
{
|
2006-03-05 01:18:42 +00:00
|
|
|
const string& phosphor = myProperties.get(Display_Phosphor);
|
2006-11-04 19:38:25 +00:00
|
|
|
int blend = atoi(myProperties.get(Display_PPBlend).c_str());
|
2006-01-11 14:13:19 +00:00
|
|
|
bool enable;
|
|
|
|
if(phosphor == "YES")
|
|
|
|
{
|
2006-03-05 01:18:42 +00:00
|
|
|
myProperties.set(Display_Phosphor, "No");
|
2006-01-11 14:13:19 +00:00
|
|
|
enable = false;
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Phosphor effect disabled");
|
2006-01-11 14:13:19 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-03-05 01:18:42 +00:00
|
|
|
myProperties.set(Display_Phosphor, "Yes");
|
2006-01-11 14:13:19 +00:00
|
|
|
enable = true;
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Phosphor effect enabled");
|
2006-01-11 14:13:19 +00:00
|
|
|
}
|
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().tiaSurface().enablePhosphor(enable, blend);
|
2006-01-11 14:13:19 +00:00
|
|
|
}
|
|
|
|
|
Changed some things wrt DEVELOPER_SUPPORT. The only extra things which are
now activated when Stella is built with DEVELOPER_SUPPORT is the ability
to change Xstart, Ystart, Width, and Height. Specifically, the ability
to change NTSC/PAL mode, toggle different palettes, and save/merge changes
into the properties file is now standard in all ports, and is *not* strictly
a developer-only thing. So that means that people who use a version of
Stella compiled without DEVELOPER_SUPPORT won't really miss much (the above
features are used by very few people).
Removed the commandline arguments -Dxxx, since they haven't worked for quite
some time anyway, and I doubt that many people really use them. Besides,
there are still keyboard shortcuts to do the same thing. To any developers
who don't want to see these things disappear; the next version of Stella
will include a debugger, and _that's_ the proper place to put those things.
Removed starting and ending '|' characters from the -listrominfo output,
since parsers have an easier time when those are present only _between_
elements, not at the beginning and end.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@297 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-07-07 22:46:01 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-12-01 18:30:21 +00:00
|
|
|
void Console::setProperties(const Properties& props)
|
Changed some things wrt DEVELOPER_SUPPORT. The only extra things which are
now activated when Stella is built with DEVELOPER_SUPPORT is the ability
to change Xstart, Ystart, Width, and Height. Specifically, the ability
to change NTSC/PAL mode, toggle different palettes, and save/merge changes
into the properties file is now standard in all ports, and is *not* strictly
a developer-only thing. So that means that people who use a version of
Stella compiled without DEVELOPER_SUPPORT won't really miss much (the above
features are used by very few people).
Removed the commandline arguments -Dxxx, since they haven't worked for quite
some time anyway, and I doubt that many people really use them. Besides,
there are still keyboard shortcuts to do the same thing. To any developers
who don't want to see these things disappear; the next version of Stella
will include a debugger, and _that's_ the proper place to put those things.
Removed starting and ending '|' characters from the -listrominfo output,
since parsers have an easier time when those are present only _between_
elements, not at the beginning and end.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@297 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-07-07 22:46:01 +00:00
|
|
|
{
|
2006-12-01 18:30:21 +00:00
|
|
|
myProperties = props;
|
Changed some things wrt DEVELOPER_SUPPORT. The only extra things which are
now activated when Stella is built with DEVELOPER_SUPPORT is the ability
to change Xstart, Ystart, Width, and Height. Specifically, the ability
to change NTSC/PAL mode, toggle different palettes, and save/merge changes
into the properties file is now standard in all ports, and is *not* strictly
a developer-only thing. So that means that people who use a version of
Stella compiled without DEVELOPER_SUPPORT won't really miss much (the above
features are used by very few people).
Removed the commandline arguments -Dxxx, since they haven't worked for quite
some time anyway, and I doubt that many people really use them. Besides,
there are still keyboard shortcuts to do the same thing. To any developers
who don't want to see these things disappear; the next version of Stella
will include a debugger, and _that's_ the proper place to put those things.
Removed starting and ending '|' characters from the -listrominfo output,
since parsers have an easier time when those are present only _between_
elements, not at the beginning and end.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@297 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2004-07-07 22:46:01 +00:00
|
|
|
}
|
|
|
|
|
2006-10-16 01:09:00 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2010-07-22 15:41:46 +00:00
|
|
|
FBInitStatus Console::initializeVideo(bool full)
|
2006-10-16 01:09:00 +00:00
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
setPalette(myOSystem.settings().getString("palette"));
|
|
|
|
|
2010-07-22 15:41:46 +00:00
|
|
|
FBInitStatus fbstatus = kSuccess;
|
|
|
|
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
if(full)
|
2006-10-16 01:09:00 +00:00
|
|
|
{
|
2010-09-21 19:39:30 +00:00
|
|
|
const string& title = string("Stella ") + STELLA_VERSION +
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
": \"" + myProperties.get(Cartridge_Name) + "\"";
|
2014-05-12 23:34:25 +00:00
|
|
|
fbstatus = myOSystem.frameBuffer().createDisplay(title,
|
2010-07-22 15:41:46 +00:00
|
|
|
myTIA->width() << 1, myTIA->height());
|
|
|
|
if(fbstatus != kSuccess)
|
|
|
|
return fbstatus;
|
2009-09-01 11:54:59 +00:00
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showFrameStats(myOSystem.settings().getBool("stats"));
|
|
|
|
generateColorLossPalette();
|
2006-10-16 01:09:00 +00:00
|
|
|
}
|
|
|
|
|
2008-05-21 14:01:31 +00:00
|
|
|
// 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 determined based on number of scanlines).
|
2014-05-12 23:34:25 +00:00
|
|
|
int framerate = myOSystem.settings().getInt("framerate");
|
2008-06-20 12:19:42 +00:00
|
|
|
if(framerate > 0) myFramerate = float(framerate);
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.setFramerate(myFramerate);
|
2008-05-21 14:01:31 +00:00
|
|
|
|
|
|
|
// Make sure auto-frame calculation is only enabled when necessary
|
2009-01-19 16:52:32 +00:00
|
|
|
myTIA->enableAutoFrame(framerate <= 0);
|
2008-05-30 19:07:55 +00:00
|
|
|
|
2010-07-22 15:41:46 +00:00
|
|
|
return fbstatus;
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::initializeAudio()
|
|
|
|
{
|
2006-10-16 01:09:00 +00:00
|
|
|
// Initialize the sound interface.
|
|
|
|
// The # of channels can be overridden in the AudioDialog box or on
|
|
|
|
// the commandline, but it can't be saved.
|
2014-05-12 23:34:25 +00:00
|
|
|
int framerate = myOSystem.settings().getInt("framerate");
|
2008-06-20 12:19:42 +00:00
|
|
|
if(framerate > 0) myFramerate = float(framerate);
|
2006-11-19 20:59:30 +00:00
|
|
|
const string& sound = myProperties.get(Cartridge_Sound);
|
2006-10-16 01:09:00 +00:00
|
|
|
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.sound().close();
|
|
|
|
myOSystem.sound().setChannels(sound == "STEREO" ? 2 : 1);
|
|
|
|
myOSystem.sound().setFrameRate(myFramerate);
|
|
|
|
myOSystem.sound().open();
|
2008-05-21 14:01:31 +00:00
|
|
|
|
|
|
|
// Make sure auto-frame calculation is only enabled when necessary
|
2009-01-19 16:52:32 +00:00
|
|
|
myTIA->enableAutoFrame(framerate <= 0);
|
2005-09-23 23:35:02 +00:00
|
|
|
}
|
|
|
|
|
2005-07-03 01:36:40 +00:00
|
|
|
/* 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.
|
|
|
|
*/
|
2014-05-12 23:34:25 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-12-28 18:31:27 +00:00
|
|
|
void Console::fry() const
|
2005-06-29 00:31:49 +00:00
|
|
|
{
|
2015-12-10 16:34:24 +00:00
|
|
|
for(int i = 0; i < 0x100; i += mySystem->randGenerator().next() % 4)
|
|
|
|
mySystem->poke(i, mySystem->peek(i) & mySystem->randGenerator().next());
|
2005-06-29 00:31:49 +00:00
|
|
|
}
|
|
|
|
|
2002-11-09 23:29:51 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-03-25 00:34:17 +00:00
|
|
|
void Console::changeYStart(int direction)
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2010-09-21 19:39:30 +00:00
|
|
|
uInt32 ystart = myTIA->ystart();
|
2002-11-09 23:29:51 +00:00
|
|
|
|
2010-09-21 19:39:30 +00:00
|
|
|
if(direction == +1) // increase YStart
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2012-03-16 13:19:29 +00:00
|
|
|
if(ystart >= 64)
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("YStart at maximum");
|
2002-11-09 23:29:51 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-16 13:19:29 +00:00
|
|
|
ystart++;
|
2002-11-09 23:29:51 +00:00
|
|
|
}
|
2006-03-25 00:34:17 +00:00
|
|
|
else if(direction == -1) // decrease YStart
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2012-03-16 13:19:29 +00:00
|
|
|
if(ystart == 0)
|
2002-11-09 23:29:51 +00:00
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("YStart at minimum");
|
2002-11-09 23:29:51 +00:00
|
|
|
return;
|
|
|
|
}
|
2012-03-16 13:19:29 +00:00
|
|
|
ystart--;
|
2002-11-09 23:29:51 +00:00
|
|
|
}
|
2006-03-25 00:34:17 +00:00
|
|
|
else
|
|
|
|
return;
|
2002-11-09 23:29:51 +00:00
|
|
|
|
2010-09-21 19:39:30 +00:00
|
|
|
myTIA->setYStart(ystart);
|
2009-01-19 16:52:32 +00:00
|
|
|
myTIA->frameReset();
|
2002-11-09 23:29:51 +00:00
|
|
|
|
2010-09-21 19:39:30 +00:00
|
|
|
ostringstream val;
|
|
|
|
val << ystart;
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("YStart " + val.str());
|
2010-09-21 19:39:30 +00:00
|
|
|
myProperties.set(Display_YStart, val.str());
|
2002-11-09 23:29:51 +00:00
|
|
|
}
|
|
|
|
|
2006-12-28 18:31:27 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::changeHeight(int direction)
|
|
|
|
{
|
2010-09-21 19:39:30 +00:00
|
|
|
uInt32 height = myTIA->height();
|
2014-05-12 23:34:25 +00:00
|
|
|
uInt32 dheight = myOSystem.frameBuffer().desktopSize().h;
|
2006-12-28 18:31:27 +00:00
|
|
|
|
2010-09-21 19:39:30 +00:00
|
|
|
if(direction == +1) // increase Height
|
2006-12-28 18:31:27 +00:00
|
|
|
{
|
|
|
|
height++;
|
2014-04-29 14:52:35 +00:00
|
|
|
if(height > 256 || height > dheight)
|
2006-12-28 18:31:27 +00:00
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Height at maximum");
|
2006-12-28 18:31:27 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(direction == -1) // decrease Height
|
|
|
|
{
|
|
|
|
height--;
|
2010-09-21 19:39:30 +00:00
|
|
|
if(height < 210)
|
2006-12-28 18:31:27 +00:00
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Height at minimum");
|
2006-12-28 18:31:27 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return;
|
|
|
|
|
2010-09-21 19:39:30 +00:00
|
|
|
myTIA->setHeight(height);
|
2009-01-19 16:52:32 +00:00
|
|
|
myTIA->frameReset();
|
2007-01-06 16:21:31 +00:00
|
|
|
initializeVideo(); // takes care of refreshing the screen
|
2006-12-28 18:31:27 +00:00
|
|
|
|
2010-09-21 19:39:30 +00:00
|
|
|
ostringstream val;
|
|
|
|
val << height;
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Height " + val.str());
|
2010-09-21 19:39:30 +00:00
|
|
|
myProperties.set(Display_Height, val.str());
|
2006-12-28 18:31:27 +00:00
|
|
|
}
|
|
|
|
|
2012-06-05 16:32:35 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::setTIAProperties()
|
|
|
|
{
|
|
|
|
// TODO - query these values directly from the TIA if value is 'AUTO'
|
|
|
|
uInt32 ystart = atoi(myProperties.get(Display_YStart).c_str());
|
|
|
|
if(ystart > 64) ystart = 64;
|
|
|
|
uInt32 height = atoi(myProperties.get(Display_Height).c_str());
|
|
|
|
if(height < 210) height = 210;
|
|
|
|
else if(height > 256) height = 256;
|
|
|
|
|
|
|
|
if(myDisplayFormat == "NTSC" || myDisplayFormat == "PAL60" ||
|
|
|
|
myDisplayFormat == "SECAM60")
|
|
|
|
{
|
|
|
|
// Assume we've got ~262 scanlines (NTSC-like format)
|
|
|
|
myFramerate = 60.0;
|
|
|
|
myConsoleInfo.InitialFrameRate = "60";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Assume we've got ~312 scanlines (PAL-like format)
|
|
|
|
myFramerate = 50.0;
|
|
|
|
myConsoleInfo.InitialFrameRate = "50";
|
|
|
|
|
|
|
|
// PAL ROMs normally need at least 250 lines
|
|
|
|
height = BSPF_max(height, 250u);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Make sure these values fit within the bounds of the desktop
|
|
|
|
// If not, attempt to center vertically
|
2014-05-12 23:34:25 +00:00
|
|
|
uInt32 dheight = myOSystem.frameBuffer().desktopSize().h;
|
2014-04-29 14:52:35 +00:00
|
|
|
if(height > dheight)
|
2012-06-05 16:32:35 +00:00
|
|
|
{
|
2014-04-29 14:52:35 +00:00
|
|
|
ystart += height - dheight;
|
2012-06-05 16:32:35 +00:00
|
|
|
ystart = BSPF_min(ystart, 64u);
|
2014-04-29 14:52:35 +00:00
|
|
|
height = dheight;
|
2012-06-05 16:32:35 +00:00
|
|
|
}
|
2012-12-17 22:04:20 +00:00
|
|
|
myTIA->setYStart(ystart);
|
|
|
|
myTIA->setHeight(height);
|
2012-06-05 16:32:35 +00:00
|
|
|
}
|
|
|
|
|
2008-05-08 20:23:31 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2009-03-16 00:23:42 +00:00
|
|
|
void Console::setControllers(const string& rommd5)
|
2008-05-08 20:23:31 +00:00
|
|
|
{
|
|
|
|
// Setup the controllers based on properties
|
|
|
|
const string& left = myProperties.get(Controller_Left);
|
|
|
|
const string& right = myProperties.get(Controller_Right);
|
|
|
|
|
2012-03-14 01:19:23 +00:00
|
|
|
// Check for CompuMate controllers; they are special in that a handler
|
|
|
|
// creates them for us, and also that they must be used in both ports
|
|
|
|
if(left == "COMPUMATE" || right == "COMPUMATE")
|
|
|
|
{
|
2014-11-04 23:26:23 +00:00
|
|
|
myCMHandler = make_shared<CompuMate>(*this, myEvent, *mySystem);
|
2014-11-04 00:34:56 +00:00
|
|
|
|
|
|
|
// A somewhat ugly bit of code that casts to CartridgeCM to
|
|
|
|
// add the CompuMate, and then back again for the actual
|
|
|
|
// Cartridge
|
|
|
|
unique_ptr<CartridgeCM> cartcm(static_cast<CartridgeCM*>(myCart.release()));
|
2014-11-04 23:26:23 +00:00
|
|
|
cartcm->setCompuMate(myCMHandler);
|
2014-11-04 00:34:56 +00:00
|
|
|
myCart = std::move(cartcm);
|
|
|
|
|
2014-11-04 23:26:23 +00:00
|
|
|
myLeftControl = std::move(myCMHandler->leftController());
|
|
|
|
myRightControl = std::move(myCMHandler->rightController());
|
2012-03-14 01:19:23 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-11-04 00:34:56 +00:00
|
|
|
unique_ptr<Controller> leftC, rightC;
|
2008-05-08 20:23:31 +00:00
|
|
|
|
|
|
|
// Also check if we should swap the paddles plugged into a jack
|
|
|
|
bool swapPaddles = myProperties.get(Controller_SwapPaddles) == "YES";
|
|
|
|
|
|
|
|
// Construct left controller
|
2008-05-16 12:04:35 +00:00
|
|
|
if(left == "BOOSTERGRIP")
|
2008-05-08 20:23:31 +00:00
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<BoosterGrip>(Controller::Left, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if(left == "DRIVING")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<Driving>(Controller::Left, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if((left == "KEYBOARD") || (left == "KEYPAD"))
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<Keyboard>(Controller::Left, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
2011-05-06 19:58:56 +00:00
|
|
|
else if(BSPF_startsWithIgnoreCase(left, "PADDLES"))
|
2008-05-08 20:23:31 +00:00
|
|
|
{
|
2011-05-06 19:58:56 +00:00
|
|
|
bool swapAxis = false, swapDir = false;
|
|
|
|
if(left == "PADDLES_IAXIS")
|
|
|
|
swapAxis = true;
|
|
|
|
else if(left == "PADDLES_IDIR")
|
|
|
|
swapDir = true;
|
|
|
|
else if(left == "PADDLES_IAXDR")
|
|
|
|
swapAxis = swapDir = true;
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<Paddles>(Controller::Left, myEvent, *mySystem,
|
|
|
|
swapPaddles, swapAxis, swapDir);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if(left == "TRACKBALL22")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<TrackBall>(Controller::Left, myEvent, *mySystem,
|
|
|
|
Controller::TrackBall22);
|
2008-05-12 22:40:26 +00:00
|
|
|
}
|
|
|
|
else if(left == "TRACKBALL80")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<TrackBall>(Controller::Left, myEvent, *mySystem,
|
|
|
|
Controller::TrackBall80);
|
2008-05-12 22:40:26 +00:00
|
|
|
}
|
|
|
|
else if(left == "AMIGAMOUSE")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<TrackBall>(Controller::Left, myEvent, *mySystem,
|
|
|
|
Controller::AmigaMouse);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
2010-02-23 14:49:12 +00:00
|
|
|
else if(left == "GENESIS")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<Genesis>(Controller::Left, myEvent, *mySystem);
|
2010-02-23 14:49:12 +00:00
|
|
|
}
|
2012-01-02 16:37:17 +00:00
|
|
|
else if(left == "MINDLINK")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<MindLink>(Controller::Left, myEvent, *mySystem);
|
2012-01-02 16:37:17 +00:00
|
|
|
}
|
2008-05-08 20:23:31 +00:00
|
|
|
else
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
leftC = make_ptr<Joystick>(Controller::Left, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
2015-12-04 19:08:14 +00:00
|
|
|
|
2008-05-08 20:23:31 +00:00
|
|
|
// Construct right controller
|
2008-05-16 12:04:35 +00:00
|
|
|
if(right == "BOOSTERGRIP")
|
2008-05-08 20:23:31 +00:00
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<BoosterGrip>(Controller::Right, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if(right == "DRIVING")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<Driving>(Controller::Right, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if((right == "KEYBOARD") || (right == "KEYPAD"))
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<Keyboard>(Controller::Right, myEvent, *mySystem);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
2011-05-06 19:58:56 +00:00
|
|
|
else if(BSPF_startsWithIgnoreCase(right, "PADDLES"))
|
2008-05-08 20:23:31 +00:00
|
|
|
{
|
2011-05-06 19:58:56 +00:00
|
|
|
bool swapAxis = false, swapDir = false;
|
|
|
|
if(right == "PADDLES_IAXIS")
|
|
|
|
swapAxis = true;
|
|
|
|
else if(right == "PADDLES_IDIR")
|
|
|
|
swapDir = true;
|
|
|
|
else if(right == "PADDLES_IAXDR")
|
|
|
|
swapAxis = swapDir = true;
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<Paddles>(Controller::Right, myEvent, *mySystem,
|
|
|
|
swapPaddles, swapAxis, swapDir);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if(right == "TRACKBALL22")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<TrackBall>(Controller::Left, myEvent, *mySystem,
|
|
|
|
Controller::TrackBall22);
|
2008-05-12 22:40:26 +00:00
|
|
|
}
|
|
|
|
else if(right == "TRACKBALL80")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<TrackBall>(Controller::Left, myEvent, *mySystem,
|
|
|
|
Controller::TrackBall80);
|
2008-05-12 22:40:26 +00:00
|
|
|
}
|
|
|
|
else if(right == "AMIGAMOUSE")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<TrackBall>(Controller::Left, myEvent, *mySystem,
|
|
|
|
Controller::AmigaMouse);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if(right == "ATARIVOX")
|
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
const string& nvramfile = myOSystem.nvramDir() + "atarivox_eeprom.dat";
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<AtariVox>(Controller::Right, myEvent,
|
2014-05-12 23:34:25 +00:00
|
|
|
*mySystem, myOSystem.serialPort(),
|
|
|
|
myOSystem.settings().getString("avoxport"), nvramfile);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
else if(right == "SAVEKEY")
|
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
const string& nvramfile = myOSystem.nvramDir() + "savekey_eeprom.dat";
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<SaveKey>(Controller::Right, myEvent, *mySystem,
|
|
|
|
nvramfile);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
2012-01-02 16:37:17 +00:00
|
|
|
else if(right == "GENESIS")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<Genesis>(Controller::Right, myEvent, *mySystem);
|
2012-01-02 16:37:17 +00:00
|
|
|
}
|
2009-03-16 00:23:42 +00:00
|
|
|
else if(right == "KIDVID")
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<KidVid>(Controller::Right, myEvent, *mySystem, rommd5);
|
2009-03-16 00:23:42 +00:00
|
|
|
}
|
2012-01-02 16:37:17 +00:00
|
|
|
else if(right == "MINDLINK")
|
2010-02-23 14:49:12 +00:00
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
rightC = make_ptr<MindLink>(Controller::Right, myEvent, *mySystem);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rightC = make_ptr<Joystick>(Controller::Right, myEvent, *mySystem);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Swap the ports if necessary
|
|
|
|
if(myProperties.get(Console_SwapPorts) == "NO")
|
|
|
|
{
|
|
|
|
myLeftControl = std::move(leftC);
|
|
|
|
myRightControl = std::move(rightC);
|
2010-02-23 14:49:12 +00:00
|
|
|
}
|
2008-05-08 20:23:31 +00:00
|
|
|
else
|
|
|
|
{
|
2014-11-04 00:34:56 +00:00
|
|
|
myLeftControl = std::move(rightC);
|
|
|
|
myRightControl = std::move(leftC);
|
2008-05-08 20:23:31 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-11-25 01:34:35 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::loadUserPalette()
|
|
|
|
{
|
2014-05-12 23:34:25 +00:00
|
|
|
const string& palette = myOSystem.paletteFile();
|
2015-06-12 17:37:58 +00:00
|
|
|
ifstream in(palette, ios::binary);
|
2006-11-25 01:34:35 +00:00
|
|
|
if(!in)
|
|
|
|
return;
|
|
|
|
|
2007-07-27 13:49:16 +00:00
|
|
|
// Make sure the contains enough data for the NTSC, PAL and SECAM palettes
|
|
|
|
// This means 128 colours each for NTSC and PAL, at 3 bytes per pixel
|
|
|
|
// and 8 colours for SECAM at 3 bytes per pixel
|
2006-11-25 01:34:35 +00:00
|
|
|
in.seekg(0, ios::end);
|
|
|
|
streampos length = in.tellg();
|
|
|
|
in.seekg(0, ios::beg);
|
2007-07-27 13:49:16 +00:00
|
|
|
if(length < 128 * 3 * 2 + 8 * 3)
|
2006-11-25 01:34:35 +00:00
|
|
|
{
|
|
|
|
cerr << "ERROR: invalid palette file " << palette << endl;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2006-12-01 18:30:21 +00:00
|
|
|
// Now that we have valid data, create the user-defined palettes
|
2006-11-27 02:18:47 +00:00
|
|
|
uInt8 pixbuf[3]; // Temporary buffer for one 24-bit pixel
|
2006-11-25 01:34:35 +00:00
|
|
|
|
|
|
|
for(int i = 0; i < 128; i++) // NTSC palette
|
|
|
|
{
|
2015-09-14 18:14:00 +00:00
|
|
|
in.read(reinterpret_cast<char*>(pixbuf), 3);
|
|
|
|
uInt32 pixel = (int(pixbuf[0]) << 16) + (int(pixbuf[1]) << 8) + int(pixbuf[2]);
|
2006-12-26 17:06:01 +00:00
|
|
|
ourUserNTSCPalette[(i<<1)] = pixel;
|
2006-11-25 01:34:35 +00:00
|
|
|
}
|
|
|
|
for(int i = 0; i < 128; i++) // PAL palette
|
|
|
|
{
|
2015-09-14 18:14:00 +00:00
|
|
|
in.read(reinterpret_cast<char*>(pixbuf), 3);
|
|
|
|
uInt32 pixel = (int(pixbuf[0]) << 16) + (int(pixbuf[1]) << 8) + int(pixbuf[2]);
|
2006-12-26 17:06:01 +00:00
|
|
|
ourUserPALPalette[(i<<1)] = pixel;
|
2006-11-25 01:34:35 +00:00
|
|
|
}
|
|
|
|
|
2007-07-27 13:49:16 +00:00
|
|
|
uInt32 secam[16]; // All 8 24-bit pixels, plus 8 colorloss pixels
|
|
|
|
for(int i = 0; i < 8; i++) // SECAM palette
|
|
|
|
{
|
2015-09-14 18:14:00 +00:00
|
|
|
in.read(reinterpret_cast<char*>(pixbuf), 3);
|
|
|
|
uInt32 pixel = (int(pixbuf[0]) << 16) + (int(pixbuf[1]) << 8) + int(pixbuf[2]);
|
2007-07-27 13:49:16 +00:00
|
|
|
secam[(i<<1)] = pixel;
|
|
|
|
secam[(i<<1)+1] = 0;
|
|
|
|
}
|
|
|
|
uInt32* ptr = ourUserSECAMPalette;
|
|
|
|
for(int i = 0; i < 16; ++i)
|
|
|
|
{
|
|
|
|
uInt32* s = secam;
|
|
|
|
for(int j = 0; j < 16; ++j)
|
|
|
|
*ptr++ = *s++;
|
|
|
|
}
|
|
|
|
|
2006-11-25 01:34:35 +00:00
|
|
|
myUserPaletteDefined = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2014-05-12 23:34:25 +00:00
|
|
|
void Console::generateColorLossPalette()
|
2006-12-26 17:06:01 +00:00
|
|
|
{
|
|
|
|
// Look at all the palettes, since we don't know which one is
|
|
|
|
// currently active
|
2007-07-27 13:49:16 +00:00
|
|
|
uInt32* palette[9] = {
|
|
|
|
&ourNTSCPalette[0], &ourPALPalette[0], &ourSECAMPalette[0],
|
|
|
|
&ourNTSCPaletteZ26[0], &ourPALPaletteZ26[0], &ourSECAMPaletteZ26[0],
|
|
|
|
0, 0, 0
|
2006-12-26 17:06:01 +00:00
|
|
|
};
|
|
|
|
if(myUserPaletteDefined)
|
|
|
|
{
|
|
|
|
palette[6] = &ourUserNTSCPalette[0];
|
|
|
|
palette[7] = &ourUserPALPalette[0];
|
2007-07-27 13:49:16 +00:00
|
|
|
palette[8] = &ourUserSECAMPalette[0];
|
2006-12-26 17:06:01 +00:00
|
|
|
}
|
|
|
|
|
2007-07-27 13:49:16 +00:00
|
|
|
for(int i = 0; i < 9; ++i)
|
2006-12-26 17:06:01 +00:00
|
|
|
{
|
|
|
|
if(palette[i] == 0)
|
|
|
|
continue;
|
|
|
|
|
2009-09-01 11:54:59 +00:00
|
|
|
// Fill the odd numbered palette entries with gray values (calculated
|
|
|
|
// using the standard RGB -> grayscale conversion formula)
|
2006-12-26 17:06:01 +00:00
|
|
|
for(int j = 0; j < 128; ++j)
|
|
|
|
{
|
|
|
|
uInt32 pixel = palette[i][(j<<1)];
|
2009-09-01 11:54:59 +00:00
|
|
|
uInt8 r = (pixel >> 16) & 0xff;
|
|
|
|
uInt8 g = (pixel >> 8) & 0xff;
|
|
|
|
uInt8 b = (pixel >> 0) & 0xff;
|
2015-09-14 18:14:00 +00:00
|
|
|
uInt8 sum = uInt8((r * 0.2989) + (g * 0.5870) + (b * 0.1140));
|
2009-09-01 11:54:59 +00:00
|
|
|
palette[i][(j<<1)+1] = (sum << 16) + (sum << 8) + sum;
|
2006-12-26 17:06:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2008-05-21 14:01:31 +00:00
|
|
|
void Console::setFramerate(float framerate)
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
{
|
2008-05-21 14:01:31 +00:00
|
|
|
myFramerate = framerate;
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.setFramerate(framerate);
|
|
|
|
myOSystem.sound().setFrameRate(framerate);
|
OK, some huge changes across the board, so lets see if I get it all:
After much request, added ability to access the settings menu from the
ROM browser dialog. This menu now contains almost all items that can
be selected in Stella, and can be accessed in-game as before.
Completely removed pause functionality from the core code. It made
sense back when Stella was a single-mode program: there were two modes;
emulation and pause. Now that there are other event modes, the
EventHandler state machine is getting too complicated. If you want to
pause, you can simply enter one of the in-game menus. Related to this,
when the app is minimized, Stella enters the menu dialog state.
Previously, minimizing the app caused a pause, but since there was no
onscreen feedback, many people assumed the app locked up.
Added centering to all Dialog boxes, which is done dynamically, as they're
placed on the dialog stack to be drawn to the screen.
Cleaned up the API of Console/FrameBuffer/OSystem classes wrt to palettes
and timing. Parts of each were being done in different classes; now it
should be more consistent.
Started infrastructure for user-selectable UI palettes. For now, there's
no way to change it in the GUI, and it defaults to the normal palette.
Eventually, there will be several choices selectable from an in-game
menu.
Removed '-channels' commandline argument, since that feature can be
set from the ROM properties.
Added '128' to the choices for fragment size in AudioDialog.
Tweaked the OpenGL dynamic loading code to test both the given GL
lib, and if that fails to use auto-detection. It seems in the OSX port,
the first approach works for some people, and not the other (and vice-versa),
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1255 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2006-12-30 22:26:29 +00:00
|
|
|
}
|
|
|
|
|
2009-08-23 17:15:43 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::toggleTIABit(TIABit bit, const string& bitname, bool show) const
|
|
|
|
{
|
|
|
|
bool result = myTIA->toggleBit(bit);
|
|
|
|
string message = bitname + (result ? " enabled" : " disabled");
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2009-08-23 17:15:43 +00:00
|
|
|
}
|
|
|
|
|
2009-09-14 19:22:34 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2012-04-20 21:32:24 +00:00
|
|
|
void Console::toggleBits() const
|
2009-09-14 19:22:34 +00:00
|
|
|
{
|
2012-04-20 21:32:24 +00:00
|
|
|
bool enabled = myTIA->toggleBits();
|
|
|
|
string message = string("TIA bits") + (enabled ? " enabled" : " disabled");
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2009-09-14 19:22:34 +00:00
|
|
|
}
|
|
|
|
|
2009-09-09 14:02:23 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2012-04-20 21:32:24 +00:00
|
|
|
void Console::toggleTIACollision(TIABit bit, const string& bitname, bool show) const
|
2009-09-09 14:02:23 +00:00
|
|
|
{
|
2012-04-20 21:32:24 +00:00
|
|
|
bool result = myTIA->toggleCollision(bit);
|
|
|
|
string message = bitname + (result ? " collision enabled" : " collision disabled");
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2009-09-09 14:02:23 +00:00
|
|
|
}
|
|
|
|
|
2009-08-23 17:15:43 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2012-04-20 21:32:24 +00:00
|
|
|
void Console::toggleCollisions() const
|
2009-08-23 17:15:43 +00:00
|
|
|
{
|
2012-04-20 21:32:24 +00:00
|
|
|
bool enabled = myTIA->toggleCollisions();
|
|
|
|
string message = string("TIA collisions") + (enabled ? " enabled" : " disabled");
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
2009-08-23 17:15:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2012-04-20 21:32:24 +00:00
|
|
|
void Console::toggleHMOVE() const
|
2009-09-14 19:22:34 +00:00
|
|
|
{
|
2012-04-20 21:32:24 +00:00
|
|
|
if(myTIA->toggleHMOVEBlank())
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("HMOVE blanking enabled");
|
2012-04-20 21:32:24 +00:00
|
|
|
else
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("HMOVE blanking disabled");
|
2009-09-14 19:22:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2009-08-23 17:15:43 +00:00
|
|
|
void Console::toggleFixedColors() const
|
|
|
|
{
|
|
|
|
if(myTIA->toggleFixedColors())
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Fixed debug colors enabled");
|
2009-08-23 17:15:43 +00:00
|
|
|
else
|
2014-05-12 23:34:25 +00:00
|
|
|
myOSystem.frameBuffer().showMessage("Fixed debug colors disabled");
|
2009-08-23 17:15:43 +00:00
|
|
|
}
|
|
|
|
|
2015-09-29 21:14:12 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::toggleJitter() const
|
|
|
|
{
|
|
|
|
bool enabled = myTIA->toggleJitter();
|
|
|
|
string message = string("TV scanline jitter") + (enabled ? " enabled" : " disabled");
|
|
|
|
myOSystem.frameBuffer().showMessage(message);
|
|
|
|
}
|
|
|
|
|
First pass at adding a cart-specific bankswitch/info tab to the
debugger. In the process, I had to spend several days extending
the UI/dialog class to actually contain multiple tabs. This was
harder than expected, and it still isn't quite finished. In many
ways, we're beginning to reach the limits of the current code; it
was never designed for a full-fledged, graphically rich UI.
For now the tab is empty, but eventually it will contain general
info about the ROM bankswitch type (size, virtual layout, etc),
but also cart-specific info, including the ability to change
banks, which can be vary greatly among the different schemes.
Eventually, it may even allow to see/modify very cart-specific
info (like display RAM in DPC, etc).
Better handle errors in opening the serial port (AtariVox support)
for Windows and OSX.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2678 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2013-03-31 00:10:05 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2014-11-09 22:03:50 +00:00
|
|
|
void Console::attachDebugger(Debugger& dbg)
|
First pass at adding a cart-specific bankswitch/info tab to the
debugger. In the process, I had to spend several days extending
the UI/dialog class to actually contain multiple tabs. This was
harder than expected, and it still isn't quite finished. In many
ways, we're beginning to reach the limits of the current code; it
was never designed for a full-fledged, graphically rich UI.
For now the tab is empty, but eventually it will contain general
info about the ROM bankswitch type (size, virtual layout, etc),
but also cart-specific info, including the ability to change
banks, which can be vary greatly among the different schemes.
Eventually, it may even allow to see/modify very cart-specific
info (like display RAM in DPC, etc).
Better handle errors in opening the serial port (AtariVox support)
for Windows and OSX.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2678 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2013-03-31 00:10:05 +00:00
|
|
|
{
|
|
|
|
#ifdef DEBUGGER_SUPPORT
|
2014-11-09 22:03:50 +00:00
|
|
|
// myOSystem.createDebugger(*this);
|
|
|
|
mySystem->m6502().attach(dbg);
|
First pass at adding a cart-specific bankswitch/info tab to the
debugger. In the process, I had to spend several days extending
the UI/dialog class to actually contain multiple tabs. This was
harder than expected, and it still isn't quite finished. In many
ways, we're beginning to reach the limits of the current code; it
was never designed for a full-fledged, graphically rich UI.
For now the tab is empty, but eventually it will contain general
info about the ROM bankswitch type (size, virtual layout, etc),
but also cart-specific info, including the ability to change
banks, which can be vary greatly among the different schemes.
Eventually, it may even allow to see/modify very cart-specific
info (like display RAM in DPC, etc).
Better handle errors in opening the serial port (AtariVox support)
for Windows and OSX.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2678 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
2013-03-31 00:10:05 +00:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
2013-04-23 15:57:33 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
void Console::stateChanged(EventHandler::State state)
|
|
|
|
{
|
|
|
|
// For now, only the CompuMate cares about state changes
|
|
|
|
if(myCMHandler)
|
|
|
|
myCMHandler->enableKeyHandling(state == EventHandler::S_EMULATE);
|
|
|
|
}
|
|
|
|
|
2006-12-26 17:06:01 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
uInt32 Console::ourNTSCPalette[256] = {
|
|
|
|
0x000000, 0, 0x4a4a4a, 0, 0x6f6f6f, 0, 0x8e8e8e, 0,
|
|
|
|
0xaaaaaa, 0, 0xc0c0c0, 0, 0xd6d6d6, 0, 0xececec, 0,
|
|
|
|
0x484800, 0, 0x69690f, 0, 0x86861d, 0, 0xa2a22a, 0,
|
|
|
|
0xbbbb35, 0, 0xd2d240, 0, 0xe8e84a, 0, 0xfcfc54, 0,
|
|
|
|
0x7c2c00, 0, 0x904811, 0, 0xa26221, 0, 0xb47a30, 0,
|
|
|
|
0xc3903d, 0, 0xd2a44a, 0, 0xdfb755, 0, 0xecc860, 0,
|
|
|
|
0x901c00, 0, 0xa33915, 0, 0xb55328, 0, 0xc66c3a, 0,
|
|
|
|
0xd5824a, 0, 0xe39759, 0, 0xf0aa67, 0, 0xfcbc74, 0,
|
|
|
|
0x940000, 0, 0xa71a1a, 0, 0xb83232, 0, 0xc84848, 0,
|
|
|
|
0xd65c5c, 0, 0xe46f6f, 0, 0xf08080, 0, 0xfc9090, 0,
|
|
|
|
0x840064, 0, 0x97197a, 0, 0xa8308f, 0, 0xb846a2, 0,
|
|
|
|
0xc659b3, 0, 0xd46cc3, 0, 0xe07cd2, 0, 0xec8ce0, 0,
|
|
|
|
0x500084, 0, 0x68199a, 0, 0x7d30ad, 0, 0x9246c0, 0,
|
|
|
|
0xa459d0, 0, 0xb56ce0, 0, 0xc57cee, 0, 0xd48cfc, 0,
|
|
|
|
0x140090, 0, 0x331aa3, 0, 0x4e32b5, 0, 0x6848c6, 0,
|
|
|
|
0x7f5cd5, 0, 0x956fe3, 0, 0xa980f0, 0, 0xbc90fc, 0,
|
|
|
|
0x000094, 0, 0x181aa7, 0, 0x2d32b8, 0, 0x4248c8, 0,
|
|
|
|
0x545cd6, 0, 0x656fe4, 0, 0x7580f0, 0, 0x8490fc, 0,
|
|
|
|
0x001c88, 0, 0x183b9d, 0, 0x2d57b0, 0, 0x4272c2, 0,
|
|
|
|
0x548ad2, 0, 0x65a0e1, 0, 0x75b5ef, 0, 0x84c8fc, 0,
|
|
|
|
0x003064, 0, 0x185080, 0, 0x2d6d98, 0, 0x4288b0, 0,
|
|
|
|
0x54a0c5, 0, 0x65b7d9, 0, 0x75cceb, 0, 0x84e0fc, 0,
|
|
|
|
0x004030, 0, 0x18624e, 0, 0x2d8169, 0, 0x429e82, 0,
|
|
|
|
0x54b899, 0, 0x65d1ae, 0, 0x75e7c2, 0, 0x84fcd4, 0,
|
|
|
|
0x004400, 0, 0x1a661a, 0, 0x328432, 0, 0x48a048, 0,
|
|
|
|
0x5cba5c, 0, 0x6fd26f, 0, 0x80e880, 0, 0x90fc90, 0,
|
|
|
|
0x143c00, 0, 0x355f18, 0, 0x527e2d, 0, 0x6e9c42, 0,
|
|
|
|
0x87b754, 0, 0x9ed065, 0, 0xb4e775, 0, 0xc8fc84, 0,
|
|
|
|
0x303800, 0, 0x505916, 0, 0x6d762b, 0, 0x88923e, 0,
|
|
|
|
0xa0ab4f, 0, 0xb7c25f, 0, 0xccd86e, 0, 0xe0ec7c, 0,
|
|
|
|
0x482c00, 0, 0x694d14, 0, 0x866a26, 0, 0xa28638, 0,
|
|
|
|
0xbb9f47, 0, 0xd2b656, 0, 0xe8cc63, 0, 0xfce070, 0
|
2006-11-25 01:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-12-26 17:06:01 +00:00
|
|
|
uInt32 Console::ourPALPalette[256] = {
|
|
|
|
0x000000, 0, 0x2b2b2b, 0, 0x525252, 0, 0x767676, 0,
|
|
|
|
0x979797, 0, 0xb6b6b6, 0, 0xd2d2d2, 0, 0xececec, 0,
|
|
|
|
0x000000, 0, 0x2b2b2b, 0, 0x525252, 0, 0x767676, 0,
|
|
|
|
0x979797, 0, 0xb6b6b6, 0, 0xd2d2d2, 0, 0xececec, 0,
|
|
|
|
0x805800, 0, 0x96711a, 0, 0xab8732, 0, 0xbe9c48, 0,
|
|
|
|
0xcfaf5c, 0, 0xdfc06f, 0, 0xeed180, 0, 0xfce090, 0,
|
|
|
|
0x445c00, 0, 0x5e791a, 0, 0x769332, 0, 0x8cac48, 0,
|
|
|
|
0xa0c25c, 0, 0xb3d76f, 0, 0xc4ea80, 0, 0xd4fc90, 0,
|
|
|
|
0x703400, 0, 0x89511a, 0, 0xa06b32, 0, 0xb68448, 0,
|
|
|
|
0xc99a5c, 0, 0xdcaf6f, 0, 0xecc280, 0, 0xfcd490, 0,
|
|
|
|
0x006414, 0, 0x1a8035, 0, 0x329852, 0, 0x48b06e, 0,
|
|
|
|
0x5cc587, 0, 0x6fd99e, 0, 0x80ebb4, 0, 0x90fcc8, 0,
|
|
|
|
0x700014, 0, 0x891a35, 0, 0xa03252, 0, 0xb6486e, 0,
|
|
|
|
0xc95c87, 0, 0xdc6f9e, 0, 0xec80b4, 0, 0xfc90c8, 0,
|
|
|
|
0x005c5c, 0, 0x1a7676, 0, 0x328e8e, 0, 0x48a4a4, 0,
|
|
|
|
0x5cb8b8, 0, 0x6fcbcb, 0, 0x80dcdc, 0, 0x90ecec, 0,
|
|
|
|
0x70005c, 0, 0x841a74, 0, 0x963289, 0, 0xa8489e, 0,
|
|
|
|
0xb75cb0, 0, 0xc66fc1, 0, 0xd380d1, 0, 0xe090e0, 0,
|
|
|
|
0x003c70, 0, 0x195a89, 0, 0x2f75a0, 0, 0x448eb6, 0,
|
|
|
|
0x57a5c9, 0, 0x68badc, 0, 0x79ceec, 0, 0x88e0fc, 0,
|
|
|
|
0x580070, 0, 0x6e1a89, 0, 0x8332a0, 0, 0x9648b6, 0,
|
|
|
|
0xa75cc9, 0, 0xb76fdc, 0, 0xc680ec, 0, 0xd490fc, 0,
|
|
|
|
0x002070, 0, 0x193f89, 0, 0x2f5aa0, 0, 0x4474b6, 0,
|
|
|
|
0x578bc9, 0, 0x68a1dc, 0, 0x79b5ec, 0, 0x88c8fc, 0,
|
|
|
|
0x340080, 0, 0x4a1a96, 0, 0x5f32ab, 0, 0x7248be, 0,
|
|
|
|
0x835ccf, 0, 0x936fdf, 0, 0xa280ee, 0, 0xb090fc, 0,
|
|
|
|
0x000088, 0, 0x1a1a9d, 0, 0x3232b0, 0, 0x4848c2, 0,
|
|
|
|
0x5c5cd2, 0, 0x6f6fe1, 0, 0x8080ef, 0, 0x9090fc, 0,
|
|
|
|
0x000000, 0, 0x2b2b2b, 0, 0x525252, 0, 0x767676, 0,
|
|
|
|
0x979797, 0, 0xb6b6b6, 0, 0xd2d2d2, 0, 0xececec, 0,
|
|
|
|
0x000000, 0, 0x2b2b2b, 0, 0x525252, 0, 0x767676, 0,
|
|
|
|
0x979797, 0, 0xb6b6b6, 0, 0xd2d2d2, 0, 0xececec, 0
|
2006-11-25 01:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2007-07-27 13:49:16 +00:00
|
|
|
uInt32 Console::ourSECAMPalette[256] = {
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff50ff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0
|
2006-11-25 01:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-12-26 17:06:01 +00:00
|
|
|
uInt32 Console::ourNTSCPaletteZ26[256] = {
|
|
|
|
0x000000, 0, 0x505050, 0, 0x646464, 0, 0x787878, 0,
|
|
|
|
0x8c8c8c, 0, 0xa0a0a0, 0, 0xb4b4b4, 0, 0xc8c8c8, 0,
|
|
|
|
0x445400, 0, 0x586800, 0, 0x6c7c00, 0, 0x809000, 0,
|
|
|
|
0x94a414, 0, 0xa8b828, 0, 0xbccc3c, 0, 0xd0e050, 0,
|
|
|
|
0x673900, 0, 0x7b4d00, 0, 0x8f6100, 0, 0xa37513, 0,
|
|
|
|
0xb78927, 0, 0xcb9d3b, 0, 0xdfb14f, 0, 0xf3c563, 0,
|
|
|
|
0x7b2504, 0, 0x8f3918, 0, 0xa34d2c, 0, 0xb76140, 0,
|
|
|
|
0xcb7554, 0, 0xdf8968, 0, 0xf39d7c, 0, 0xffb190, 0,
|
|
|
|
0x7d122c, 0, 0x912640, 0, 0xa53a54, 0, 0xb94e68, 0,
|
|
|
|
0xcd627c, 0, 0xe17690, 0, 0xf58aa4, 0, 0xff9eb8, 0,
|
|
|
|
0x730871, 0, 0x871c85, 0, 0x9b3099, 0, 0xaf44ad, 0,
|
|
|
|
0xc358c1, 0, 0xd76cd5, 0, 0xeb80e9, 0, 0xff94fd, 0,
|
|
|
|
0x5d0b92, 0, 0x711fa6, 0, 0x8533ba, 0, 0x9947ce, 0,
|
|
|
|
0xad5be2, 0, 0xc16ff6, 0, 0xd583ff, 0, 0xe997ff, 0,
|
|
|
|
0x401599, 0, 0x5429ad, 0, 0x683dc1, 0, 0x7c51d5, 0,
|
|
|
|
0x9065e9, 0, 0xa479fd, 0, 0xb88dff, 0, 0xcca1ff, 0,
|
|
|
|
0x252593, 0, 0x3939a7, 0, 0x4d4dbb, 0, 0x6161cf, 0,
|
|
|
|
0x7575e3, 0, 0x8989f7, 0, 0x9d9dff, 0, 0xb1b1ff, 0,
|
|
|
|
0x0f3480, 0, 0x234894, 0, 0x375ca8, 0, 0x4b70bc, 0,
|
|
|
|
0x5f84d0, 0, 0x7398e4, 0, 0x87acf8, 0, 0x9bc0ff, 0,
|
|
|
|
0x04425a, 0, 0x18566e, 0, 0x2c6a82, 0, 0x407e96, 0,
|
|
|
|
0x5492aa, 0, 0x68a6be, 0, 0x7cbad2, 0, 0x90cee6, 0,
|
|
|
|
0x044f30, 0, 0x186344, 0, 0x2c7758, 0, 0x408b6c, 0,
|
|
|
|
0x549f80, 0, 0x68b394, 0, 0x7cc7a8, 0, 0x90dbbc, 0,
|
|
|
|
0x0f550a, 0, 0x23691e, 0, 0x377d32, 0, 0x4b9146, 0,
|
|
|
|
0x5fa55a, 0, 0x73b96e, 0, 0x87cd82, 0, 0x9be196, 0,
|
|
|
|
0x1f5100, 0, 0x336505, 0, 0x477919, 0, 0x5b8d2d, 0,
|
|
|
|
0x6fa141, 0, 0x83b555, 0, 0x97c969, 0, 0xabdd7d, 0,
|
|
|
|
0x344600, 0, 0x485a00, 0, 0x5c6e14, 0, 0x708228, 0,
|
|
|
|
0x84963c, 0, 0x98aa50, 0, 0xacbe64, 0, 0xc0d278, 0,
|
|
|
|
0x463e00, 0, 0x5a5205, 0, 0x6e6619, 0, 0x827a2d, 0,
|
|
|
|
0x968e41, 0, 0xaaa255, 0, 0xbeb669, 0, 0xd2ca7d, 0
|
2006-11-25 01:34:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2006-12-26 17:06:01 +00:00
|
|
|
uInt32 Console::ourPALPaletteZ26[256] = {
|
|
|
|
0x000000, 0, 0x4c4c4c, 0, 0x606060, 0, 0x747474, 0,
|
|
|
|
0x888888, 0, 0x9c9c9c, 0, 0xb0b0b0, 0, 0xc4c4c4, 0,
|
|
|
|
0x000000, 0, 0x4c4c4c, 0, 0x606060, 0, 0x747474, 0,
|
|
|
|
0x888888, 0, 0x9c9c9c, 0, 0xb0b0b0, 0, 0xc4c4c4, 0,
|
|
|
|
0x533a00, 0, 0x674e00, 0, 0x7b6203, 0, 0x8f7617, 0,
|
|
|
|
0xa38a2b, 0, 0xb79e3f, 0, 0xcbb253, 0, 0xdfc667, 0,
|
|
|
|
0x1b5800, 0, 0x2f6c00, 0, 0x438001, 0, 0x579415, 0,
|
|
|
|
0x6ba829, 0, 0x7fbc3d, 0, 0x93d051, 0, 0xa7e465, 0,
|
|
|
|
0x6a2900, 0, 0x7e3d12, 0, 0x925126, 0, 0xa6653a, 0,
|
|
|
|
0xba794e, 0, 0xce8d62, 0, 0xe2a176, 0, 0xf6b58a, 0,
|
|
|
|
0x075b00, 0, 0x1b6f11, 0, 0x2f8325, 0, 0x439739, 0,
|
|
|
|
0x57ab4d, 0, 0x6bbf61, 0, 0x7fd375, 0, 0x93e789, 0,
|
|
|
|
0x741b2f, 0, 0x882f43, 0, 0x9c4357, 0, 0xb0576b, 0,
|
|
|
|
0xc46b7f, 0, 0xd87f93, 0, 0xec93a7, 0, 0xffa7bb, 0,
|
|
|
|
0x00572e, 0, 0x106b42, 0, 0x247f56, 0, 0x38936a, 0,
|
|
|
|
0x4ca77e, 0, 0x60bb92, 0, 0x74cfa6, 0, 0x88e3ba, 0,
|
|
|
|
0x6d165f, 0, 0x812a73, 0, 0x953e87, 0, 0xa9529b, 0,
|
|
|
|
0xbd66af, 0, 0xd17ac3, 0, 0xe58ed7, 0, 0xf9a2eb, 0,
|
|
|
|
0x014c5e, 0, 0x156072, 0, 0x297486, 0, 0x3d889a, 0,
|
|
|
|
0x519cae, 0, 0x65b0c2, 0, 0x79c4d6, 0, 0x8dd8ea, 0,
|
|
|
|
0x5f1588, 0, 0x73299c, 0, 0x873db0, 0, 0x9b51c4, 0,
|
|
|
|
0xaf65d8, 0, 0xc379ec, 0, 0xd78dff, 0, 0xeba1ff, 0,
|
|
|
|
0x123b87, 0, 0x264f9b, 0, 0x3a63af, 0, 0x4e77c3, 0,
|
|
|
|
0x628bd7, 0, 0x769feb, 0, 0x8ab3ff, 0, 0x9ec7ff, 0,
|
|
|
|
0x451e9d, 0, 0x5932b1, 0, 0x6d46c5, 0, 0x815ad9, 0,
|
|
|
|
0x956eed, 0, 0xa982ff, 0, 0xbd96ff, 0, 0xd1aaff, 0,
|
|
|
|
0x2a2b9e, 0, 0x3e3fb2, 0, 0x5253c6, 0, 0x6667da, 0,
|
|
|
|
0x7a7bee, 0, 0x8e8fff, 0, 0xa2a3ff, 0, 0xb6b7ff, 0,
|
|
|
|
0x000000, 0, 0x4c4c4c, 0, 0x606060, 0, 0x747474, 0,
|
|
|
|
0x888888, 0, 0x9c9c9c, 0, 0xb0b0b0, 0, 0xc4c4c4, 0,
|
|
|
|
0x000000, 0, 0x4c4c4c, 0, 0x606060, 0, 0x747474, 0,
|
|
|
|
0x888888, 0, 0x9c9c9c, 0, 0xb0b0b0, 0, 0xc4c4c4, 0
|
2006-11-25 01:34:35 +00:00
|
|
|
};
|
|
|
|
|
2006-12-26 17:06:01 +00:00
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2007-07-27 13:49:16 +00:00
|
|
|
uInt32 Console::ourSECAMPaletteZ26[256] = {
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0,
|
|
|
|
0x000000, 0, 0x2121ff, 0, 0xf03c79, 0, 0xff3cff, 0,
|
|
|
|
0x7fff00, 0, 0x7fffff, 0, 0xffff3f, 0, 0xffffff, 0
|
|
|
|
};
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
uInt32 Console::ourUserNTSCPalette[256] = { 0 }; // filled from external file
|
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
|
|
uInt32 Console::ourUserPALPalette[256] = { 0 }; // filled from external file
|
2006-12-26 17:06:01 +00:00
|
|
|
|
|
|
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
2007-07-27 13:49:16 +00:00
|
|
|
uInt32 Console::ourUserSECAMPalette[256] = { 0 }; // filled from external file
|