Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix initialization error in DPC+ scheme (fixes #489).
  • Loading branch information
sa666666 committed Jun 12, 2019
1 parent 9ba843d commit 2cfffd4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Changes.txt
Expand Up @@ -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.)
Expand Down
4 changes: 4 additions & 0 deletions src/emucore/CartCTY.cxx
Expand Up @@ -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;

Expand Down
8 changes: 5 additions & 3 deletions src/emucore/CartDPCPlus.cxx
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down

0 comments on commit 2cfffd4

Please sign in to comment.