yuzu-emu
/
yuzu-android
Archived
1
0
Fork 0

Merge pull request #275 from MerryMage/addticks-dynarmic

arm_dynarmic: Fix timing
This commit is contained in:
bunnei 2018-03-24 05:47:42 -04:00 committed by GitHub
commit 46945b5c96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 7 deletions

View File

@ -86,21 +86,17 @@ public:
} }
void AddTicks(u64 ticks) override { void AddTicks(u64 ticks) override {
if (ticks > ticks_remaining) { CoreTiming::AddTicks(ticks - num_interpreted_instructions);
ticks_remaining = 0; num_interpreted_instructions = 0;
return;
}
ticks -= ticks_remaining;
} }
u64 GetTicksRemaining() override { u64 GetTicksRemaining() override {
return ticks_remaining; return std::max(CoreTiming::GetDowncount(), 0);
} }
u64 GetCNTPCT() override { u64 GetCNTPCT() override {
return CoreTiming::GetTicks(); return CoreTiming::GetTicks();
} }
ARM_Dynarmic& parent; ARM_Dynarmic& parent;
size_t ticks_remaining = 0;
size_t num_interpreted_instructions = 0; size_t num_interpreted_instructions = 0;
u64 tpidrro_el0 = 0; u64 tpidrro_el0 = 0;
u64 tpidr_el0 = 0; u64 tpidr_el0 = 0;