mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-12 09:09:47 +12:00
[Config mem] Add hardware type field
This commit is contained in:
parent
4bef096f04
commit
e40a8eb194
2 changed files with 12 additions and 0 deletions
|
@ -9,10 +9,21 @@ namespace ConfigMem {
|
||||||
SyscoreVer = 0x1FF80010,
|
SyscoreVer = 0x1FF80010,
|
||||||
EnvInfo = 0x1FF80014,
|
EnvInfo = 0x1FF80014,
|
||||||
AppMemAlloc = 0x1FF80040,
|
AppMemAlloc = 0x1FF80040,
|
||||||
|
HardwareType = 0x1FF81004,
|
||||||
Datetime0 = 0x1FF81020,
|
Datetime0 = 0x1FF81020,
|
||||||
NetworkState = 0x1FF81067,
|
NetworkState = 0x1FF81067,
|
||||||
LedState3D = 0x1FF81084,
|
LedState3D = 0x1FF81084,
|
||||||
BatteryState = 0x1FF81085,
|
BatteryState = 0x1FF81085,
|
||||||
HeadphonesConnectedMaybe = 0x1FF810C0 // TODO: What is actually stored here?
|
HeadphonesConnectedMaybe = 0x1FF810C0 // TODO: What is actually stored here?
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Shows what type of hardware we're running on
|
||||||
|
namespace HardwareCodes {
|
||||||
|
enum : u8 {
|
||||||
|
Product = 1,
|
||||||
|
Devboard = 2,
|
||||||
|
Debugger = 3,
|
||||||
|
Capture = 4
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -70,6 +70,7 @@ u8 Memory::read8(u32 vaddr) {
|
||||||
switch (vaddr) {
|
switch (vaddr) {
|
||||||
case ConfigMem::BatteryState: return getBatteryState(true, true, BatteryLevel::FourBars);
|
case ConfigMem::BatteryState: return getBatteryState(true, true, BatteryLevel::FourBars);
|
||||||
case ConfigMem::EnvInfo: return envInfo;
|
case ConfigMem::EnvInfo: return envInfo;
|
||||||
|
case ConfigMem::HardwareType: return ConfigMem::HardwareCodes::Product;
|
||||||
case ConfigMem::KernelVersionMinor: return u8(kernelVersion & 0xff);
|
case ConfigMem::KernelVersionMinor: return u8(kernelVersion & 0xff);
|
||||||
case ConfigMem::KernelVersionMajor: return u8(kernelVersion >> 8);
|
case ConfigMem::KernelVersionMajor: return u8(kernelVersion >> 8);
|
||||||
case ConfigMem::LedState3D: return 1; // Report the 3D LED as always off (non-zero) for now
|
case ConfigMem::LedState3D: return 1; // Report the 3D LED as always off (non-zero) for now
|
||||||
|
|
Loading…
Add table
Reference in a new issue