From 32aa9d31868d5e87f9ba14335dad38dbfef7a43b Mon Sep 17 00:00:00 2001 From: stephena Date: Wed, 14 Apr 2010 22:35:46 +0000 Subject: [PATCH] Fixed a *REALLY* annoying bug in Windows with the latest code. It seems that System::PAGE_xxx enumerations were already defined elsewhere in a Windows header file. This was very irritating to track down. As a result, they're now named System::PA_xxx (for 'PageAccess'). The file selector in Windows now ignores all items starting with '.', not just the directories '.' and '..'. This is most apparent when using the Windows port and browing Linux shares, which shows many dot files. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2012 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- src/debugger/CartDebug.cxx | 2 +- src/emucore/Cart0840.cxx | 4 ++-- src/emucore/Cart2K.cxx | 2 +- src/emucore/Cart3E.cxx | 10 +++++----- src/emucore/Cart3F.cxx | 6 +++--- src/emucore/Cart4A50.cxx | 2 +- src/emucore/Cart4K.cxx | 2 +- src/emucore/CartAR.cxx | 2 +- src/emucore/CartCV.cxx | 6 +++--- src/emucore/CartDPC.cxx | 6 +++--- src/emucore/CartDPCPlus.cxx | 2 +- src/emucore/CartE0.cxx | 10 +++++----- src/emucore/CartE7.cxx | 14 +++++++------- src/emucore/CartEF.cxx | 4 ++-- src/emucore/CartEFSC.cxx | 8 ++++---- src/emucore/CartF0.cxx | 4 ++-- src/emucore/CartF4.cxx | 4 ++-- src/emucore/CartF4SC.cxx | 8 ++++---- src/emucore/CartF6.cxx | 4 ++-- src/emucore/CartF6SC.cxx | 8 ++++---- src/emucore/CartF8.cxx | 4 ++-- src/emucore/CartF8SC.cxx | 8 ++++---- src/emucore/CartFA.cxx | 8 ++++---- src/emucore/CartFE.cxx | 2 +- src/emucore/CartMC.cxx | 4 ++-- src/emucore/CartSB.cxx | 4 ++-- src/emucore/CartUA.cxx | 4 ++-- src/emucore/CartX07.cxx | 4 ++-- src/emucore/EventHandler.cxx | 2 +- src/emucore/FrameBuffer.cxx | 2 +- src/emucore/M6532.cxx | 2 +- src/emucore/System.cxx | 4 ++-- src/emucore/System.hxx | 18 +++++++++--------- src/emucore/TIA.cxx | 2 +- src/win32/FSNodeWin32.cxx | 2 +- 35 files changed, 89 insertions(+), 89 deletions(-) diff --git a/src/debugger/CartDebug.cxx b/src/debugger/CartDebug.cxx index e0c89e36f..1bd268167 100644 --- a/src/debugger/CartDebug.cxx +++ b/src/debugger/CartDebug.cxx @@ -132,7 +132,7 @@ int CartDebug::readFromWritePort() // differentiates between reads that are normally part of a write cycle vs. // ones that are illegal) if(mySystem.m6502().lastReadAddress() && - (mySystem.getPageType(addr) & System::PAGE_WRITE) == System::PAGE_WRITE) + (mySystem.getPageAccessType(addr) & System::PA_WRITE) == System::PA_WRITE) return addr; else return 0; diff --git a/src/emucore/Cart0840.cxx b/src/emucore/Cart0840.cxx index d6e419b85..969c0a547 100644 --- a/src/emucore/Cart0840.cxx +++ b/src/emucore/Cart0840.cxx @@ -71,7 +71,7 @@ void Cartridge0840::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = 0x0800; i < 0x0FFF; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -159,7 +159,7 @@ void Cartridge0840::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift)) diff --git a/src/emucore/Cart2K.cxx b/src/emucore/Cart2K.cxx index 38a8f185e..6f1485355 100644 --- a/src/emucore/Cart2K.cxx +++ b/src/emucore/Cart2K.cxx @@ -78,7 +78,7 @@ void Cartridge2K::install(System& system) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift)) { diff --git a/src/emucore/Cart3E.cxx b/src/emucore/Cart3E.cxx index c2fcdb6bc..71d905d56 100644 --- a/src/emucore/Cart3E.cxx +++ b/src/emucore/Cart3E.cxx @@ -79,14 +79,14 @@ void Cartridge3E::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; for(uInt32 i = 0x00; i < 0x40; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Setup the second segment to always point to the last ROM slice access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 j = 0x1800; j < 0x2000; j += (1 << shift)) { access.directPeekBase = &myImage[(mySize - 2048) + (j & 0x07FF)]; @@ -183,7 +183,7 @@ void Cartridge3E::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift)) @@ -206,7 +206,7 @@ void Cartridge3E::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map read-port RAM image into the system for(address = 0x1000; address < 0x1400; address += (1 << shift)) @@ -216,7 +216,7 @@ void Cartridge3E::bank(uInt16 bank) } access.directPeekBase = 0; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; // Map write-port RAM image into the system for(address = 0x1400; address < 0x1800; address += (1 << shift)) diff --git a/src/emucore/Cart3F.cxx b/src/emucore/Cart3F.cxx index f55e16172..8a89d3471 100644 --- a/src/emucore/Cart3F.cxx +++ b/src/emucore/Cart3F.cxx @@ -69,14 +69,14 @@ void Cartridge3F::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; for(uInt32 i = 0x00; i < 0x40; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Setup the second segment to always point to the last ROM slice access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 j = 0x1800; j < 0x2000; j += (1 << shift)) { access.directPeekBase = &myImage[(mySize - 2048) + (j & 0x07FF)]; @@ -146,7 +146,7 @@ void Cartridge3F::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift)) diff --git a/src/emucore/Cart4A50.cxx b/src/emucore/Cart4A50.cxx index cb8454b26..b478e7f1f 100644 --- a/src/emucore/Cart4A50.cxx +++ b/src/emucore/Cart4A50.cxx @@ -73,7 +73,7 @@ void Cartridge4A50::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; // We don't yet indicate RAM areas + access.type = System::PA_READ; // We don't yet indicate RAM areas for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); diff --git a/src/emucore/Cart4K.cxx b/src/emucore/Cart4K.cxx index 7ff05af68..fc53c6719 100644 --- a/src/emucore/Cart4K.cxx +++ b/src/emucore/Cart4K.cxx @@ -54,7 +54,7 @@ void Cartridge4K::install(System& system) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift)) diff --git a/src/emucore/CartAR.cxx b/src/emucore/CartAR.cxx index 66aec9327..50b9e3d13 100644 --- a/src/emucore/CartAR.cxx +++ b/src/emucore/CartAR.cxx @@ -98,7 +98,7 @@ void CartridgeAR::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; // We don't yet indicate RAM areas + access.type = System::PA_READ; // We don't yet indicate RAM areas for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); diff --git a/src/emucore/CartCV.cxx b/src/emucore/CartCV.cxx index 330cc5112..2a77dfa77 100644 --- a/src/emucore/CartCV.cxx +++ b/src/emucore/CartCV.cxx @@ -89,7 +89,7 @@ void CartridgeCV::install(System& system) // Map ROM image into the system access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 address = 0x1800; address < 0x2000; address += (1 << shift)) { access.directPeekBase = &myImage[address & 0x07FF]; @@ -99,7 +99,7 @@ void CartridgeCV::install(System& system) // Set the page accessing method for the RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1400; j < 0x1800; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x03FF]; @@ -109,7 +109,7 @@ void CartridgeCV::install(System& system) // Set the page accessing method for the RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1000; k < 0x1400; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x03FF]; diff --git a/src/emucore/CartDPC.cxx b/src/emucore/CartDPC.cxx index be2d4febe..e02d00ab7 100644 --- a/src/emucore/CartDPC.cxx +++ b/src/emucore/CartDPC.cxx @@ -94,7 +94,7 @@ void CartridgeDPC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -102,7 +102,7 @@ void CartridgeDPC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift)) mySystem->setPageAccess(j >> shift, access); @@ -431,7 +431,7 @@ void CartridgeDPC::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map Program ROM image into the system for(uInt32 address = 0x1080; address < (0x1FF8U & ~mask); diff --git a/src/emucore/CartDPCPlus.cxx b/src/emucore/CartDPCPlus.cxx index 48fd4b39c..a8343ae0a 100644 --- a/src/emucore/CartDPCPlus.cxx +++ b/src/emucore/CartDPCPlus.cxx @@ -100,7 +100,7 @@ void CartridgeDPCPlus::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); diff --git a/src/emucore/CartE0.cxx b/src/emucore/CartE0.cxx index 0bfbd2450..47285085b 100644 --- a/src/emucore/CartE0.cxx +++ b/src/emucore/CartE0.cxx @@ -62,7 +62,7 @@ void CartridgeE0::install(System& system) // Set the page acessing methods for the first part of the last segment access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = 0x1C00; i < (0x1FE0U & ~mask); i += (1 << shift)) { access.directPeekBase = &myImage[7168 + (i & 0x03FF)]; @@ -74,7 +74,7 @@ void CartridgeE0::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 j = (0x1FE0 & ~mask); j < 0x2000; j += (1 << shift)) mySystem->setPageAccess(j >> shift, access); @@ -141,7 +141,7 @@ void CartridgeE0::segmentZero(uInt16 slice) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 address = 0x1000; address < 0x1400; address += (1 << shift)) { @@ -165,7 +165,7 @@ void CartridgeE0::segmentOne(uInt16 slice) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 address = 0x1400; address < 0x1800; address += (1 << shift)) { @@ -189,7 +189,7 @@ void CartridgeE0::segmentTwo(uInt16 slice) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 address = 0x1800; address < 0x1C00; address += (1 << shift)) { diff --git a/src/emucore/CartE7.cxx b/src/emucore/CartE7.cxx index 483187b6c..352a379f3 100644 --- a/src/emucore/CartE7.cxx +++ b/src/emucore/CartE7.cxx @@ -76,14 +76,14 @@ void CartridgeE7::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FE0 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Setup the second segment to always point to the last ROM slice access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 j = 0x1A00; j < (0x1FE0U & ~mask); j += (1 << shift)) { access.directPeekBase = &myImage[7 * 2048 + (j & 0x07FF)]; @@ -179,7 +179,7 @@ void CartridgeE7::bankRAM(uInt16 bank) // Set the page accessing method for the 256 bytes of RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1800; j < 0x1900; j += (1 << shift)) { access.directPokeBase = &myRAM[1024 + offset + (j & 0x00FF)]; @@ -189,7 +189,7 @@ void CartridgeE7::bankRAM(uInt16 bank) // Set the page accessing method for the 256 bytes of RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1900; k < 0x1A00; k += (1 << shift)) { access.directPeekBase = &myRAM[1024 + offset + (k & 0x00FF)]; @@ -216,7 +216,7 @@ void CartridgeE7::bank(uInt16 slice) // Map ROM image into first segment access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 address = 0x1000; address < 0x1800; address += (1 << shift)) { access.directPeekBase = &myImage[offset + (address & 0x07FF)]; @@ -228,7 +228,7 @@ void CartridgeE7::bank(uInt16 slice) // Set the page accessing method for the 1K slice of RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1000; j < 0x1400; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x03FF]; @@ -238,7 +238,7 @@ void CartridgeE7::bank(uInt16 slice) // Set the page accessing method for the 1K slice of RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1400; k < 0x1800; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x03FF]; diff --git a/src/emucore/CartEF.cxx b/src/emucore/CartEF.cxx index be53d52f5..f1f445723 100644 --- a/src/emucore/CartEF.cxx +++ b/src/emucore/CartEF.cxx @@ -61,7 +61,7 @@ void CartridgeEF::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FE0 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -109,7 +109,7 @@ void CartridgeEF::bank(uInt16 bank) // Setup the page access methods for the current bank access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < (0x1FE0U & ~mask); diff --git a/src/emucore/CartEFSC.cxx b/src/emucore/CartEFSC.cxx index a3229c9e6..0dbf2cf91 100644 --- a/src/emucore/CartEFSC.cxx +++ b/src/emucore/CartEFSC.cxx @@ -68,14 +68,14 @@ void CartridgeEFSC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FE0 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Set the page accessing method for the RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x007F]; @@ -85,7 +85,7 @@ void CartridgeEFSC::install(System& system) // Set the page accessing method for the RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1080; k < 0x1100; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x007F]; @@ -153,7 +153,7 @@ void CartridgeEFSC::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1100; address < (0x1FE0U & ~mask); diff --git a/src/emucore/CartF0.cxx b/src/emucore/CartF0.cxx index 31f3f774e..f3feffce5 100644 --- a/src/emucore/CartF0.cxx +++ b/src/emucore/CartF0.cxx @@ -62,7 +62,7 @@ void CartridgeF0::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF0 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -111,7 +111,7 @@ void CartridgeF0::incbank() System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < (0x1FF0U & ~mask); diff --git a/src/emucore/CartF4.cxx b/src/emucore/CartF4.cxx index 7de0b6397..6c6a48059 100644 --- a/src/emucore/CartF4.cxx +++ b/src/emucore/CartF4.cxx @@ -62,7 +62,7 @@ void CartridgeF4::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF4 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -113,7 +113,7 @@ void CartridgeF4::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < (0x1FF4U & ~mask); diff --git a/src/emucore/CartF4SC.cxx b/src/emucore/CartF4SC.cxx index 4c5e016cb..c03d75379 100644 --- a/src/emucore/CartF4SC.cxx +++ b/src/emucore/CartF4SC.cxx @@ -68,14 +68,14 @@ void CartridgeF4SC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF4 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Set the page accessing method for the RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x007F]; @@ -85,7 +85,7 @@ void CartridgeF4SC::install(System& system) // Set the page accessing method for the RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1080; k < 0x1100; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x007F]; @@ -156,7 +156,7 @@ void CartridgeF4SC::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1100; address < (0x1FF4U & ~mask); diff --git a/src/emucore/CartF6.cxx b/src/emucore/CartF6.cxx index 143042182..eae28907e 100644 --- a/src/emucore/CartF6.cxx +++ b/src/emucore/CartF6.cxx @@ -61,7 +61,7 @@ void CartridgeF6::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF6 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -153,7 +153,7 @@ void CartridgeF6::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < (0x1FF6U & ~mask); diff --git a/src/emucore/CartF6SC.cxx b/src/emucore/CartF6SC.cxx index 7d47d3955..8245f47f7 100644 --- a/src/emucore/CartF6SC.cxx +++ b/src/emucore/CartF6SC.cxx @@ -68,14 +68,14 @@ void CartridgeF6SC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF6 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Set the page accessing method for the RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x007F]; @@ -85,7 +85,7 @@ void CartridgeF6SC::install(System& system) // Set the page accessing method for the RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1080; k < 0x1100; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x007F]; @@ -199,7 +199,7 @@ void CartridgeF6SC::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1100; address < (0x1FF6U & ~mask); diff --git a/src/emucore/CartF8.cxx b/src/emucore/CartF8.cxx index 8f3f4659a..ea927cfe6 100644 --- a/src/emucore/CartF8.cxx +++ b/src/emucore/CartF8.cxx @@ -62,7 +62,7 @@ void CartridgeF8::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -134,7 +134,7 @@ void CartridgeF8::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < (0x1FF8U & ~mask); diff --git a/src/emucore/CartF8SC.cxx b/src/emucore/CartF8SC.cxx index fa83aec1d..5f4dc0184 100644 --- a/src/emucore/CartF8SC.cxx +++ b/src/emucore/CartF8SC.cxx @@ -68,14 +68,14 @@ void CartridgeF8SC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Set the page accessing method for the RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1000; j < 0x1080; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x007F]; @@ -85,7 +85,7 @@ void CartridgeF8SC::install(System& system) // Set the page accessing method for the RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1080; k < 0x1100; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x007F]; @@ -179,7 +179,7 @@ void CartridgeF8SC::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1100; address < (0x1FF8U & ~mask); diff --git a/src/emucore/CartFA.cxx b/src/emucore/CartFA.cxx index 4289e3d93..97fa0faad 100644 --- a/src/emucore/CartFA.cxx +++ b/src/emucore/CartFA.cxx @@ -68,14 +68,14 @@ void CartridgeFA::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = (0x1FF8 & ~mask); i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); // Set the page accessing method for the RAM writing pages access.directPeekBase = 0; access.device = this; - access.type = System::PAGE_WRITE; + access.type = System::PA_WRITE; for(uInt32 j = 0x1000; j < 0x1100; j += (1 << shift)) { access.directPokeBase = &myRAM[j & 0x00FF]; @@ -85,7 +85,7 @@ void CartridgeFA::install(System& system) // Set the page accessing method for the RAM reading pages access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 k = 0x1100; k < 0x1200; k += (1 << shift)) { access.directPeekBase = &myRAM[k & 0x00FF]; @@ -189,7 +189,7 @@ void CartridgeFA::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1200; address < (0x1FF8U & ~mask); diff --git a/src/emucore/CartFE.cxx b/src/emucore/CartFE.cxx index acda6bea0..8176507bb 100644 --- a/src/emucore/CartFE.cxx +++ b/src/emucore/CartFE.cxx @@ -58,7 +58,7 @@ void CartridgeFE::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = 0x1000; i < 0x2000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); } diff --git a/src/emucore/CartMC.cxx b/src/emucore/CartMC.cxx index 830ece60a..5ea20b9e4 100644 --- a/src/emucore/CartMC.cxx +++ b/src/emucore/CartMC.cxx @@ -80,7 +80,7 @@ void CartridgeMC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; for(uInt32 i = 0x00; i < 0x40; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -88,7 +88,7 @@ void CartridgeMC::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; // We don't yet indicate RAM areas + access.type = System::PA_READ; // We don't yet indicate RAM areas for(uInt32 j = 0x1000; j < 0x2000; j += (1 << shift)) mySystem->setPageAccess(j >> shift, access); } diff --git a/src/emucore/CartSB.cxx b/src/emucore/CartSB.cxx index be00e8bb0..f9b0dcb37 100644 --- a/src/emucore/CartSB.cxx +++ b/src/emucore/CartSB.cxx @@ -77,7 +77,7 @@ void CartridgeSB::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; for(uInt32 i = 0x0800; i < 0x0FFF; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -138,7 +138,7 @@ void CartridgeSB::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift)) diff --git a/src/emucore/CartUA.cxx b/src/emucore/CartUA.cxx index dcc9a354b..ca2403855 100644 --- a/src/emucore/CartUA.cxx +++ b/src/emucore/CartUA.cxx @@ -64,7 +64,7 @@ void CartridgeUA::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; mySystem->setPageAccess(0x0220 >> shift, access); mySystem->setPageAccess(0x0240 >> shift, access); @@ -147,7 +147,7 @@ void CartridgeUA::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift)) diff --git a/src/emucore/CartX07.cxx b/src/emucore/CartX07.cxx index 94a484ac3..2851aeb1e 100644 --- a/src/emucore/CartX07.cxx +++ b/src/emucore/CartX07.cxx @@ -64,7 +64,7 @@ void CartridgeX07::install(System& system) access.directPeekBase = 0; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; for(uInt32 i = 0x00; i < 0x1000; i += (1 << shift)) mySystem->setPageAccess(i >> shift, access); @@ -131,7 +131,7 @@ void CartridgeX07::bank(uInt16 bank) System::PageAccess access; access.directPokeBase = 0; access.device = this; - access.type = System::PAGE_READ; + access.type = System::PA_READ; // Map ROM image into the system for(uInt32 address = 0x1000; address < 0x2000; address += (1 << shift)) diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index 0a13f798a..a5a3270a1 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -1921,7 +1921,7 @@ void EventHandler::setPaddleMode(int num, bool showmessage) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void EventHandler::setContinuousSnapshots(uInt32 interval) { - myContSnapshotInterval = myOSystem->frameRate() * interval; + myContSnapshotInterval = (uInt32) myOSystem->frameRate() * interval; myContSnapshotCounter = 0; } diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 2e476c316..d03dcab84 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -482,7 +482,7 @@ int FrameBuffer::allocateSurface(int w, int h, bool useBase) FBSurface* surface = createSurface(w, h, useBase); // Add it to the list - mySurfaceList.insert(make_pair(mySurfaceList.size(), surface)); + mySurfaceList.insert(make_pair(int(mySurfaceList.size()), surface)); // Return a reference to it return mySurfaceList.size() - 1; diff --git a/src/emucore/M6532.cxx b/src/emucore/M6532.cxx index 22434aa21..299290728 100644 --- a/src/emucore/M6532.cxx +++ b/src/emucore/M6532.cxx @@ -94,7 +94,7 @@ void M6532::install(System& system, Device& device) access.directPeekBase = 0; access.directPokeBase = 0; access.device = &device; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; // We're installing in a 2600 system for(int address = 0; address < 8192; address += (1 << shift)) diff --git a/src/emucore/System.cxx b/src/emucore/System.cxx index a5ce98cb9..33bba4d20 100644 --- a/src/emucore/System.cxx +++ b/src/emucore/System.cxx @@ -17,7 +17,7 @@ // $Id$ //============================================================================ -#include +#include #include #include "Device.hxx" @@ -180,7 +180,7 @@ const System::PageAccess& System::getPageAccess(uInt16 page) const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -System::PageType System::getPageType(uInt16 addr) const +System::PageAccessType System::getPageAccessType(uInt16 addr) const { return myPageAccessTable[(addr & myAddressMask) >> myPageShift].type; } diff --git a/src/emucore/System.hxx b/src/emucore/System.hxx index 1fbe6145d..f0fcc7289 100644 --- a/src/emucore/System.hxx +++ b/src/emucore/System.hxx @@ -287,11 +287,11 @@ class System : public Serializable void unlockDataBus(); public: - enum PageType { - PAGE_READ = 1 << 0, - PAGE_WRITE = 1 << 1, - PAGE_READWRITE = PAGE_READ | PAGE_WRITE - }; + enum PageAccessType { + PA_READ = 1 << 0, + PA_WRITE = 1 << 1, + PA_READWRITE = PA_READ | PA_WRITE + }; /** Structure used to specify access methods for a page @@ -322,10 +322,10 @@ class System : public Serializable /** The manner in which the pages are accessed by the system - (READ, WRITE, READ|WRITE) + (READ, WRITE, READWRITE) */ - PageType type; - }; + PageAccessType type; + }; /** Set the page accessing method for the specified page. @@ -349,7 +349,7 @@ class System : public Serializable @param addr The address contained in the page in questions @return The type of page that contains the given address */ - PageType getPageType(uInt16 addr) const; + System::PageAccessType getPageAccessType(uInt16 addr) const; /** Mark the page containing this address as being dirty. diff --git a/src/emucore/TIA.cxx b/src/emucore/TIA.cxx index a148ccd33..a92443f85 100644 --- a/src/emucore/TIA.cxx +++ b/src/emucore/TIA.cxx @@ -295,7 +295,7 @@ void TIA::install(System& system, Device& device) access.directPeekBase = 0; access.directPokeBase = 0; access.device = &device; - access.type = System::PAGE_READWRITE; + access.type = System::PA_READWRITE; // We're installing in a 2600 system for(uInt32 i = 0; i < 8192; i += (1 << shift)) diff --git a/src/win32/FSNodeWin32.cxx b/src/win32/FSNodeWin32.cxx index cfb873dfc..f5198ecdf 100644 --- a/src/win32/FSNodeWin32.cxx +++ b/src/win32/FSNodeWin32.cxx @@ -173,7 +173,7 @@ void WindowsFilesystemNode::addFile(AbstractFSList& list, ListMode mode, bool isDirectory; // Skip local directory (.) and parent (..) - if (!strcmp(asciiName, ".") || !strcmp(asciiName, "..")) + if (!strncmp(asciiName, ".", 1) || !strncmp(asciiName, "..", 2)) return; isDirectory = (find_data->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ? true : false);