Slight cleanup of the System::PageAccess API. Since all c'tor calls will

*always* pass in 0,0,0 for the various bases, it is redundant to pass that
data in on each invocation.  So now the c'tor does it automatically.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2959 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-07-24 16:24:27 +00:00
parent fd88ec3f59
commit ef183beab7
40 changed files with 73 additions and 78 deletions

View File

@ -69,8 +69,7 @@ void Cartridge0840::install(System& system)
myHotSpotPageAccess[7] = mySystem->getPageAccess(0x0F00 >> shift);
// Set the page accessing methods for the hot spots
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 i = 0x0800; i < 0x0FFF; i += (1 << shift))
mySystem->setPageAccess(i >> shift, access);
@ -154,7 +153,7 @@ bool Cartridge0840::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift))

View File

@ -77,7 +77,7 @@ void Cartridge2K::install(System& system)
assert((0x1000 & mask) == 0);
// Map ROM image into the system
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift))
{

View File

@ -71,7 +71,7 @@ void Cartridge3E::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1800 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
System::PageAccess access(this, System::PA_READWRITE);
// Set the page accessing methods for the hot spots (for 100% emulation
// we need to chain any accesses below 0x40 to the TIA. Our poke() method
@ -176,7 +176,7 @@ bool Cartridge3E::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift))
@ -197,7 +197,7 @@ bool Cartridge3E::bank(uInt16 bank)
uInt32 address;
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map read-port RAM image into the system
for(address = 0x1000; address < 0x1400; address += (1 << shift))

View File

@ -64,7 +64,7 @@ void Cartridge3F::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1800 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
System::PageAccess access(this, System::PA_READWRITE);
// Set the page accessing methods for the hot spots (for 100% emulation
// we need to chain any accesses below 0x40 to the TIA. Our poke() method
@ -142,7 +142,7 @@ bool Cartridge3F::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift))

View File

@ -84,7 +84,7 @@ void Cartridge4A50::install(System& system)
assert((0x1000 & mask) == 0);
// Map all of the accesses to call peek and poke (We don't yet indicate RAM areas)
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift))
mySystem->setPageAccess(i >> shift, access);

View File

@ -53,7 +53,7 @@ void Cartridge4K::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1000 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift))

View File

@ -59,7 +59,7 @@ void Cartridge4KSC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;

View File

@ -105,7 +105,7 @@ void CartridgeAR::install(System& system)
assert((0x1000 & mask) == 0);
// Map all of the accesses to call peek and poke (we don't yet indicate RAM areas)
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift))
mySystem->setPageAccess(i >> shift, access);

View File

@ -94,7 +94,7 @@ bool CartridgeBF::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1F80 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeBFSC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1000 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -142,7 +142,7 @@ bool CartridgeBFSC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1F80 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -121,7 +121,7 @@ bool CartridgeCM::bank(uInt16 bank)
// The upper 2K of cart address space can point to either the 2K of RAM or
// the upper 2K of the current ROM bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Lower 2K (always ROM)
for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift))

View File

@ -92,7 +92,7 @@ void CartridgeCTY::install(System& system)
assert(((0x1000 & mask) == 0) && ((0x1080 & mask) == 0));
// Map all RAM accesses to call peek and poke
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 i = 0x1000; i < 0x1080; i += (1 << shift))
mySystem->setPageAccess(i >> shift, access);
@ -255,7 +255,7 @@ bool CartridgeCTY::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 address = 0x1080; address < 0x2000; address += (1 << shift))
{
access.codeAccessBase = &myCodeAccessBase[myCurrentBank + (address & 0x0FFF)];

View File

@ -87,7 +87,7 @@ void CartridgeCV::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1800 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1800; address < 0x2000; address += (1 << shift))

View File

@ -81,7 +81,7 @@ void CartridgeDASH::install(System& system) {
// Make sure the system we're being installed in has a page size that'll work
assert((0x1800 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
System::PageAccess access(this, System::PA_READWRITE);
// Set the page accessing methods for the hot spots (for 100% emulation
// we need to chain any accesses below 0x40 to the TIA. Our poke() method
@ -180,7 +180,7 @@ bool CartridgeDASH::bankRAM(uInt8 bank) {
bankInUse[bankNumber] = bankInUse[bankNumber + 4] = (Int16) (BITMASK_ROMRAM | currentBank); // Record which bank switched in (marked as RAM)
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
uInt32 startCurrentBank = currentBank << RAM_BANK_TO_POWER; // Effectively * 512 bytes
uInt32 base = 0x1000 + startCurrentBank;
@ -228,7 +228,7 @@ bool CartridgeDASH::bankROM(uInt8 bank) {
uInt32 startCurrentBank = currentBank << ROM_BANK_TO_POWER; // Effectively *1K
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
uInt32 base = 0x1000 + (bankNumber << ROM_BANK_TO_POWER);
for (uInt32 address = base; address < base + ROM_BANK_SIZE; address += (1 << shift)) {

View File

@ -94,7 +94,7 @@ bool CartridgeDF::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FC0 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeDFSC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1000 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -142,7 +142,7 @@ bool CartridgeDFSC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FC0 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -91,7 +91,7 @@ void CartridgeDPC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
System::PageAccess access(this, System::PA_READWRITE);
// Set the page accessing method for the DPC reading & writing pages
for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift))
@ -418,7 +418,7 @@ bool CartridgeDPC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -134,7 +134,7 @@ void CartridgeDPCPlus::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map all of the accesses to call peek and poke
for(uInt32 i = 0x1000; i < 0x1080; i += (1 << shift))
@ -610,7 +610,7 @@ bool CartridgeDPCPlus::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map Program ROM image into the system
for(uInt32 address = 0x1080; address < 0x2000; address += (1 << shift))

View File

@ -59,7 +59,7 @@ void CartridgeE0::install(System& system)
assert(((0x1000 & mask) == 0) && ((0x1400 & mask) == 0) &&
((0x1800 & mask) == 0) && ((0x1C00 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page acessing methods for the first part of the last segment
for(uInt32 i = 0x1C00; i < (0x1FE0U & ~mask); i += (1 << shift))
@ -137,7 +137,7 @@ void CartridgeE0::segmentZero(uInt16 slice)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 address = 0x1000; address < 0x1400; address += (1 << shift))
{
@ -159,7 +159,7 @@ void CartridgeE0::segmentOne(uInt16 slice)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 address = 0x1400; address < 0x1800; address += (1 << shift))
{
@ -181,7 +181,7 @@ void CartridgeE0::segmentTwo(uInt16 slice)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
for(uInt32 address = 0x1800; address < 0x1C00; address += (1 << shift))
{

View File

@ -68,7 +68,7 @@ void CartridgeE7::install(System& system)
assert(((0x1400 & mask) == 0) && ((0x1800 & mask) == 0) &&
((0x1900 & mask) == 0) && ((0x1A00 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FE0 & ~mask); i < 0x2000; i += (1 << shift))
@ -169,7 +169,7 @@ void CartridgeE7::bankRAM(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_WRITE);
System::PageAccess access(this, System::PA_WRITE);
// Set the page accessing method for the 256 bytes of RAM writing pages
for(uInt32 j = 0x1800; j < 0x1900; j += (1 << shift))
@ -204,7 +204,7 @@ bool CartridgeE7::bank(uInt16 slice)
// Setup the page access methods for the current bank
if(slice != 7)
{
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into first segment
for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift))
@ -216,7 +216,7 @@ bool CartridgeE7::bank(uInt16 slice)
}
else
{
System::PageAccess access(0, 0, 0, this, System::PA_WRITE);
System::PageAccess access(this, System::PA_WRITE);
// Set the page accessing method for the 1K slice of RAM writing pages
for(uInt32 j = 0x1000; j < 0x1400; j += (1 << shift))

View File

@ -94,7 +94,7 @@ bool CartridgeEF::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FE0 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeEFSC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1000 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -142,7 +142,7 @@ bool CartridgeEFSC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FE0 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -97,7 +97,7 @@ void CartridgeF0::incbank()
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF0 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -99,7 +99,7 @@ bool CartridgeF4::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF4 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeF4SC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -145,7 +145,7 @@ bool CartridgeF4SC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF4 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -139,7 +139,7 @@ bool CartridgeF6::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF6 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeF6SC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -188,7 +188,7 @@ bool CartridgeF6SC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF6 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -127,7 +127,7 @@ bool CartridgeF8::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeF8SC::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1080 & mask) == 0) && ((0x1100 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -168,7 +168,7 @@ bool CartridgeF8SC::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -64,7 +64,7 @@ void CartridgeFA::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1100 & mask) == 0) && ((0x1200 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -178,7 +178,7 @@ bool CartridgeFA::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -80,7 +80,7 @@ void CartridgeFA2::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert(((0x1100 & mask) == 0) && ((0x1200 & mask) == 0));
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing method for the RAM writing pages
access.type = System::PA_WRITE;
@ -248,7 +248,7 @@ bool CartridgeFA2::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
uInt16 mask = mySystem->pageMask();
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = (0x1FF4 & ~mask); i < 0x2000; i += (1 << shift))

View File

@ -63,7 +63,7 @@ void CartridgeFE::install(System& system)
// Make sure the system we're being installed in has a page size that'll work
assert((0x1000 & mask) == 0);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map all of the accesses to call peek and poke
for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift))

View File

@ -82,7 +82,7 @@ void CartridgeMC::install(System& system)
// TODO: These TIA accesses may need to be chained, however, at this
// point Chris isn't sure if the hardware will allow it or not
//
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
System::PageAccess access(this, System::PA_READWRITE);
for(uInt32 i = 0x00; i < 0x40; i += (1 << shift))
mySystem->setPageAccess(i >> shift, access);

View File

@ -74,7 +74,7 @@ void CartridgeSB::install(System& system)
myHotSpotPageAccess[6] = mySystem->getPageAccess(0x0E00 >> shift);
myHotSpotPageAccess[7] = mySystem->getPageAccess(0x0F00 >> shift);
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Set the page accessing methods for the hot spots
for(uInt32 i = 0x0800; i < 0x0FFF; i += (1 << shift))
@ -134,7 +134,7 @@ bool CartridgeSB::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift))

View File

@ -62,7 +62,7 @@ void CartridgeUA::install(System& system)
myHotSpotPageAccess = mySystem->getPageAccess(0x0220 >> shift);
// Set the page accessing methods for the hot spots
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
mySystem->setPageAccess(0x0220 >> shift, access);
mySystem->setPageAccess(0x0240 >> shift, access);
@ -142,7 +142,7 @@ bool CartridgeUA::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift))

View File

@ -62,7 +62,7 @@ void CartridgeX07::install(System& system)
// Set the page accessing methods for the hot spots
// The hotspots use almost all addresses below 0x1000, so we simply grab them
// all and forward the TIA/RIOT calls from the peek and poke methods.
System::PageAccess access(0, 0, 0, this, System::PA_READWRITE);
System::PageAccess access(this, System::PA_READWRITE);
for(uInt32 i = 0x00; i < 0x1000; i += (1 << shift))
mySystem->setPageAccess(i >> shift, access);
@ -126,7 +126,7 @@ bool CartridgeX07::bank(uInt16 bank)
uInt16 shift = mySystem->pageShift();
// Setup the page access methods for the current bank
System::PageAccess access(0, 0, 0, this, System::PA_READ);
System::PageAccess access(this, System::PA_READ);
// Map ROM image into the system
for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift))

View File

@ -123,7 +123,7 @@ void M6532::install(System& system, Device& device)
assert((0x1080 & mask) == 0);
// All accesses are to the given device
System::PageAccess access(0, 0, 0, &device, System::PA_READWRITE);
System::PageAccess access(&device, System::PA_READWRITE);
// We're installing in a 2600 system
for(int address = 0; address < 8192; address += (1 << shift))

View File

@ -51,10 +51,7 @@ System::System(uInt16 n, uInt16 m)
myPageIsDirtyTable = new bool[myNumberOfPages];
// Initialize page access table
PageAccess access;
access.directPeekBase = 0;
access.directPokeBase = 0;
access.device = &myNullDevice;
PageAccess access(&myNullDevice, System::PA_READ);
for(int page = 0; page < myNumberOfPages; ++page)
{
setPageAccess(page, access);

View File

@ -115,7 +115,7 @@ class System : public Serializable
@return The attached 6502 microprocessor
*/
M6502& m6502() { return *myM6502; }
M6502& m6502() const { return *myM6502; }
/**
Answer the 6532 processor attached to the system. If a
@ -123,21 +123,21 @@ class System : public Serializable
@return The attached 6532 microprocessor
*/
M6532& m6532() { return *myM6532; }
M6532& m6532() const { return *myM6532; }
/**
Answer the TIA device attached to the system.
@return The attached TIA device
*/
TIA& tia() { return *myTIA; }
TIA& tia() const { return *myTIA; }
/**
Answer the random generator attached to the system.
@return The random generator
*/
Random& randGenerator() { return *myRandom; }
Random& randGenerator() const { return *myRandom; }
/**
Get the null device associated with the system. Every system
@ -337,11 +337,10 @@ class System : public Serializable
device(0),
type(System::PA_READ) { }
PageAccess(uInt8* peek, uInt8* poke, uInt8* code, Device* dev,
PageAccessType access)
: directPeekBase(peek),
directPokeBase(poke),
codeAccessBase(code),
PageAccess(Device* dev, PageAccessType access)
: directPeekBase(0),
directPokeBase(0),
codeAccessBase(0),
device(dev),
type(access) { }
};

View File

@ -256,7 +256,7 @@ void TIA::install(System& system, Device& device)
mySystem->resetCycles();
// All accesses are to the given device
System::PageAccess access(0, 0, 0, &device, System::PA_READWRITE);
System::PageAccess access(&device, System::PA_READWRITE);
// We're installing in a 2600 system
for(uInt32 i = 0; i < 8192; i += (1 << shift))