diff --git a/include/services/gsp_lcd.hpp b/include/services/gsp_lcd.hpp index e7672d4f..6e919360 100644 --- a/include/services/gsp_lcd.hpp +++ b/include/services/gsp_lcd.hpp @@ -11,6 +11,7 @@ class LCDService { MAKE_LOG_FUNCTION(log, gspLCDLogger) // Service commands + void setLedForceOff(u32 messagePointer); public: LCDService(Memory& mem) : mem(mem) {} diff --git a/src/core/services/gsp_lcd.cpp b/src/core/services/gsp_lcd.cpp index d018166b..c8416e03 100644 --- a/src/core/services/gsp_lcd.cpp +++ b/src/core/services/gsp_lcd.cpp @@ -3,6 +3,7 @@ namespace LCDCommands { enum : u32 { + SetLedForceOff = 0x00130040, }; } @@ -11,6 +12,16 @@ void LCDService::reset() {} void LCDService::handleSyncRequest(u32 messagePointer) { const u32 command = mem.read32(messagePointer); switch (command) { + case LCDCommands::SetLedForceOff: setLedForceOff(messagePointer); break; + default: Helpers::panic("LCD service requested. Command: %08X\n", command); } +} + +void LCDService::setLedForceOff(u32 messagePointer) { + const u8 state = mem.read8(messagePointer + 4); + log("LCD::SetLedForceOff (state = %X)\n", state); + + mem.write32(messagePointer, IPC::responseHeader(0x13, 1, 0)); + mem.write32(messagePointer + 4, Result::Success); } \ No newline at end of file