diff --git a/src/emucore/Cart4KSC.cxx b/src/emucore/Cart4KSC.cxx index bf7c2c1bd..969472fa9 100644 --- a/src/emucore/Cart4KSC.cxx +++ b/src/emucore/Cart4KSC.cxx @@ -83,7 +83,7 @@ uInt8 Cartridge4KSC::peek(uInt16 address) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Cartridge4KSC::poke(uInt16 address, uInt8 value) { - if(address & 0x080) + if (!(address & 0x080)) { pokeRAM(myRAM[address & 0x007F], address, value); return true; diff --git a/src/emucore/CartBFSC.cxx b/src/emucore/CartBFSC.cxx index d41c290ce..63a5a840a 100644 --- a/src/emucore/CartBFSC.cxx +++ b/src/emucore/CartBFSC.cxx @@ -98,7 +98,7 @@ bool CartridgeBFSC::poke(uInt16 address, uInt8 value) return false; } - if(address & 0x080) + if (!(address & 0x080)) { pokeRAM(myRAM[address & 0x007F], pokeAddress, value); return true; diff --git a/src/emucore/CartEFSC.cxx b/src/emucore/CartEFSC.cxx index 0a5069489..b30e111f5 100644 --- a/src/emucore/CartEFSC.cxx +++ b/src/emucore/CartEFSC.cxx @@ -98,7 +98,7 @@ bool CartridgeEFSC::poke(uInt16 address, uInt8 value) return false; } - if(address & 0x080) + if (!(address & 0x080)) { pokeRAM(myRAM[address & 0x007F], pokeAddress, value); return true; diff --git a/src/emucore/CartF4SC.cxx b/src/emucore/CartF4SC.cxx index 9d468d28c..0daeb4fb3 100644 --- a/src/emucore/CartF4SC.cxx +++ b/src/emucore/CartF4SC.cxx @@ -98,7 +98,7 @@ bool CartridgeF4SC::poke(uInt16 address, uInt8 value) return false; } - if(address & 0x080) + if(!(address & 0x080)) { pokeRAM(myRAM[address & 0x007F], pokeAddress, value); return true; diff --git a/src/emucore/CartF6SC.cxx b/src/emucore/CartF6SC.cxx index b9f47ae89..c03b1d4a0 100644 --- a/src/emucore/CartF6SC.cxx +++ b/src/emucore/CartF6SC.cxx @@ -138,7 +138,7 @@ bool CartridgeF6SC::poke(uInt16 address, uInt8 value) break; } - if(address & 0x080) + if(!(address & 0x080)) { pokeRAM(myRAM[address & 0x007F], address, value); return true; diff --git a/src/emucore/CartF8SC.cxx b/src/emucore/CartF8SC.cxx index 5c4c8a523..2a7f9d8de 100644 --- a/src/emucore/CartF8SC.cxx +++ b/src/emucore/CartF8SC.cxx @@ -118,7 +118,7 @@ bool CartridgeF8SC::poke(uInt16 address, uInt8 value) break; } - if(address & 0x080) + if (!(address & 0x080)) { pokeRAM(myRAM[address & 0x007F], address, value); return true;