From 279e54378d84d87c575b2ee7e8e41b17645c1b83 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sat, 7 Sep 2019 14:36:13 +0200 Subject: [PATCH] some fixes for last commit --- src/emucore/Cart3E.cxx | 6 +++--- src/emucore/Cart3F.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/emucore/Cart3E.cxx b/src/emucore/Cart3E.cxx index e77648090..e8e1c77cd 100644 --- a/src/emucore/Cart3E.cxx +++ b/src/emucore/Cart3E.cxx @@ -187,10 +187,10 @@ bool Cartridge3E::bank(uInt16 bank) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt16 Cartridge3E::getBank(uInt16 addr) const { - if(addr & 0x800) - return (mySize >> 11) - 1; // 2K slices, fixed bank + if (addr & 0x800) + return 255; // 256 - 1 // 2K slices, fixed bank else - return 255; // 256 - 1 + return myCurrentBank; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/Cart3F.cxx b/src/emucore/Cart3F.cxx index 1006b362e..98666b0ca 100644 --- a/src/emucore/Cart3F.cxx +++ b/src/emucore/Cart3F.cxx @@ -128,7 +128,7 @@ bool Cartridge3F::bank(uInt16 bank) uInt16 Cartridge3F::getBank(uInt16 addr) const { if (addr & 0x800) - return (mySize >> 11) - 1; // 2K slices, fixed bank + return (mySize >> 11) - 1; // 2K slices, fixed bank else return myCurrentBank; }