Converted another plain enum to 'enum class'.

This commit is contained in:
Stephen Anthony 2019-03-09 16:02:43 -03:30
parent 51981d633d
commit 91c98ceed2
45 changed files with 125 additions and 125 deletions

View File

@ -54,7 +54,7 @@ void Cartridge0840::install(System& system)
myHotSpotPageAccess[7] = mySystem->getPageAccess(0x0F00);
// Set the page accessing methods for the hot spots
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x0800; addr < 0x0FFF; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -132,7 +132,7 @@ bool Cartridge0840::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -61,7 +61,7 @@ void Cartridge2K::install(System& system)
// Map ROM image into the system
// Note that we don't need our own peek/poke methods, since the mapping
// takes care of the entire address space
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myImage[addr & myMask];

View File

@ -49,14 +49,14 @@ void Cartridge3E::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
// The hotspots ($3E and $3F) are in TIA address space, so we claim it here
for(uInt16 addr = 0x00; addr < 0x40; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
// Setup the second segment to always point to the last ROM slice
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1800; addr < 0x2000; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myImage[(mySize - 2048) + (addr & 0x07FF)];
@ -140,7 +140,7 @@ bool Cartridge3E::bank(uInt16 bank)
uInt32 offset = myCurrentBank << 11;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x1800; addr += System::PAGE_SIZE)
@ -159,7 +159,7 @@ bool Cartridge3E::bank(uInt16 bank)
uInt32 offset = bank << 10;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map read-port RAM image into the system
for(uInt16 addr = 0x1000; addr < 0x1400; addr += System::PAGE_SIZE)
@ -170,7 +170,7 @@ bool Cartridge3E::bank(uInt16 bank)
}
access.directPeekBase = nullptr;
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
// Map write-port RAM image into the system
// Map access to this class, since we need to inspect all accesses to

View File

@ -59,7 +59,7 @@ void Cartridge3EPlus::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
// The hotspots are in TIA address space, so we claim it here
for(uInt16 addr = 0x00; addr < 0x40; addr += System::PAGE_SIZE)
@ -167,17 +167,17 @@ void Cartridge3EPlus::bankRAMSlot(uInt16 bank)
//cerr << "raw bank=" << std::dec << currentBank << endl
// << "startCurrentBank=$" << std::hex << startCurrentBank << endl;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
if(upper) // We're mapping the write port
{
bankInUse[bankNumber * 2 + 1] = Int16(bank);
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
}
else // We're mapping the read port
{
bankInUse[bankNumber * 2] = Int16(bank);
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
}
uInt16 start = 0x1000 + (bankNumber << (RAM_BANK_TO_POWER+1)) + (upper ? RAM_WRITE_OFFSET : 0);
@ -222,7 +222,7 @@ void Cartridge3EPlus::bankROMSlot(uInt16 bank)
uInt32 startCurrentBank = currentBank << ROM_BANK_TO_POWER; // Effectively *1K
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
uInt16 start = 0x1000 + (bankNumber << ROM_BANK_TO_POWER) + (upper ? ROM_BANK_SIZE / 2 : 0);
uInt16 end = start + ROM_BANK_SIZE / 2 - 1;
@ -244,7 +244,7 @@ void Cartridge3EPlus::initializeBankState()
if(bankInUse[b] == BANK_UNDEFINED)
{
// All accesses point to peek/poke above
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
uInt16 start = 0x1000 + (b << RAM_BANK_TO_POWER);
uInt16 end = start + RAM_BANK_SIZE - 1;
for(uInt16 addr = start; addr <= end; addr += System::PAGE_SIZE)

View File

@ -47,14 +47,14 @@ void Cartridge3F::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
// The hotspot ($3F) is in TIA address space, so we claim it here
for(uInt16 addr = 0x00; addr < 0x40; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
// Setup the second segment to always point to the last ROM slice
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1800; addr < 0x2000; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myImage[(mySize - 2048) + (addr & 0x07FF)];
@ -112,7 +112,7 @@ bool Cartridge3F::bank(uInt16 bank)
uInt32 offset = myCurrentBank << 11;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x1800; addr += System::PAGE_SIZE)

View File

@ -72,7 +72,7 @@ void Cartridge4A50::install(System& system)
mySystem = &system;
// Map all of the accesses to call peek and poke (We don't yet indicate RAM areas)
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);

View File

@ -42,7 +42,7 @@ void Cartridge4K::install(System& system)
// Map ROM image into the system
// Note that we don't need our own peek/poke methods, since the mapping
// takes care of the entire address space
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myImage[addr & 0x0FFF];

View File

@ -41,12 +41,12 @@ void Cartridge4KSC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -54,7 +54,7 @@ void Cartridge4KSC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];

View File

@ -79,7 +79,7 @@ void CartridgeAR::install(System& system)
mySystem = &system;
// Map all of the accesses to call peek and poke (we don't yet indicate RAM areas)
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);

View File

@ -83,7 +83,7 @@ bool CartridgeBF::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1F80 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeBFSC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -57,7 +57,7 @@ void CartridgeBFSC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];
@ -110,7 +110,7 @@ bool CartridgeBFSC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1F80 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -123,7 +123,7 @@ void CartridgeBUS::install(System& system)
mySystem = &system;
// Map all of the accesses to call peek and poke
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x1040; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -437,7 +437,7 @@ bool CartridgeBUS::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map Program ROM image into the system
for(uInt16 addr = 0x1040; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -123,7 +123,7 @@ void CartridgeCDF::install(System& system)
mySystem = &system;
// Map all of the accesses to call peek and poke
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x1040; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -394,7 +394,7 @@ bool CartridgeCDF::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map Program ROM image into the system
for(uInt16 addr = 0x1040; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -115,7 +115,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(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Lower 2K (always ROM)
for(uInt16 addr = 0x1000; addr < 0x1800; addr += System::PAGE_SIZE)
@ -128,7 +128,7 @@ bool CartridgeCM::bank(uInt16 bank)
// Upper 2K (RAM or ROM)
for(uInt16 addr = 0x1800; addr < 0x2000; addr += System::PAGE_SIZE)
{
access.type = System::PA_READWRITE;
access.type = System::PageAccessType::READWRITE;
if(mySWCHA & 0x10)
{

View File

@ -73,7 +73,7 @@ void CartridgeCTY::install(System& system)
mySystem = &system;
// Map all RAM accesses to call peek and poke
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -241,7 +241,7 @@ bool CartridgeCTY::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1080; addr < 0x2000; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[myBankOffset + (addr & 0x0FFF)];

View File

@ -63,7 +63,7 @@ void CartridgeCV::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1800; addr < 0x2000; addr += System::PAGE_SIZE)
@ -78,13 +78,13 @@ void CartridgeCV::install(System& system)
// check if RWP happens
access.directPeekBase = nullptr;
access.codeAccessBase = nullptr;
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1400; addr < 0x1800; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
// Set the page accessing method for the RAM reading pages
access.directPokeBase = nullptr;
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1000; addr < 0x1400; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x03FF];

View File

@ -49,7 +49,7 @@ void CartridgeCVPlus::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
// The hotspot ($3D) is in TIA address space, so we claim it here
for(uInt16 addr = 0x00; addr < 0x40; addr += System::PAGE_SIZE)
@ -60,7 +60,7 @@ void CartridgeCVPlus::install(System& system)
// check if RWP happens
access.directPeekBase = access.directPokeBase = nullptr;
access.codeAccessBase = nullptr;
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1400; addr < 0x1800; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[mySize + (addr & 0x03FF)];
@ -68,7 +68,7 @@ void CartridgeCVPlus::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1000; addr < 0x1400; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x03FF];
@ -130,7 +130,7 @@ bool CartridgeCVPlus::bank(uInt16 bank)
uInt32 offset = myCurrentBank << 11;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1800; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -61,7 +61,7 @@ void CartridgeDASH::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
// The hotspots are in TIA address space, so we claim it here
for (uInt16 addr = 0x00; addr < 0x40; addr += System::PAGE_SIZE)
@ -171,17 +171,17 @@ void CartridgeDASH::bankRAMSlot(uInt16 bank)
uInt32 startCurrentBank = currentBank << RAM_BANK_TO_POWER; // Effectively * 512 bytes
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
if(upper) // We're mapping the write port
{
bankInUse[bankNumber + 4] = Int16(bank);
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
}
else // We're mapping the read port
{
bankInUse[bankNumber] = Int16(bank);
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
}
uInt16 start = 0x1000 + (bankNumber << RAM_BANK_TO_POWER) + (upper ? RAM_WRITE_OFFSET : 0);
@ -227,7 +227,7 @@ void CartridgeDASH::bankROMSlot(uInt16 bank)
uInt32 startCurrentBank = currentBank << ROM_BANK_TO_POWER; // Effectively *1K
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
uInt16 start = 0x1000 + (bankNumber << ROM_BANK_TO_POWER) + (upper ? ROM_BANK_SIZE / 2 : 0);
uInt16 end = start + ROM_BANK_SIZE / 2 - 1;
@ -249,7 +249,7 @@ void CartridgeDASH::initializeBankState()
if(bankInUse[b] == BANK_UNDEFINED)
{
// All accesses point to peek/poke above
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
uInt16 start = 0x1000 + (b << RAM_BANK_TO_POWER);
uInt16 end = start + RAM_BANK_SIZE - 1;
for (uInt16 addr = start; addr <= end; addr += System::PAGE_SIZE)

View File

@ -79,7 +79,7 @@ bool CartridgeDF::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FC0 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeDFSC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -57,7 +57,7 @@ void CartridgeDFSC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];
@ -110,7 +110,7 @@ bool CartridgeDFSC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FC0 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -68,7 +68,7 @@ void CartridgeDPC::install(System& system)
mySystem = &system;
// Set the page accessing method for the DPC reading & writing pages
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -380,7 +380,7 @@ bool CartridgeDPC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF8 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -117,7 +117,7 @@ void CartridgeDPCPlus::install(System& system)
mySystem = &system;
// Map all of the accesses to call peek and poke
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -581,7 +581,7 @@ bool CartridgeDPCPlus::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map Program ROM image into the system
for(uInt16 addr = 0x1080; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -54,7 +54,7 @@ void CartridgeE0::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page acessing methods for the first part of the last segment
for(uInt16 addr = 0x1C00; addr < (0x1FE0U & ~System::PAGE_MASK);
@ -68,7 +68,7 @@ void CartridgeE0::install(System& system)
// Set the page accessing methods for the hot spots in the last segment
access.directPeekBase = nullptr;
access.codeAccessBase = &myCodeAccessBase[8128];
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = (0x1FE0 & ~System::PAGE_MASK); addr < 0x2000;
addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -127,7 +127,7 @@ void CartridgeE0::segmentZero(uInt16 slice)
uInt16 offset = slice << 10;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x1400; addr += System::PAGE_SIZE)
{
@ -148,7 +148,7 @@ void CartridgeE0::segmentOne(uInt16 slice)
uInt16 offset = slice << 10;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1400; addr < 0x1800; addr += System::PAGE_SIZE)
{
@ -169,7 +169,7 @@ void CartridgeE0::segmentTwo(uInt16 slice)
uInt16 offset = slice << 10;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1800; addr < 0x1C00; addr += System::PAGE_SIZE)
{

View File

@ -79,7 +79,7 @@ bool CartridgeEF::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FE0 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeEFSC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -57,7 +57,7 @@ void CartridgeEFSC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];
@ -110,7 +110,7 @@ bool CartridgeEFSC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FE0 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -86,7 +86,7 @@ bool CartridgeF0::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF0 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -83,7 +83,7 @@ bool CartridgeF4::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF4 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeF4SC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -57,7 +57,7 @@ void CartridgeF4SC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];
@ -110,7 +110,7 @@ bool CartridgeF4SC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF4 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -123,7 +123,7 @@ bool CartridgeF6::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF6 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeF6SC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -57,7 +57,7 @@ void CartridgeF6SC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];
@ -150,7 +150,7 @@ bool CartridgeF6SC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF6 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -104,7 +104,7 @@ bool CartridgeF8::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF8 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeF8SC::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1080; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x007F];
@ -57,7 +57,7 @@ void CartridgeF8SC::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1080; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x007F];
@ -130,7 +130,7 @@ bool CartridgeF8SC::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF8 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -44,12 +44,12 @@ void CartridgeFA::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x00FF];
@ -57,7 +57,7 @@ void CartridgeFA::install(System& system)
}
// Set the page accessing method for the RAM reading pages
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1100; addr < 0x1200; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x00FF];
@ -140,7 +140,7 @@ bool CartridgeFA::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF8 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -56,12 +56,12 @@ void CartridgeFA2::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
access.type = System::PA_WRITE;
access.type = System::PageAccessType::WRITE;
for(uInt16 addr = 0x1000; addr < 0x1100; addr += System::PAGE_SIZE)
{
access.codeAccessBase = &myCodeAccessBase[addr & 0x00FF];
@ -70,7 +70,7 @@ void CartridgeFA2::install(System& system)
// Set the page accessing method for the RAM reading pages
access.directPokeBase = nullptr;
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1100; addr < 0x1200; addr += System::PAGE_SIZE)
{
access.directPeekBase = &myRAM[addr & 0x00FF];
@ -207,7 +207,7 @@ bool CartridgeFA2::bank(uInt16 bank)
// Remember what bank we're in
myBankOffset = bank << 12;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FF4 & ~System::PAGE_MASK); addr < 0x2000;

View File

@ -48,12 +48,12 @@ void CartridgeFE::install(System& system)
// The hotspot $01FE is in a mirror of zero-page RAM
// We need to claim access to it here, and deal with it in peek/poke below
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
for(uInt16 addr = 0x180; addr < 0x200; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
// Map all of the cart accesses to call peek and poke
access.type = System::PA_READ;
access.type = System::PageAccessType::READ;
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
}

View File

@ -60,7 +60,7 @@ void CartridgeMDM::install(System& system)
myHotSpotPageAccess[7] = mySystem->getPageAccess(0x0F00);
// Set the page accessing methods for the hot spots
System::PageAccess access(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
for(uInt16 addr = 0x0800; addr < 0x0BFF; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -107,7 +107,7 @@ bool CartridgeMDM::bank(uInt16 bank)
myBankOffset = (bank % bankCount()) << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -68,9 +68,9 @@ void CartridgeMNetwork::setAccess(uInt16 addrFrom, uInt16 size,
for(uInt16 addr = addrFrom; addr < addrFrom + size; addr += System::PAGE_SIZE)
{
if(type == System::PA_READ)
if(type == System::PageAccessType::READ)
access.directPeekBase = &directData[directOffset + (addr & addrMask)];
else if(type == System::PA_WRITE) // all RAM writes mapped to ::poke()
else if(type == System::PageAccessType::WRITE) // all RAM writes mapped to ::poke()
access.directPokeBase = nullptr;
access.codeAccessBase = &myCodeAccessBase[codeOffset + (addr & addrMask)];
mySystem->setPageAccess(addr, access);
@ -82,7 +82,7 @@ void CartridgeMNetwork::install(System& system)
{
mySystem = &system;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = (0x1FE0 & ~System::PAGE_MASK); addr < 0x2000;
@ -96,7 +96,7 @@ void CartridgeMNetwork::install(System& system)
// Setup the second segment to always point to the last ROM slice
setAccess(0x1A00, 0x1FE0U & (~System::PAGE_MASK - 0x1A00),
myRAMSlice * BANK_SIZE, myImage.get(), myRAMSlice * BANK_SIZE, System::PA_READ, BANK_SIZE - 1);
myRAMSlice * BANK_SIZE, myImage.get(), myRAMSlice * BANK_SIZE, System::PageAccessType::READ, BANK_SIZE - 1);
myCurrentSlice[1] = myRAMSlice;
// Install some default banks for the RAM and first segment
@ -162,9 +162,9 @@ void CartridgeMNetwork::bankRAM(uInt16 bank)
// Setup the page access methods for the current bank
// Set the page accessing method for the 256 bytes of RAM reading pages
setAccess(0x1800, 0x100, 1024 + offset, myRAM, romSize() + BANK_SIZE / 2, System::PA_WRITE);
setAccess(0x1800, 0x100, 1024 + offset, myRAM, romSize() + BANK_SIZE / 2, System::PageAccessType::WRITE);
// Set the page accessing method for the 256 bytes of RAM reading pages
setAccess(0x1900, 0x100, 1024 + offset, myRAM, romSize() + BANK_SIZE / 2, System::PA_READ);
setAccess(0x1900, 0x100, 1024 + offset, myRAM, romSize() + BANK_SIZE / 2, System::PageAccessType::READ);
myBankChanged = true;
}
@ -183,14 +183,14 @@ bool CartridgeMNetwork::bank(uInt16 slice)
uInt16 offset = slice << 11; // * BANK_SIZE (2048)
// Map ROM image into first segment
setAccess(0x1000, BANK_SIZE, offset, myImage.get(), offset, System::PA_READ);
setAccess(0x1000, BANK_SIZE, offset, myImage.get(), offset, System::PageAccessType::READ);
}
else
{
// Set the page accessing method for the 1K slice of RAM writing pages
setAccess(0x1000, BANK_SIZE / 2, 0, myRAM, romSize(), System::PA_WRITE);
setAccess(0x1000, BANK_SIZE / 2, 0, myRAM, romSize(), System::PageAccessType::WRITE);
// Set the page accessing method for the 1K slice of RAM reading pages
setAccess(0x1000 + BANK_SIZE / 2, BANK_SIZE / 2, 0, myRAM, romSize(), System::PA_READ);
setAccess(0x1000 + BANK_SIZE / 2, BANK_SIZE / 2, 0, myRAM, romSize(), System::PageAccessType::READ);
}
return myBankChanged = true;
}

View File

@ -58,7 +58,7 @@ void CartridgeSB::install(System& system)
myHotSpotPageAccess[6] = mySystem->getPageAccess(0x0E00);
myHotSpotPageAccess[7] = mySystem->getPageAccess(0x0F00);
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Set the page accessing methods for the hot spots
for(uInt16 addr = 0x0800; addr < 0x0FFF; addr += System::PAGE_SIZE)
@ -116,7 +116,7 @@ bool CartridgeSB::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -47,7 +47,7 @@ void CartridgeUA::install(System& system)
myHotSpotPageAccess = mySystem->getPageAccess(0x0220);
// Set the page accessing methods for the hot spots
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
mySystem->setPageAccess(0x0220, access);
mySystem->setPageAccess(0x0240, access);
@ -121,7 +121,7 @@ bool CartridgeUA::bank(uInt16 bank)
myBankOffset = bank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -53,7 +53,7 @@ void CartridgeWD::install(System& system)
mySystem = &system;
// Set the page accessing method for the RAM reading pages
System::PageAccess read(this, System::PA_READ);
System::PageAccess read(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1000; addr < 0x1040; addr += System::PAGE_SIZE)
{
read.directPeekBase = &myRAM[addr & 0x003F];
@ -64,7 +64,7 @@ void CartridgeWD::install(System& system)
// Set the page accessing method for the RAM writing pages
// Map access to this class, since we need to inspect all accesses to
// check if RWP happens
System::PageAccess write(this, System::PA_WRITE);
System::PageAccess write(this, System::PageAccessType::WRITE);
for(uInt16 addr = 0x1040; addr < 0x1080; addr += System::PAGE_SIZE)
{
write.codeAccessBase = &myCodeAccessBase[addr & 0x003F];
@ -153,7 +153,7 @@ bool CartridgeWD::bank(uInt16 bank)
void CartridgeWD::segmentZero(uInt8 slice)
{
uInt16 offset = slice << 10;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Skip first 128 bytes; it is always RAM
for(uInt16 addr = 0x1080; addr < 0x1400; addr += System::PAGE_SIZE)
@ -168,7 +168,7 @@ void CartridgeWD::segmentZero(uInt8 slice)
void CartridgeWD::segmentOne(uInt8 slice)
{
uInt16 offset = slice << 10;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1400; addr < 0x1800; addr += System::PAGE_SIZE)
{
@ -182,7 +182,7 @@ void CartridgeWD::segmentOne(uInt8 slice)
void CartridgeWD::segmentTwo(uInt8 slice)
{
uInt16 offset = slice << 10;
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1800; addr < 0x1C00; addr += System::PAGE_SIZE)
{
@ -207,7 +207,7 @@ void CartridgeWD::segmentThree(uInt8 slice, bool map3bytes)
mySegment3[0x3FE] = myImage[0x2000+2];
}
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
for(uInt16 addr = 0x1C00; addr < 0x2000; addr += System::PAGE_SIZE)
{

View File

@ -47,7 +47,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(this, System::PA_READWRITE);
System::PageAccess access(this, System::PageAccessType::READWRITE);
for(uInt16 addr = 0x00; addr < 0x1000; addr += System::PAGE_SIZE)
mySystem->setPageAccess(addr, access);
@ -110,7 +110,7 @@ bool CartridgeX07::bank(uInt16 bank)
uInt32 offset = myCurrentBank << 12;
// Setup the page access methods for the current bank
System::PageAccess access(this, System::PA_READ);
System::PageAccess access(this, System::PageAccessType::READ);
// Map ROM image into the system
for(uInt16 addr = 0x1000; addr < 0x2000; addr += System::PAGE_SIZE)

View File

@ -168,7 +168,7 @@ void M6532::installDelegate(System& system, Device& device)
mySystem = &system;
// All accesses are to the given device
System::PageAccess access(&device, System::PA_READWRITE);
System::PageAccess access(&device, System::PageAccessType::READWRITE);
// Map all peek/poke to mirrors of RIOT address space to this class
// That is, all mirrors of ZP RAM ($80 - $FF) and IO ($280 - $29F) in the

View File

@ -40,7 +40,7 @@ System::System(Random& random, M6502& m6502, M6532& m6532,
mySystemInAutodetect(false)
{
// Initialize page access table
PageAccess access(&myNullDevice, System::PA_READ);
PageAccess access(&myNullDevice, System::PageAccessType::READ);
for(int page = 0; page < NUM_PAGES; ++page)
{
myPageAccessTable[page] = access;

View File

@ -243,10 +243,10 @@ class System : public Serializable
/**
Describes how a page can be accessed
*/
enum PageAccessType {
PA_READ = 1 << 0,
PA_WRITE = 1 << 1,
PA_READWRITE = PA_READ | PA_WRITE
enum class PageAccessType : uInt8 {
READ = 1 << 0,
WRITE = 1 << 1,
READWRITE = READ | WRITE
};
/**
@ -297,7 +297,7 @@ class System : public Serializable
directPokeBase(nullptr),
codeAccessBase(nullptr),
device(nullptr),
type(System::PA_READ) { }
type(System::PageAccessType::READ) { }
PageAccess(Device* dev, PageAccessType access)
: directPeekBase(nullptr),

View File

@ -245,7 +245,7 @@ void TIA::installDelegate(System& system, Device& device)
mySystem = &system;
// All accesses are to the given device
System::PageAccess access(&device, System::PA_READWRITE);
System::PageAccess access(&device, System::PageAccessType::READWRITE);
// Map all peek/poke to mirrors of TIA address space to this class
// That is, all mirrors of ($00 - $3F) in the lower 4K of the 2600