mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 12:39:13 +12:00
Merge pull request #107 from caldog20/wifimac-configmem
Stub reads for WIFI MAC address in ConfigMem
This commit is contained in:
commit
e00f5d21df
2 changed files with 11 additions and 11 deletions
|
@ -104,7 +104,10 @@ u16 Memory::read16(u32 vaddr) {
|
|||
if (pointer != 0) [[likely]] {
|
||||
return *(u16*)(pointer + offset);
|
||||
} else {
|
||||
Helpers::panic("Unimplemented 16-bit read, addr: %08X", vaddr);
|
||||
switch (vaddr) {
|
||||
case ConfigMem::WifiMac + 4: return 0xEEFF; // Wifi MAC: Last 2 bytes of MAC Address
|
||||
default: Helpers::panic("Unimplemented 16-bit read, addr: %08X", vaddr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,7 +133,8 @@ u32 Memory::read32(u32 vaddr) {
|
|||
|
||||
case ConfigMem::AppMemAlloc: return appResourceLimits.maxCommit;
|
||||
case ConfigMem::SyscoreVer: return 2;
|
||||
case 0x1FF81000: return 0; // TODO: Figure out what this config mem address does
|
||||
case 0x1FF81000: return 0; // TODO: Figure out what this config mem address does
|
||||
case ConfigMem::WifiMac: return 0xFF07F440; // Wifi MAC: First 4 bytes of MAC Address
|
||||
default:
|
||||
if (vaddr >= VirtualAddrs::VramStart && vaddr < VirtualAddrs::VramStart + VirtualAddrs::VramSize) {
|
||||
Helpers::warn("VRAM read!\n");
|
||||
|
@ -454,4 +458,4 @@ u64 Memory::timeSince3DSEpoch() {
|
|||
constexpr u64 offset = 2208988800ull;
|
||||
milliseconds ms = duration_cast<milliseconds>(seconds(rawTime + timezoneDifference + offset));
|
||||
return ms.count();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue