Minor updates to Xcode project.

Changed uInt32 to uInt64 in several places, standardizing on uInt64 for cycle-related variables.
This commit is contained in:
Stephen Anthony 2018-07-01 23:23:11 -02:30
parent 4329eb5c37
commit 1a97c5bc93
10 changed files with 29 additions and 29 deletions

View File

@ -30,14 +30,14 @@ bool DispatchResult::isSuccess() const
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void DispatchResult::setOk(uInt32 cycles) void DispatchResult::setOk(uInt64 cycles)
{ {
myStatus = Status::ok; myStatus = Status::ok;
myCycles = cycles; 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; myStatus = Status::debugger;
myCycles = cycles; 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; myCycles = cycles;

View File

@ -31,7 +31,7 @@ class DispatchResult
Status getStatus() const { return myStatus; } Status getStatus() const { return myStatus; }
uInt32 getCycles() const { return myCycles; } uInt64 getCycles() const { return myCycles; }
const string& getMessage() const { assertStatus(Status::debugger); return myMessage; } const string& getMessage() const { assertStatus(Status::debugger); return myMessage; }
@ -41,11 +41,11 @@ class DispatchResult
bool isSuccess() const; 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: private:
@ -55,7 +55,7 @@ class DispatchResult
Status myStatus; Status myStatus;
uInt32 myCycles; uInt64 myCycles;
string myMessage; string myMessage;

View File

@ -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 // Wait until any pending signal has been processed
waitUntilPendingSignalHasProcessed(); waitUntilPendingSignalHasProcessed();

View File

@ -67,7 +67,7 @@ class EmulationWorker
/** /**
Wake up the worker and start emulation with the specified parameters. 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. Stop emulation and return the number of 6507 cycles emulated.
@ -189,9 +189,9 @@ class EmulationWorker
// Emulation parameters // Emulation parameters
TIA* myTia; TIA* myTia;
uInt32 myCyclesPerSecond; uInt64 myCyclesPerSecond;
uInt32 myMaxCycles; uInt64 myMaxCycles;
uInt32 myMinCycles; uInt64 myMinCycles;
DispatchResult* myDispatchResult; DispatchResult* myDispatchResult;
// Total number of cycles during this emulation run // Total number of cycles during this emulation run

View File

@ -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); _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; 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 // Clear all of the execution status bits except for the fatal error bit
myExecutionStatus &= FatalErrorBit; myExecutionStatus &= FatalErrorBit;
@ -250,7 +250,7 @@ inline void M6502::_execute(uInt32 cycles, DispatchResult& result)
#endif #endif
uInt64 previousCycles = mySystem->cycles(); uInt64 previousCycles = mySystem->cycles();
uInt32 currentCycles = 0; uInt64 currentCycles = 0;
// Loop until execution is stopped or a fatal error occurs // Loop until execution is stopped or a fatal error occurs
for(;;) for(;;)

View File

@ -116,9 +116,9 @@ class M6502 : public Serializable
a couple of cycles a couple of cycles
@param result A DispatchResult object that will transport the result @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 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 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. 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 #ifdef DEBUGGER_SUPPORT
/** /**

View File

@ -816,7 +816,7 @@ bool TIA::loadDisplay(Serializer& in)
try try
{ {
// Reset frame buffer pointer and data // 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(myBackBuffer, 160 * TIAConstants::frameBufferHeight);
in.getByteArray(myFrontBuffer, 160 * TIAConstants::frameBufferHeight); in.getByteArray(myFrontBuffer, 160 * TIAConstants::frameBufferHeight);
myNewFramePending = in.getBool(); 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); mySystem->m6502().execute(maxCycles, result);
@ -850,7 +850,7 @@ void TIA::renderToFrameBuffer()
} }
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void TIA::update(uInt32 maxCycles) void TIA::update(uInt64 maxCycles)
{ {
DispatchResult dispatchResult; DispatchResult dispatchResult;

View File

@ -200,9 +200,9 @@ class TIA : public Device
desired frame rate to update the TIA. Invoking this method will update desired frame rate to update the TIA. Invoking this method will update
the graphics buffer and generate the corresponding audio samples. 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? Did we generate a new frame?

View File

@ -46,7 +46,7 @@ namespace {
int mapSpeed(float speed) int mapSpeed(float speed)
{ {
speed = abs(speed); speed = std::abs(speed);
return BSPF::clamp( return BSPF::clamp(
static_cast<int>(round(100 * (speed >= 1 ? speed - 1 : -1 / speed + 1))), static_cast<int>(round(100 * (speed >= 1 ? speed - 1 : -1 / speed + 1))),

View File

@ -1616,11 +1616,11 @@
2D6050C5089876F300C6DE89 /* common */ = { 2D6050C5089876F300C6DE89 /* common */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E0FABEEA20E9948100EB8E28 /* AudioSettings.cxx */,
E0FABEE920E9948000EB8E28 /* AudioSettings.hxx */,
DCC6A4AD20A2620D00863C59 /* audio */, DCC6A4AD20A2620D00863C59 /* audio */,
E09F413A201E901D004A3391 /* AudioQueue.cxx */, E09F413A201E901D004A3391 /* AudioQueue.cxx */,
E09F4139201E901C004A3391 /* AudioQueue.hxx */, E09F4139201E901C004A3391 /* AudioQueue.hxx */,
E0FABEEA20E9948100EB8E28 /* AudioSettings.cxx */,
E0FABEE920E9948000EB8E28 /* AudioSettings.hxx */,
DC79F81017A88D9E00288B91 /* Base.cxx */, DC79F81017A88D9E00288B91 /* Base.cxx */,
DC79F81117A88D9E00288B91 /* Base.hxx */, DC79F81117A88D9E00288B91 /* Base.hxx */,
DCC527D810B9DA6A005E1287 /* bspf.hxx */, DCC527D810B9DA6A005E1287 /* bspf.hxx */,
@ -1693,7 +1693,6 @@
2D6050CC0898776500C6DE89 /* emucore */ = { 2D6050CC0898776500C6DE89 /* emucore */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E0FABEED20E994A500EB8E28 /* ConsoleTiming.hxx */,
DC1B2EBE1E50036100F62837 /* AmigaMouse.hxx */, DC1B2EBE1E50036100F62837 /* AmigaMouse.hxx */,
DC1B2EC01E50036100F62837 /* AtariMouse.hxx */, DC1B2EC01E50036100F62837 /* AtariMouse.hxx */,
DC487FB40DA5350900E12499 /* AtariVox.cxx */, DC487FB40DA5350900E12499 /* AtariVox.cxx */,
@ -1796,6 +1795,7 @@
DC8C1BAA14B25DE7006440EE /* CompuMate.hxx */, DC8C1BAA14B25DE7006440EE /* CompuMate.hxx */,
2DE2DF380627AE07006BEC99 /* Console.cxx */, 2DE2DF380627AE07006BEC99 /* Console.cxx */,
2DE2DF390627AE07006BEC99 /* Console.hxx */, 2DE2DF390627AE07006BEC99 /* Console.hxx */,
E0FABEED20E994A500EB8E28 /* ConsoleTiming.hxx */,
2DE2DF3A0627AE07006BEC99 /* Control.cxx */, 2DE2DF3A0627AE07006BEC99 /* Control.cxx */,
2DE2DF3B0627AE07006BEC99 /* Control.hxx */, 2DE2DF3B0627AE07006BEC99 /* Control.hxx */,
DC932D3F0F278A5200FEFEFC /* DefProps.hxx */, DC932D3F0F278A5200FEFEFC /* DefProps.hxx */,