[CPU] Add better cycle counting

This commit is contained in:
wheremyfoodat 2023-05-07 00:36:36 +03:00
parent 7b4de79ed6
commit ac43c09ebd
3 changed files with 518 additions and 1 deletions

View file

@ -17,6 +17,8 @@ public:
Memory& mem;
Kernel& kernel;
u64 getCyclesForInstruction(bool isThumb, u32 instruction);
u8 MemoryRead8(u32 vaddr) override {
return mem.read8(vaddr);
}
@ -100,6 +102,10 @@ public:
return ticksLeft;
}
u64 GetTicksForCode(bool isThumb, u32 vaddr, u32 instruction) override {
return getCyclesForInstruction(isThumb, instruction);
}
MyEnvironment(Memory& mem, Kernel& kernel, CPU& cpu) : mem(mem), kernel(kernel) {}
};