mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
Add cp15
This commit is contained in:
parent
e0204a1eff
commit
58fe2bcf18
4 changed files with 79 additions and 17 deletions
|
@ -1,15 +1,22 @@
|
|||
#ifdef CPU_DYNARMIC
|
||||
#include "cpu_dynarmic.hpp"
|
||||
|
||||
CPU::CPU(Memory& mem, Kernel& kernel) : mem(mem), env(mem, kernel) {}
|
||||
CPU::CPU(Memory& mem, Kernel& kernel) : mem(mem), env(mem, kernel) {
|
||||
Dynarmic::A32::UserConfig config;
|
||||
|
||||
config.callbacks = &env;
|
||||
config.coprocessors[15] = std::make_shared<CP15>();
|
||||
jit = std::make_unique<Dynarmic::A32::Jit>(config);
|
||||
}
|
||||
|
||||
void CPU::reset() {
|
||||
// ARM mode, all flags disabled, interrupts and aborts all enabled, user mode
|
||||
|
||||
setCPSR(0x00000010);
|
||||
|
||||
jit.Reset();
|
||||
jit.ClearCache();
|
||||
jit.Regs().fill(0);
|
||||
jit->Reset();
|
||||
jit->ClearCache();
|
||||
jit->Regs().fill(0);
|
||||
}
|
||||
|
||||
#endif // CPU_DYNARMIC
|
Loading…
Add table
Add a link
Reference in a new issue