mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-23 15:22:45 +01:00
Merge pull request #450 from Subv/ticks_fix
Timing: Use CoreTiming::GetTicks to keep track of ticks.
This commit is contained in:
commit
0d0d6ef31a
2 changed files with 3 additions and 6 deletions
|
@ -15,7 +15,7 @@ const static cpu_config_t s_arm11_cpu_info = {
|
||||||
"armv6", "arm11", 0x0007b000, 0x0007f000, NONCACHE
|
"armv6", "arm11", 0x0007b000, 0x0007f000, NONCACHE
|
||||||
};
|
};
|
||||||
|
|
||||||
ARM_DynCom::ARM_DynCom() : ticks(0) {
|
ARM_DynCom::ARM_DynCom() {
|
||||||
state = std::unique_ptr<ARMul_State>(new ARMul_State);
|
state = std::unique_ptr<ARMul_State>(new ARMul_State);
|
||||||
|
|
||||||
ARMul_EmulateInit();
|
ARMul_EmulateInit();
|
||||||
|
@ -74,11 +74,11 @@ void ARM_DynCom::SetCPSR(u32 cpsr) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 ARM_DynCom::GetTicks() const {
|
u64 ARM_DynCom::GetTicks() const {
|
||||||
return ticks;
|
// TODO(Subv): Remove ARM_DynCom::GetTicks() and use CoreTiming::GetTicks() directly once ARMemu is gone
|
||||||
|
return CoreTiming::GetTicks();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARM_DynCom::AddTicks(u64 ticks) {
|
void ARM_DynCom::AddTicks(u64 ticks) {
|
||||||
this->ticks += ticks;
|
|
||||||
down_count -= ticks;
|
down_count -= ticks;
|
||||||
if (down_count < 0)
|
if (down_count < 0)
|
||||||
CoreTiming::Advance();
|
CoreTiming::Advance();
|
||||||
|
|
|
@ -89,8 +89,5 @@ public:
|
||||||
void ExecuteInstructions(int num_instructions) override;
|
void ExecuteInstructions(int num_instructions) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::unique_ptr<ARMul_State> state;
|
std::unique_ptr<ARMul_State> state;
|
||||||
u64 ticks;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue