From 1a97c5bc93553cd732c3991ef471347e1395fbe8 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 1 Jul 2018 23:23:11 -0230 Subject: [PATCH] Minor updates to Xcode project. Changed uInt32 to uInt64 in several places, standardizing on uInt64 for cycle-related variables. --- src/emucore/DispatchResult.cxx | 6 +++--- src/emucore/DispatchResult.hxx | 10 +++++----- src/emucore/EmulationWorker.cxx | 2 +- src/emucore/EmulationWorker.hxx | 8 ++++---- src/emucore/M6502.cxx | 8 ++++---- src/emucore/M6502.hxx | 6 +++--- src/emucore/tia/TIA.cxx | 6 +++--- src/emucore/tia/TIA.hxx | 4 ++-- src/gui/VideoDialog.cxx | 2 +- src/macosx/stella.xcodeproj/project.pbxproj | 6 +++--- 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/emucore/DispatchResult.cxx b/src/emucore/DispatchResult.cxx index e6ca383c9..31900d9ae 100644 --- a/src/emucore/DispatchResult.cxx +++ b/src/emucore/DispatchResult.cxx @@ -30,14 +30,14 @@ bool DispatchResult::isSuccess() const } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void DispatchResult::setOk(uInt32 cycles) +void DispatchResult::setOk(uInt64 cycles) { myStatus = Status::ok; myCycles = cycles; } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void DispatchResult::setDebugger(uInt32 cycles, const string& message, int address, bool wasReadTrap) +void DispatchResult::setDebugger(uInt64 cycles, const string& message, int address, bool wasReadTrap) { myStatus = Status::debugger; myCycles = cycles; @@ -47,7 +47,7 @@ void DispatchResult::setDebugger(uInt32 cycles, const string& message, int addre } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void DispatchResult::setFatal(uInt32 cycles) +void DispatchResult::setFatal(uInt64 cycles) { myCycles = cycles; diff --git a/src/emucore/DispatchResult.hxx b/src/emucore/DispatchResult.hxx index 4bb1da098..5579d4ede 100644 --- a/src/emucore/DispatchResult.hxx +++ b/src/emucore/DispatchResult.hxx @@ -31,7 +31,7 @@ class DispatchResult Status getStatus() const { return myStatus; } - uInt32 getCycles() const { return myCycles; } + uInt64 getCycles() const { return myCycles; } const string& getMessage() const { assertStatus(Status::debugger); return myMessage; } @@ -41,11 +41,11 @@ class DispatchResult bool isSuccess() const; - void setOk(uInt32 cycles); + void setOk(uInt64 cycles); - void setDebugger(uInt32 cycles, const string& message = "", int address = -1, bool wasReadTrap = false); + void setDebugger(uInt64 cycles, const string& message = "", int address = -1, bool wasReadTrap = false); - void setFatal(uInt32 cycles); + void setFatal(uInt64 cycles); private: @@ -55,7 +55,7 @@ class DispatchResult Status myStatus; - uInt32 myCycles; + uInt64 myCycles; string myMessage; diff --git a/src/emucore/EmulationWorker.cxx b/src/emucore/EmulationWorker.cxx index 05dc1f650..0ccdc77c5 100644 --- a/src/emucore/EmulationWorker.cxx +++ b/src/emucore/EmulationWorker.cxx @@ -69,7 +69,7 @@ void EmulationWorker::handlePossibleException() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void EmulationWorker::start(uInt32 cyclesPerSecond, uInt32 maxCycles, uInt32 minCycles, DispatchResult* dispatchResult, TIA* tia) +void EmulationWorker::start(uInt32 cyclesPerSecond, uInt64 maxCycles, uInt64 minCycles, DispatchResult* dispatchResult, TIA* tia) { // Wait until any pending signal has been processed waitUntilPendingSignalHasProcessed(); diff --git a/src/emucore/EmulationWorker.hxx b/src/emucore/EmulationWorker.hxx index fbb42f2ba..92c736194 100644 --- a/src/emucore/EmulationWorker.hxx +++ b/src/emucore/EmulationWorker.hxx @@ -67,7 +67,7 @@ class EmulationWorker /** Wake up the worker and start emulation with the specified parameters. */ - void start(uInt32 cyclesPerSecond, uInt32 maxCycles, uInt32 minCycles, DispatchResult* dispatchResult, TIA* tia); + void start(uInt32 cyclesPerSecond, uInt64 maxCycles, uInt64 minCycles, DispatchResult* dispatchResult, TIA* tia); /** Stop emulation and return the number of 6507 cycles emulated. @@ -189,9 +189,9 @@ class EmulationWorker // Emulation parameters TIA* myTia; - uInt32 myCyclesPerSecond; - uInt32 myMaxCycles; - uInt32 myMinCycles; + uInt64 myCyclesPerSecond; + uInt64 myMaxCycles; + uInt64 myMinCycles; DispatchResult* myDispatchResult; // Total number of cycles during this emulation run diff --git a/src/emucore/M6502.cxx b/src/emucore/M6502.cxx index cefd24d83..7b621891c 100644 --- a/src/emucore/M6502.cxx +++ b/src/emucore/M6502.cxx @@ -209,7 +209,7 @@ inline void M6502::handleHalt() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void M6502::execute(uInt32 number, DispatchResult& result) +void M6502::execute(uInt64 number, DispatchResult& result) { _execute(number, result); @@ -229,7 +229,7 @@ void M6502::execute(uInt32 number, DispatchResult& result) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -bool M6502::execute(uInt32 number) +bool M6502::execute(uInt64 number) { DispatchResult result; @@ -239,7 +239,7 @@ bool M6502::execute(uInt32 number) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -inline void M6502::_execute(uInt32 cycles, DispatchResult& result) +inline void M6502::_execute(uInt64 cycles, DispatchResult& result) { // Clear all of the execution status bits except for the fatal error bit myExecutionStatus &= FatalErrorBit; @@ -250,7 +250,7 @@ inline void M6502::_execute(uInt32 cycles, DispatchResult& result) #endif uInt64 previousCycles = mySystem->cycles(); - uInt32 currentCycles = 0; + uInt64 currentCycles = 0; // Loop until execution is stopped or a fatal error occurs for(;;) diff --git a/src/emucore/M6502.hxx b/src/emucore/M6502.hxx index 26185e6ab..5504a5366 100644 --- a/src/emucore/M6502.hxx +++ b/src/emucore/M6502.hxx @@ -116,9 +116,9 @@ class M6502 : public Serializable a couple of cycles @param result A DispatchResult object that will transport the result */ - void execute(uInt32 cycles, DispatchResult& result); + void execute(uInt64 cycles, DispatchResult& result); - bool execute(uInt32 cycles); + bool execute(uInt64 cycles); /** Tell the processor to stop executing instructions. Invoking this @@ -323,7 +323,7 @@ class M6502 : public Serializable This is the actual dispatch function that does the grunt work. M6502::execute wraps it and makes sure that any pending halt is processed before returning. */ - void _execute(uInt32 cycles, DispatchResult& result); + void _execute(uInt64 cycles, DispatchResult& result); #ifdef DEBUGGER_SUPPORT /** diff --git a/src/emucore/tia/TIA.cxx b/src/emucore/tia/TIA.cxx index 11cc895f0..cf6fd6edc 100644 --- a/src/emucore/tia/TIA.cxx +++ b/src/emucore/tia/TIA.cxx @@ -816,7 +816,7 @@ bool TIA::loadDisplay(Serializer& in) try { // Reset frame buffer pointer and data - in.getByteArray(myFramebuffer, 160*TIAConstants::frameBufferHeight); + in.getByteArray(myFramebuffer, 160 * TIAConstants::frameBufferHeight); in.getByteArray(myBackBuffer, 160 * TIAConstants::frameBufferHeight); in.getByteArray(myFrontBuffer, 160 * TIAConstants::frameBufferHeight); myNewFramePending = in.getBool(); @@ -831,7 +831,7 @@ bool TIA::loadDisplay(Serializer& in) } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void TIA::update(DispatchResult& result, uInt32 maxCycles) +void TIA::update(DispatchResult& result, uInt64 maxCycles) { mySystem->m6502().execute(maxCycles, result); @@ -850,7 +850,7 @@ void TIA::renderToFrameBuffer() } // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -void TIA::update(uInt32 maxCycles) +void TIA::update(uInt64 maxCycles) { DispatchResult dispatchResult; diff --git a/src/emucore/tia/TIA.hxx b/src/emucore/tia/TIA.hxx index 95c53d8ec..945ec3998 100644 --- a/src/emucore/tia/TIA.hxx +++ b/src/emucore/tia/TIA.hxx @@ -200,9 +200,9 @@ class TIA : public Device desired frame rate to update the TIA. Invoking this method will update the graphics buffer and generate the corresponding audio samples. */ - void update(DispatchResult& result, uInt32 maxCycles = 50000); + void update(DispatchResult& result, uInt64 maxCycles = 50000); - void update(uInt32 maxCycles = 50000); + void update(uInt64 maxCycles = 50000); /** Did we generate a new frame? diff --git a/src/gui/VideoDialog.cxx b/src/gui/VideoDialog.cxx index 9de92335a..8a7028c2a 100644 --- a/src/gui/VideoDialog.cxx +++ b/src/gui/VideoDialog.cxx @@ -46,7 +46,7 @@ namespace { int mapSpeed(float speed) { - speed = abs(speed); + speed = std::abs(speed); return BSPF::clamp( static_cast(round(100 * (speed >= 1 ? speed - 1 : -1 / speed + 1))), diff --git a/src/macosx/stella.xcodeproj/project.pbxproj b/src/macosx/stella.xcodeproj/project.pbxproj index e897c8b30..e8dea4146 100644 --- a/src/macosx/stella.xcodeproj/project.pbxproj +++ b/src/macosx/stella.xcodeproj/project.pbxproj @@ -1616,11 +1616,11 @@ 2D6050C5089876F300C6DE89 /* common */ = { isa = PBXGroup; children = ( - E0FABEEA20E9948100EB8E28 /* AudioSettings.cxx */, - E0FABEE920E9948000EB8E28 /* AudioSettings.hxx */, DCC6A4AD20A2620D00863C59 /* audio */, E09F413A201E901D004A3391 /* AudioQueue.cxx */, E09F4139201E901C004A3391 /* AudioQueue.hxx */, + E0FABEEA20E9948100EB8E28 /* AudioSettings.cxx */, + E0FABEE920E9948000EB8E28 /* AudioSettings.hxx */, DC79F81017A88D9E00288B91 /* Base.cxx */, DC79F81117A88D9E00288B91 /* Base.hxx */, DCC527D810B9DA6A005E1287 /* bspf.hxx */, @@ -1693,7 +1693,6 @@ 2D6050CC0898776500C6DE89 /* emucore */ = { isa = PBXGroup; children = ( - E0FABEED20E994A500EB8E28 /* ConsoleTiming.hxx */, DC1B2EBE1E50036100F62837 /* AmigaMouse.hxx */, DC1B2EC01E50036100F62837 /* AtariMouse.hxx */, DC487FB40DA5350900E12499 /* AtariVox.cxx */, @@ -1796,6 +1795,7 @@ DC8C1BAA14B25DE7006440EE /* CompuMate.hxx */, 2DE2DF380627AE07006BEC99 /* Console.cxx */, 2DE2DF390627AE07006BEC99 /* Console.hxx */, + E0FABEED20E994A500EB8E28 /* ConsoleTiming.hxx */, 2DE2DF3A0627AE07006BEC99 /* Control.cxx */, 2DE2DF3B0627AE07006BEC99 /* Control.hxx */, DC932D3F0F278A5200FEFEFC /* DefProps.hxx */,