mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-05 23:02:58 +12:00
Fix LDREX/STREX
This commit is contained in:
parent
93f5ec7bb4
commit
8bb494229d
3 changed files with 41 additions and 2 deletions
|
@ -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