Fix initialization error in DPC+ scheme (fixes #489).

This commit is contained in:
Stephen Anthony 2019-06-12 09:54:40 -02:30
parent 9ba843dae9
commit 2cfffd48fe
3 changed files with 12 additions and 3 deletions

View File

@ -93,6 +93,9 @@
certain older DPC+ driver versions; this allows 'Epic Adventure' ROM
to finally work in Stella.
* Fixed bug in DPC+ scheme; 'fast fetch mode' was enabled at startup,
when it should be disabled by default.
* Certain buttons in the UI can now be activated repeatedly by holding
down the mouse button (Time Machine, debugger step/trace/frame advance,
etc.)

View File

@ -60,6 +60,10 @@ void CartridgeCTY::reset()
myRAM[0] = myRAM[1] = myRAM[2] = myRAM[3] = 0xFF;
myLDAimmediate = false;
myRandomNumber = 0x2B435044;
myRamAccessTimeout = 0;
myAudioCycles = 0;
myFractionalClocks = 0.0;

View File

@ -76,9 +76,6 @@ CartridgeDPCPlus::CartridgeDPCPlus(const ByteBuffer& image, uInt32 size,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void CartridgeDPCPlus::reset()
{
myAudioCycles = myARMCycles = 0;
myFractionalClocks = 0.0;
setInitialState();
// DPC+ always starts in bank 5
@ -110,6 +107,11 @@ void CartridgeDPCPlus::setInitialState()
// Initialize the DPC's random number generator register (must be non-zero)
myRandomNumber = 0x2B435044; // "DPC+"
// Initialize various other parameters
myFastFetch = myLDAimmediate = false;
myAudioCycles = myARMCycles = 0;
myFractionalClocks = 0.0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -