diff --git a/include/kernel/config_mem.hpp b/include/kernel/config_mem.hpp index 74846f0c..6de9c6bc 100644 --- a/include/kernel/config_mem.hpp +++ b/include/kernel/config_mem.hpp @@ -9,10 +9,21 @@ namespace ConfigMem { SyscoreVer = 0x1FF80010, EnvInfo = 0x1FF80014, AppMemAlloc = 0x1FF80040, + HardwareType = 0x1FF81004, Datetime0 = 0x1FF81020, NetworkState = 0x1FF81067, LedState3D = 0x1FF81084, BatteryState = 0x1FF81085, 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 + }; + } } \ No newline at end of file diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 65e3f9e2..6ed2e51a 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -70,6 +70,7 @@ u8 Memory::read8(u32 vaddr) { switch (vaddr) { case ConfigMem::BatteryState: return getBatteryState(true, true, BatteryLevel::FourBars); case ConfigMem::EnvInfo: return envInfo; + case ConfigMem::HardwareType: return ConfigMem::HardwareCodes::Product; case ConfigMem::KernelVersionMinor: return u8(kernelVersion & 0xff); case ConfigMem::KernelVersionMajor: return u8(kernelVersion >> 8); case ConfigMem::LedState3D: return 1; // Report the 3D LED as always off (non-zero) for now