diff --git a/src/emucore/CartCTY.cxx b/src/emucore/CartCTY.cxx index 7f8321c97..7a1b1bfa9 100644 --- a/src/emucore/CartCTY.cxx +++ b/src/emucore/CartCTY.cxx @@ -192,7 +192,7 @@ uInt8 CartridgeCTY::peek(uInt16 address) // Is this instruction an immediate mode LDA? myLDAimmediate = (peekValue == 0xA9); - return myImage[myCurrentBank + address]; + return peekValue; } } @@ -466,7 +466,7 @@ void CartridgeCTY::loadScore(uInt8 index) { serializer.getByteArray(scoreRAM, 256); } - catch(const char* msg) + catch(...) { memset(scoreRAM, 0, 256); } @@ -487,7 +487,7 @@ void CartridgeCTY::saveScore(uInt8 index) { serializer.getByteArray(scoreRAM, 256); } - catch(const char* msg) + catch(...) { memset(scoreRAM, 0, 256); } @@ -501,7 +501,7 @@ void CartridgeCTY::saveScore(uInt8 index) { serializer.putByteArray(scoreRAM, 256); } - catch(const char* msg) + catch(...) { // Maybe add logging here that save failed? cerr << name() << ": ERROR saving score table " << (int)index << endl; diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx index b49b599fe..c19042896 100644 --- a/src/emucore/CartDPCPlus.cxx +++ b/src/emucore/CartDPCPlus.cxx @@ -41,7 +41,6 @@ CartridgeDPCPlus::CartridgeDPCPlus(const uInt8* image, uInt32 size, uInt32 minsize = 4096 * 6 + 4096 + 1024 + 255; mySize = BSPF_max(minsize, size); myImage = new uInt8[mySize]; - myDPCRAM = new uInt8[8192]; memcpy(myImage, image, size); createCodeAccessBase(4096 * 6); @@ -94,7 +93,6 @@ CartridgeDPCPlus::CartridgeDPCPlus(const uInt8* image, uInt32 size, CartridgeDPCPlus::~CartridgeDPCPlus() { delete[] myImage; - delete[] myDPCRAM; #ifdef THUMB_SUPPORT delete myThumbEmulator; diff --git a/src/emucore/CartDPCPlus.hxx b/src/emucore/CartDPCPlus.hxx index 237ca61c0..2c540f7cc 100644 --- a/src/emucore/CartDPCPlus.hxx +++ b/src/emucore/CartDPCPlus.hxx @@ -181,8 +181,8 @@ class CartridgeDPCPlus : public Cartridge // Pointer to the 4K display ROM image of the cartridge uInt8* myDisplayImage; - // Pointer to the DPC 8k RAM image - uInt8* myDPCRAM; + // The DPC 8k RAM image + uInt8 myDPCRAM[8192]; #ifdef THUMB_SUPPORT // Pointer to the Thumb ARM emulator object