diff --git a/src/common/Version.hxx b/src/common/Version.hxx index c08fca419..57a734621 100644 --- a/src/common/Version.hxx +++ b/src/common/Version.hxx @@ -21,7 +21,7 @@ #include -#define STELLA_BASE_VERSION "3.1_test2" +#define STELLA_BASE_VERSION "3.1_test3" #ifdef NIGHTLY_BUILD #define STELLA_VERSION STELLA_BASE_VERSION "pre-" NIGHTLY_BUILD diff --git a/src/emucore/CartE7.cxx b/src/emucore/CartE7.cxx index a57e48d88..a071b4376 100644 --- a/src/emucore/CartE7.cxx +++ b/src/emucore/CartE7.cxx @@ -22,8 +22,6 @@ #include "System.hxx" #include "CartE7.hxx" -// TODO - check for unwanted read from write port in the upper 256B RAM area - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CartridgeE7::CartridgeE7(const uInt8* image) { @@ -106,13 +104,21 @@ uInt8 CartridgeE7::peek(uInt16 address) bankRAM(address & 0x0003); } - if((address < 0x0400) && (bank() == 7)) + if((myCurrentSlice[0] == 7) && (address < 0x0400)) { - // Reading from the write port triggers an unwanted write + // Reading from the 1K write port @ $1000 triggers an unwanted write uInt8 value = mySystem->getDataBusState(0xFF); if(myBankLocked) return value; - else return myImage[(myCurrentSlice[address >> 11] << 11) + (address & 0x07FF)] = value; + else return myRAM[address & 0x03FF] = value; + } + else if((address >= 0x0800) && (address <= 0x08FF)) + { + // Reading from the 256B write port @ $1800 triggers an unwanted write + uInt8 value = mySystem->getDataBusState(0xFF); + + if(myBankLocked) return value; + else return myRAM[1024 + (myCurrentRAM << 8) + (address & 0x00FF)] = value; } else return myImage[(myCurrentSlice[address >> 11] << 11) + (address & 0x07FF)]; diff --git a/src/emucore/CartE7.hxx b/src/emucore/CartE7.hxx index 91f2daa5e..f7e9afb78 100644 --- a/src/emucore/CartE7.hxx +++ b/src/emucore/CartE7.hxx @@ -48,7 +48,7 @@ class System; read port. The second 1K of RAM appears at 1800-19FF. 1800-18FF is the write port while 1900-19FF is the read port. You select which 256 byte block appears - here by accessing 1FF8 to 1FFB. + here by accessing 1FE8 to 1FEB. @author Bradford W. Mott @version $Id$