diff --git a/src/common/EventHandlerSDL2.cxx b/src/common/EventHandlerSDL2.cxx index b1e1cd390..727f6e1ba 100644 --- a/src/common/EventHandlerSDL2.cxx +++ b/src/common/EventHandlerSDL2.cxx @@ -102,7 +102,7 @@ void EventHandlerSDL2::pollEvent() handleJoyEvent(myEvent.jbutton.which, myEvent.jbutton.button, myEvent.jbutton.state == SDL_PRESSED ? 1 : 0); break; - } + } case SDL_JOYAXISMOTION: { diff --git a/src/debugger/TIADebug.cxx b/src/debugger/TIADebug.cxx index d854ea2cd..a08aa490f 100644 --- a/src/debugger/TIADebug.cxx +++ b/src/debugger/TIADebug.cxx @@ -337,7 +337,7 @@ bool TIADebug::collision(int collID, int newVal) } return myTIA.myCollision & mask; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt8 TIADebug::audC0(int newVal) diff --git a/src/debugger/gui/CartCMWidget.cxx b/src/debugger/gui/CartCMWidget.cxx index 7b0bcefe3..b74249966 100644 --- a/src/debugger/gui/CartCMWidget.cxx +++ b/src/debugger/gui/CartCMWidget.cxx @@ -153,11 +153,8 @@ void CartridgeCMWidget::saveOldState() myOldState.column = myCart.column(); myOldState.internalram.clear(); - for(uInt32 i = 0; i < this->internalRamSize();i++) - { myOldState.internalram.push_back(myCart.myRAM[i]); - } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/AtariVox.cxx b/src/emucore/AtariVox.cxx index ee931c228..3d8d89ebf 100644 --- a/src/emucore/AtariVox.cxx +++ b/src/emucore/AtariVox.cxx @@ -97,7 +97,7 @@ void AtariVox::write(DigitalPin pin, bool value) default: break; - } + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/Cart0840.cxx b/src/emucore/Cart0840.cxx index 9e5d73f82..59efa0947 100644 --- a/src/emucore/Cart0840.cxx +++ b/src/emucore/Cart0840.cxx @@ -134,7 +134,7 @@ bool Cartridge0840::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Cartridge0840::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in diff --git a/src/emucore/Cart2K.cxx b/src/emucore/Cart2K.cxx index abae0017d..1db7c65c8 100644 --- a/src/emucore/Cart2K.cxx +++ b/src/emucore/Cart2K.cxx @@ -92,14 +92,14 @@ bool Cartridge2K::poke(uInt16, uInt8) { // This is ROM so poking has no effect :-) return false; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Cartridge2K::patch(uInt16 address, uInt8 value) { myImage[address & myMask] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* Cartridge2K::getImage(int& size) const diff --git a/src/emucore/Cart3E.cxx b/src/emucore/Cart3E.cxx index 23ab9c6b4..50c1b19f1 100644 --- a/src/emucore/Cart3E.cxx +++ b/src/emucore/Cart3E.cxx @@ -151,7 +151,7 @@ bool Cartridge3E::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Cartridge3E::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; if(bank < 256) @@ -249,7 +249,7 @@ bool Cartridge3E::patch(uInt16 address, uInt8 value) myImage[(address & 0x07FF) + mySize - 2048] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* Cartridge3E::getImage(int& size) const diff --git a/src/emucore/Cart3F.cxx b/src/emucore/Cart3F.cxx index c588bd8a6..936e7cec7 100644 --- a/src/emucore/Cart3F.cxx +++ b/src/emucore/Cart3F.cxx @@ -119,7 +119,7 @@ bool Cartridge3F::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Cartridge3F::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Make sure the bank they're asking for is reasonable @@ -173,7 +173,7 @@ bool Cartridge3F::patch(uInt16 address, uInt8 value) myImage[(address & 0x07FF) + mySize - 2048] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* Cartridge3F::getImage(int& size) const diff --git a/src/emucore/Cart4A50.cxx b/src/emucore/Cart4A50.cxx index 3554ed428..f9d5f0734 100644 --- a/src/emucore/Cart4A50.cxx +++ b/src/emucore/Cart4A50.cxx @@ -196,7 +196,7 @@ bool Cartridge4A50::poke(uInt16 address, uInt8 value) myLastAddress = address & 0x1fff; return myBankChanged; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - uInt8 Cartridge4A50::getAccessFlags(uInt16 address) const @@ -362,7 +362,7 @@ bool Cartridge4A50::patch(uInt16 address, uInt8 value) myImage[(address & 0xff) + 0x1ff00] = value; } return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* Cartridge4A50::getImage(int& size) const diff --git a/src/emucore/Cart4K.cxx b/src/emucore/Cart4K.cxx index f3f2dcf75..3b4ae6cc9 100644 --- a/src/emucore/Cart4K.cxx +++ b/src/emucore/Cart4K.cxx @@ -64,14 +64,14 @@ bool Cartridge4K::poke(uInt16, uInt8) { // This is ROM so poking has no effect :-) return false; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool Cartridge4K::patch(uInt16 address, uInt8 value) { myImage[address & 0x0FFF] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* Cartridge4K::getImage(int& size) const diff --git a/src/emucore/Cart4KSC.cxx b/src/emucore/Cart4KSC.cxx index cb174ffdb..e8272395c 100644 --- a/src/emucore/Cart4KSC.cxx +++ b/src/emucore/Cart4KSC.cxx @@ -96,7 +96,7 @@ uInt8 Cartridge4KSC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[address & 0x0FFF]; } @@ -126,7 +126,7 @@ bool Cartridge4KSC::patch(uInt16 address, uInt8 value) myImage[address & 0xFFF] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* Cartridge4KSC::getImage(int& size) const diff --git a/src/emucore/CartAR.cxx b/src/emucore/CartAR.cxx index 37113a4cf..e1b5b6447 100644 --- a/src/emucore/CartAR.cxx +++ b/src/emucore/CartAR.cxx @@ -450,7 +450,7 @@ bool CartridgeAR::patch(uInt16 address, uInt8 value) { // TODO - add support for debugger return false; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeAR::getImage(int& size) const diff --git a/src/emucore/CartBF.cxx b/src/emucore/CartBF.cxx index 6d387ccfe..b32b95418 100644 --- a/src/emucore/CartBF.cxx +++ b/src/emucore/CartBF.cxx @@ -122,7 +122,7 @@ bool CartridgeBF::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeBF::getImage(int& size) const diff --git a/src/emucore/CartBFSC.cxx b/src/emucore/CartBFSC.cxx index 41763f3c5..3ab2d1b6d 100644 --- a/src/emucore/CartBFSC.cxx +++ b/src/emucore/CartBFSC.cxx @@ -101,7 +101,7 @@ uInt8 CartridgeBFSC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -179,7 +179,7 @@ bool CartridgeBFSC::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeBFSC::getImage(int& size) const diff --git a/src/emucore/CartCM.cxx b/src/emucore/CartCM.cxx index 5fbe45462..67a71df83 100644 --- a/src/emucore/CartCM.cxx +++ b/src/emucore/CartCM.cxx @@ -182,7 +182,7 @@ bool CartridgeCM::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeCM::getImage(int& size) const diff --git a/src/emucore/CartCTY.cxx b/src/emucore/CartCTY.cxx index 216e2efaf..02d5c85fe 100644 --- a/src/emucore/CartCTY.cxx +++ b/src/emucore/CartCTY.cxx @@ -237,7 +237,7 @@ bool CartridgeCTY::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeCTY::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -282,7 +282,7 @@ bool CartridgeCTY::patch(uInt16 address, uInt8 value) myImage[myCurrentBank + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeCTY::getImage(int& size) const diff --git a/src/emucore/CartCV.cxx b/src/emucore/CartCV.cxx index 5d215eda0..4ef1fa651 100644 --- a/src/emucore/CartCV.cxx +++ b/src/emucore/CartCV.cxx @@ -128,11 +128,9 @@ uInt8 CartridgeCV::peek(uInt16 address) triggerReadFromWritePort(address); return myRAM[address & 0x03FF] = value; } - } + } else - { return myImage[address & 0x07FF]; - } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -161,7 +159,7 @@ bool CartridgeCV::patch(uInt16 address, uInt8 value) myImage[address & 0x07FF] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeCV::getImage(int& size) const diff --git a/src/emucore/CartCVPlus.cxx b/src/emucore/CartCVPlus.cxx index 6e4568086..9047b16fc 100644 --- a/src/emucore/CartCVPlus.cxx +++ b/src/emucore/CartCVPlus.cxx @@ -110,7 +110,7 @@ uInt8 CartridgeCVPlus::peek(uInt16 address) triggerReadFromWritePort(address); return myRAM[address & 0x03FF] = value; } - } + } else return myImage[(address & 0x07FF) + (myCurrentBank << 11)]; } @@ -197,7 +197,7 @@ bool CartridgeCVPlus::patch(uInt16 address, uInt8 value) myImage[(address & 0x07FF) + (myCurrentBank << 11)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeCVPlus::getImage(int& size) const diff --git a/src/emucore/CartDF.cxx b/src/emucore/CartDF.cxx index 82a72bc13..9215aa7d9 100644 --- a/src/emucore/CartDF.cxx +++ b/src/emucore/CartDF.cxx @@ -122,7 +122,7 @@ bool CartridgeDF::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeDF::getImage(int& size) const diff --git a/src/emucore/CartDFSC.cxx b/src/emucore/CartDFSC.cxx index fbdce7d75..f46abc1c5 100644 --- a/src/emucore/CartDFSC.cxx +++ b/src/emucore/CartDFSC.cxx @@ -101,7 +101,7 @@ uInt8 CartridgeDFSC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -179,7 +179,7 @@ bool CartridgeDFSC::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeDFSC::getImage(int& size) const diff --git a/src/emucore/CartDPC.cxx b/src/emucore/CartDPC.cxx index d46582380..63235793e 100644 --- a/src/emucore/CartDPC.cxx +++ b/src/emucore/CartDPC.cxx @@ -242,7 +242,7 @@ uInt8 CartridgeDPC::peek(uInt16 address) { result = myDisplayImage[2047 - myCounters[index]] & myFlags[index]; break; - } + } // DFx flag case 0x07: @@ -369,7 +369,7 @@ bool CartridgeDPC::poke(uInt16 address, uInt8 value) { break; } - } + } } else { @@ -395,7 +395,7 @@ bool CartridgeDPC::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeDPC::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -448,7 +448,7 @@ bool CartridgeDPC::patch(uInt16 address, uInt8 value) } else return false; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeDPC::getImage(int& size) const diff --git a/src/emucore/CartE0.cxx b/src/emucore/CartE0.cxx index ae276d0fb..d0b87caa7 100644 --- a/src/emucore/CartE0.cxx +++ b/src/emucore/CartE0.cxx @@ -118,7 +118,7 @@ bool CartridgeE0::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void CartridgeE0::segmentZero(uInt16 slice) -{ +{ if(bankLocked()) return; // Remember the new slice @@ -140,7 +140,7 @@ void CartridgeE0::segmentZero(uInt16 slice) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void CartridgeE0::segmentOne(uInt16 slice) -{ +{ if(bankLocked()) return; // Remember the new slice @@ -161,7 +161,7 @@ void CartridgeE0::segmentOne(uInt16 slice) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void CartridgeE0::segmentTwo(uInt16 slice) -{ +{ if(bankLocked()) return; // Remember the new slice @@ -187,7 +187,7 @@ bool CartridgeE0::patch(uInt16 address, uInt8 value) address &= 0x0FFF; myImage[(myCurrentSlice[address >> 10] << 10) + (address & 0x03FF)] = value; return true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeE0::getImage(int& size) const diff --git a/src/emucore/CartE7.cxx b/src/emucore/CartE7.cxx index cd0e6b095..e745e72a2 100644 --- a/src/emucore/CartE7.cxx +++ b/src/emucore/CartE7.cxx @@ -183,7 +183,7 @@ void CartridgeE7::bankRAM(uInt16 bank) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeE7::bank(uInt16 slice) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -269,7 +269,7 @@ bool CartridgeE7::patch(uInt16 address, uInt8 value) myImage[(myCurrentSlice[address >> 11] << 11) + (address & 0x07FF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeE7::getImage(int& size) const diff --git a/src/emucore/CartEF.cxx b/src/emucore/CartEF.cxx index b86d61d98..108f893f9 100644 --- a/src/emucore/CartEF.cxx +++ b/src/emucore/CartEF.cxx @@ -122,7 +122,7 @@ bool CartridgeEF::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeEF::getImage(int& size) const diff --git a/src/emucore/CartEFSC.cxx b/src/emucore/CartEFSC.cxx index c8b761a9b..df8824111 100644 --- a/src/emucore/CartEFSC.cxx +++ b/src/emucore/CartEFSC.cxx @@ -99,7 +99,7 @@ uInt8 CartridgeEFSC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -177,7 +177,7 @@ bool CartridgeEFSC::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeEFSC::getImage(int& size) const diff --git a/src/emucore/CartF0.cxx b/src/emucore/CartF0.cxx index 39d66fc94..00f75b000 100644 --- a/src/emucore/CartF0.cxx +++ b/src/emucore/CartF0.cxx @@ -136,7 +136,7 @@ bool CartridgeF0::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF0::getImage(int& size) const diff --git a/src/emucore/CartF4.cxx b/src/emucore/CartF4.cxx index 070e98a75..b4ecf117c 100644 --- a/src/emucore/CartF4.cxx +++ b/src/emucore/CartF4.cxx @@ -82,7 +82,7 @@ bool CartridgeF4::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeF4::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -127,7 +127,7 @@ bool CartridgeF4::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF4::getImage(int& size) const diff --git a/src/emucore/CartF4SC.cxx b/src/emucore/CartF4SC.cxx index a23d1354b..48310c898 100644 --- a/src/emucore/CartF4SC.cxx +++ b/src/emucore/CartF4SC.cxx @@ -101,7 +101,7 @@ uInt8 CartridgeF4SC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } // NOTE: This does not handle accessing RAM, however, this function // should never be called for RAM because of the way page accessing @@ -126,7 +126,7 @@ bool CartridgeF4SC::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeF4SC::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -182,7 +182,7 @@ bool CartridgeF4SC::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF4SC::getImage(int& size) const diff --git a/src/emucore/CartF6.cxx b/src/emucore/CartF6.cxx index cce8ffc44..7d1b16d0c 100644 --- a/src/emucore/CartF6.cxx +++ b/src/emucore/CartF6.cxx @@ -122,7 +122,7 @@ bool CartridgeF6::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeF6::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -167,7 +167,7 @@ bool CartridgeF6::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF6::getImage(int& size) const diff --git a/src/emucore/CartF6SC.cxx b/src/emucore/CartF6SC.cxx index 2a1230935..eb0444b6f 100644 --- a/src/emucore/CartF6SC.cxx +++ b/src/emucore/CartF6SC.cxx @@ -124,7 +124,7 @@ uInt8 CartridgeF6SC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -169,7 +169,7 @@ bool CartridgeF6SC::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeF6SC::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -225,7 +225,7 @@ bool CartridgeF6SC::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF6SC::getImage(int& size) const diff --git a/src/emucore/CartF8.cxx b/src/emucore/CartF8.cxx index 521a8d4ca..51a7cd197 100644 --- a/src/emucore/CartF8.cxx +++ b/src/emucore/CartF8.cxx @@ -110,7 +110,7 @@ bool CartridgeF8::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeF8::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -155,7 +155,7 @@ bool CartridgeF8::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF8::getImage(int& size) const diff --git a/src/emucore/CartF8SC.cxx b/src/emucore/CartF8SC.cxx index 19be30f87..c14f96c94 100644 --- a/src/emucore/CartF8SC.cxx +++ b/src/emucore/CartF8SC.cxx @@ -114,7 +114,7 @@ uInt8 CartridgeF8SC::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -149,7 +149,7 @@ bool CartridgeF8SC::poke(uInt16 address, uInt8) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeF8SC::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -205,7 +205,7 @@ bool CartridgeF8SC::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeF8SC::getImage(int& size) const diff --git a/src/emucore/CartFA.cxx b/src/emucore/CartFA.cxx index d2693564f..00e310489 100644 --- a/src/emucore/CartFA.cxx +++ b/src/emucore/CartFA.cxx @@ -119,7 +119,7 @@ uInt8 CartridgeFA::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -215,7 +215,7 @@ bool CartridgeFA::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeFA::getImage(int& size) const diff --git a/src/emucore/CartFA2.cxx b/src/emucore/CartFA2.cxx index ad5c40153..6d2366447 100644 --- a/src/emucore/CartFA2.cxx +++ b/src/emucore/CartFA2.cxx @@ -155,7 +155,7 @@ uInt8 CartridgeFA2::peek(uInt16 address) triggerReadFromWritePort(peekAddress); return myRAM[address] = value; } - } + } else return myImage[(myCurrentBank << 12) + address]; } @@ -278,7 +278,7 @@ bool CartridgeFA2::patch(uInt16 address, uInt8 value) myImage[(myCurrentBank << 12) + address] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeFA2::getImage(int& size) const diff --git a/src/emucore/CartFE.cxx b/src/emucore/CartFE.cxx index c9e3a9c0b..a50ca4896 100644 --- a/src/emucore/CartFE.cxx +++ b/src/emucore/CartFE.cxx @@ -127,7 +127,7 @@ bool CartridgeFE::patch(uInt16 address, uInt8 value) { myImage[(address & 0x0FFF) + (((address & 0x2000) == 0) ? 4096 : 0)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeFE::getImage(int& size) const diff --git a/src/emucore/CartMC.cxx b/src/emucore/CartMC.cxx index dfd4a92da..8d1488be7 100644 --- a/src/emucore/CartMC.cxx +++ b/src/emucore/CartMC.cxx @@ -154,7 +154,7 @@ uInt8 CartridgeMC::peek(uInt16 address) } } } - } + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -200,7 +200,7 @@ bool CartridgeMC::poke(uInt16 address, uInt8 value) myRAM[uInt32((block & 0x3F) << 9) + (address & 0x01FF)] = value; return true; } - } + } return false; } @@ -223,7 +223,7 @@ bool CartridgeMC::patch(uInt16 address, uInt8 value) { // TODO - add support for debugger return false; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeMC::getImage(int& size) const diff --git a/src/emucore/CartMDM.cxx b/src/emucore/CartMDM.cxx index c53774d62..d5a0c3245 100644 --- a/src/emucore/CartMDM.cxx +++ b/src/emucore/CartMDM.cxx @@ -110,7 +110,7 @@ bool CartridgeMDM::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeMDM::bank(uInt16 bank) -{ +{ if(bankLocked() || myBankingDisabled) return false; // Remember what bank we're in diff --git a/src/emucore/CartSB.cxx b/src/emucore/CartSB.cxx index 78906abe2..604c69b89 100644 --- a/src/emucore/CartSB.cxx +++ b/src/emucore/CartSB.cxx @@ -121,7 +121,7 @@ bool CartridgeSB::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeSB::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -159,7 +159,7 @@ bool CartridgeSB::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeSB::getImage(int& size) const diff --git a/src/emucore/CartUA.cxx b/src/emucore/CartUA.cxx index db3c9721d..8cc4073fb 100644 --- a/src/emucore/CartUA.cxx +++ b/src/emucore/CartUA.cxx @@ -123,7 +123,7 @@ bool CartridgeUA::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeUA::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -161,7 +161,7 @@ bool CartridgeUA::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeUA::getImage(int& size) const diff --git a/src/emucore/CartWD.cxx b/src/emucore/CartWD.cxx index b15e7f035..187842fca 100644 --- a/src/emucore/CartWD.cxx +++ b/src/emucore/CartWD.cxx @@ -267,7 +267,7 @@ bool CartridgeWD::patch(uInt16 address, uInt8 value) mySegment3[(address & 0x03FF)] = value; return true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeWD::getImage(int& size) const diff --git a/src/emucore/CartX07.cxx b/src/emucore/CartX07.cxx index 7d149d0df..2d5d89b15 100644 --- a/src/emucore/CartX07.cxx +++ b/src/emucore/CartX07.cxx @@ -107,7 +107,7 @@ bool CartridgeX07::poke(uInt16 address, uInt8 value) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bool CartridgeX07::bank(uInt16 bank) -{ +{ if(bankLocked()) return false; // Remember what bank we're in @@ -145,7 +145,7 @@ bool CartridgeX07::patch(uInt16 address, uInt8 value) { myImage[(myCurrentBank << 12) + (address & 0x0FFF)] = value; return myBankChanged = true; -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - const uInt8* CartridgeX07::getImage(int& size) const diff --git a/src/emucore/EventHandler.cxx b/src/emucore/EventHandler.cxx index d3180163a..ec2b4ff1a 100644 --- a/src/emucore/EventHandler.cxx +++ b/src/emucore/EventHandler.cxx @@ -1756,7 +1756,7 @@ Event::Type EventHandler::eventAtIndex(int idx, EventMode mode) const default: return Event::NoType; } -} +} // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - string EventHandler::actionAtIndex(int idx, EventMode mode) const diff --git a/src/emucore/SaveKey.cxx b/src/emucore/SaveKey.cxx index 2d64882d3..fc5378722 100644 --- a/src/emucore/SaveKey.cxx +++ b/src/emucore/SaveKey.cxx @@ -72,7 +72,7 @@ void SaveKey::write(DigitalPin pin, bool value) default: break; - } + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/emucore/TIATables.cxx b/src/emucore/TIATables.cxx index f2f38290a..94159d216 100644 --- a/src/emucore/TIATables.cxx +++ b/src/emucore/TIATables.cxx @@ -412,7 +412,7 @@ void TIATables::buildGRPReflectTable() r = (r << 1) | ((i & t) ? 0x01 : 0x00); GRPReflect[i] = r; - } + } } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 4d9d4b203..4dfdeffd4 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -452,7 +452,7 @@ void Dialog::handleMouseMoved(int x, int y, int button) if (w) w->handleMouseEntered(button); _mouseWidget = w; - } + } if (w && (w->getFlags() & WIDGET_TRACK_MOUSE)) w->handleMouseMoved(x - (w->getAbsX() - _x), y - (w->getAbsY() - _y), button); diff --git a/src/macosx/Preferences.m b/src/macosx/Preferences.m index 2ec018f27..90f739405 100644 --- a/src/macosx/Preferences.m +++ b/src/macosx/Preferences.m @@ -27,7 +27,7 @@ void prefsSetString(const char* key, const char* value) } void prefsGetString(const char* key, char* value, int size) -{ +{ [[Preferences sharedInstance] getString:key:value:size]; } diff --git a/src/tools/merge_props.pl b/src/tools/merge_props.pl index c21985cf7..203819597 100755 --- a/src/tools/merge_props.pl +++ b/src/tools/merge_props.pl @@ -53,7 +53,7 @@ PropSet::save_prop_set($sys_file, \%sys_propset); print "\nRun create_props [yN]: "; chomp ($input = ); if($input eq 'y') -{ +{ system("./src/tools/create_props.pl"); }