Minor optimizations.

This commit is contained in:
Christian Speckner 2024-07-29 19:06:33 +02:00
parent f4b25da4cd
commit 30775ce101
3 changed files with 7 additions and 9 deletions

View File

@ -332,7 +332,7 @@ inline uInt8 CartridgeELF::driveBus(uInt16 address, uInt8 value)
myVcsLib.updateBus(address, value);
if (!myVcsLib.isSuspended()) runArm();
runArm();
return value;
}
@ -485,7 +485,8 @@ void CartridgeELF::runArm()
{
if (
(getArmCycles() >= (mySystem->cycles() + ARM_RUNAHED_MIN) * myArmCyclesPer6502Cycle) ||
myTransactionQueue.size() >= QUEUE_SIZE_LIMIT
myTransactionQueue.size() >= QUEUE_SIZE_LIMIT ||
myVcsLib.isSuspended()
)
return;

View File

@ -303,12 +303,6 @@ CortexM0::err_t VcsLib::fetch16(uInt32 address, uInt16& value, uInt8& op, Cortex
}
}
void VcsLib::updateBus(uInt16 address, uInt8 value)
{
myCurrentAddress = address;
myCurrentValue = value;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CortexM0::err_t VcsLib::returnFromStub(uInt16& value, uInt8& op)
{

View File

@ -30,7 +30,10 @@ class VcsLib: public CortexM0::BusTransactionDelegate {
CortexM0::err_t fetch16(uInt32 address, uInt16& value, uInt8& op, CortexM0& cortex) override;
void updateBus(uInt16 address, uInt8 value);
inline void updateBus(uInt16 address, uInt8 value) {
myCurrentAddress = address;
myCurrentValue = value;
}
inline bool isSuspended() const {
return