Update explanation of FE scheme, and minor code optimization.

This commit is contained in:
Stephen Anthony 2017-08-30 16:53:00 -02:30
parent d37b89e2fd
commit 1358be402f
2 changed files with 3 additions and 7 deletions

View File

@ -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);

View File

@ -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