stella/src/emucore/System.cxx

257 lines
6.5 KiB
C++
Raw Normal View History

//============================================================================
//
// MM MM 6666 555555 0000 2222
// MMMM MMMM 66 66 55 00 00 22 22
// MM MMM MM 66 55 00 00 22
// MM M MM 66666 55555 00 00 22222 -- "A 6502 Microprocessor Emulator"
// MM MM 66 66 55 00 00 22
// MM MM 66 66 55 55 00 00 22
// MM MM 6666 5555 0000 222222
//
// Copyright (c) 1995-2016 by Bradford W. Mott, Stephen Anthony
// and the Stella Team
//
// See the file "License.txt" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id$
//============================================================================
#include <cassert>
#include <iostream>
#include "Device.hxx"
#include "M6502.hxx"
#include "M6532.hxx"
#include "AbstractTIA.hxx"
#include "Cart.hxx"
#include "System.hxx"
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
System::System(const OSystem& osystem, M6502& m6502, M6532& m6532,
AbstractTIA& mTIA, Cartridge& mCart)
: myOSystem(osystem),
myM6502(m6502),
myM6532(m6532),
myTIA(mTIA),
myCart(mCart),
myCycles(0),
myDataBusState(0),
myDataBusLocked(false),
mySystemInAutodetect(false)
{
// Re-initialize random generator
randGenerator().initSeed();
// Initialize page access table
PageAccess access(&myNullDevice, System::PA_READ);
for(int page = 0; page < NUM_PAGES; ++page)
{
setPageAccess(page, access);
myPageIsDirtyTable[page] = false;
}
// Bus starts out unlocked (in other words, peek() changes myDataBusState)
myDataBusLocked = false;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void System::initialize()
{
// Install all devices
myM6532.install(*this);
myTIA.install(*this);
myCart.install(*this);
myM6502.install(*this); // Must always be installed last
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void System::reset(bool autodetect)
{
// Provide hint to devices that autodetection is active (or not)
mySystemInAutodetect = autodetect;
// Reset system cycle counter
resetCycles();
// Reset all devices
myM6532.reset();
myTIA.reset();
myCart.reset();
myM6502.reset(); // Must always be reset last
// There are no dirty pages upon startup
clearDirtyPages();
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void System::resetCycles()
{
// First we let all of the device attached to me know about the reset
myM6532.systemCyclesReset();
myTIA.systemCyclesReset();
myCart.systemCyclesReset();
// Now, we reset cycle count to zero
myCycles = 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool System::isPageDirty(uInt16 start_addr, uInt16 end_addr) const
{
uInt16 start_page = (start_addr & ADDRESS_MASK) >> PAGE_SHIFT;
uInt16 end_page = (end_addr & ADDRESS_MASK) >> PAGE_SHIFT;
for(uInt16 page = start_page; page <= end_page; ++page)
if(myPageIsDirtyTable[page])
return true;
return false;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void System::clearDirtyPages()
{
for(uInt32 i = 0; i < NUM_PAGES; ++i)
myPageIsDirtyTable[i] = false;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 System::peek(uInt16 addr, uInt8 flags)
{
PageAccess& access = myPageAccessTable[(addr & ADDRESS_MASK) >> PAGE_SHIFT];
#ifdef DEBUGGER_SUPPORT
// Set access type
if(access.codeAccessBase)
*(access.codeAccessBase + (addr & PAGE_MASK)) |= flags;
else
access.device->setAccessFlags(addr, flags);
#endif
// See if this page uses direct accessing or not
uInt8 result;
if(access.directPeekBase)
result = *(access.directPeekBase + (addr & PAGE_MASK));
else
result = access.device->peek(addr);
#ifdef DEBUGGER_SUPPORT
if(!myDataBusLocked)
#endif
myDataBusState = result;
return result;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void System::poke(uInt16 addr, uInt8 value)
{
uInt16 page = (addr & ADDRESS_MASK) >> PAGE_SHIFT;
PageAccess& access = myPageAccessTable[page];
// See if this page uses direct accessing or not
if(access.directPokeBase)
{
// Since we have direct access to this poke, we can dirty its page
*(access.directPokeBase + (addr & PAGE_MASK)) = value;
myPageIsDirtyTable[page] = true;
}
else
{
// The specific device informs us if the poke succeeded
myPageIsDirtyTable[page] = access.device->poke(addr, value);
}
#ifdef DEBUGGER_SUPPORT
if(!myDataBusLocked)
#endif
myDataBusState = value;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
uInt8 System::getAccessFlags(uInt16 addr) const
{
#ifdef DEBUGGER_SUPPORT
const PageAccess& access = myPageAccessTable[(addr & ADDRESS_MASK) >> PAGE_SHIFT];
if(access.codeAccessBase)
return *(access.codeAccessBase + (addr & PAGE_MASK));
else
return access.device->getAccessFlags(addr);
#else
return 0;
#endif
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void System::setAccessFlags(uInt16 addr, uInt8 flags)
{
#ifdef DEBUGGER_SUPPORT
PageAccess& access = myPageAccessTable[(addr & ADDRESS_MASK) >> PAGE_SHIFT];
if(access.codeAccessBase)
*(access.codeAccessBase + (addr & PAGE_MASK)) |= flags;
else
access.device->setAccessFlags(addr, flags);
#endif
}
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 System::save(Serializer& out) const
{
try
{
out.putString(name());
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
out.putInt(myCycles);
out.putByte(myDataBusState);
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
// Save the state of each device
if(!myM6502.save(out))
return false;
if(!myM6532.save(out))
return false;
if(!myTIA.save(out))
return false;
if(!myCart.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;
}
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
{
cerr << "ERROR: System::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;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool System::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
{
if(in.getString() != name())
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;
myCycles = in.getInt();
myDataBusState = in.getByte();
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
// Load the state of each device
if(!myM6502.load(in))
return false;
if(!myM6532.load(in))
return false;
if(!myTIA.load(in))
return false;
if(!myCart.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;
}
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
{
cerr << "ERROR: System::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;
}