mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-08 20:11:39 +12:00
Fix LDREX/STREX
This commit is contained in:
parent
93f5ec7bb4
commit
8bb494229d
3 changed files with 41 additions and 2 deletions
|
@ -5,8 +5,13 @@ CPU::CPU(Memory& mem, Kernel& kernel) : mem(mem), env(mem, kernel) {
|
|||
cp15 = std::make_shared<CP15>();
|
||||
|
||||
Dynarmic::A32::UserConfig config;
|
||||
config.arch_version = Dynarmic::A32::ArchVersion::v6K;
|
||||
config.callbacks = &env;
|
||||
config.coprocessors[15] = cp15;
|
||||
// config.define_unpredictable_behaviour = true;
|
||||
config.global_monitor = &exclusiveMonitor;
|
||||
config.processor_id = 0;
|
||||
|
||||
jit = std::make_unique<Dynarmic::A32::Jit>(config);
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,16 @@ std::optional<u32> Memory::findPaddr(u32 size) {
|
|||
}
|
||||
|
||||
u8 Memory::read8(u32 vaddr) {
|
||||
Helpers::panic("Unimplemented 8-bit read, addr: %08X", vaddr);
|
||||
const u32 page = vaddr >> pageShift;
|
||||
const u32 offset = vaddr & pageMask;
|
||||
|
||||
uintptr_t pointer = readTable[page];
|
||||
if (pointer != 0) [[likely]] {
|
||||
return *(u8*)(pointer + offset);
|
||||
}
|
||||
else {
|
||||
Helpers::panic("Unimplemented 8-bit read, addr: %08X", vaddr);
|
||||
}
|
||||
}
|
||||
|
||||
u16 Memory::read16(u32 vaddr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue