diff --git a/src/emucore/CartFE.cxx b/src/emucore/CartFE.cxx index 0075bcc0d..23ae6267a 100644 --- a/src/emucore/CartFE.cxx +++ b/src/emucore/CartFE.cxx @@ -59,12 +59,8 @@ void CartridgeFE::install(System& system) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt8 CartridgeFE::peek(uInt16 address) { - uInt8 value = 0; - - if(address < 0x200) - value = mySystem->m6532().peek(address); - else - value = myImage[myBankOffset + (address & 0x0FFF)]; + uInt8 value = (address < 0x200) ? mySystem->m6532().peek(address) : + myImage[myBankOffset + (address & 0x0FFF)]; // Check if we hit hotspot checkBankSwitch(address, value); diff --git a/src/emucore/CartFE.hxx b/src/emucore/CartFE.hxx index 6954001eb..758c45b4b 100644 --- a/src/emucore/CartFE.hxx +++ b/src/emucore/CartFE.hxx @@ -65,7 +65,7 @@ class System; binary 111 -> decimal 7 -> Lower 4K ROM (bank 0) @ $F000 Since the actual bank numbers (0 and 1) do not map directly to their - respective bitstrings (7 and 6), we simply test for D6 being 0 or 1. + respective bitstrings (7 and 6), we simply test for D5 being 0 or 1. This is the significance of the test '(value & 0x20) ? 0 : 1' in the code. NOTE: Consult the patent application for more specific information, in