diff --git a/include/services/boss.hpp b/include/services/boss.hpp index 87a72c9f..c98f4817 100644 --- a/include/services/boss.hpp +++ b/include/services/boss.hpp @@ -11,7 +11,9 @@ class BOSSService { // Service commands void initializeSession(u32 messagePointer); + void getOptoutFlag(u32 messagePointer); + s8 optoutFlag; public: BOSSService(Memory& mem) : mem(mem) {} void reset(); diff --git a/src/core/services/boss.cpp b/src/core/services/boss.cpp index fb5053f7..002eaded 100644 --- a/src/core/services/boss.cpp +++ b/src/core/services/boss.cpp @@ -2,7 +2,8 @@ namespace BOSSCommands { enum : u32 { - InitializeSession = 0x00010082 + InitializeSession = 0x00010082, + GetOptoutFlag = 0x000A0000 }; } @@ -12,11 +13,14 @@ namespace Result { }; } -void BOSSService::reset() {} +void BOSSService::reset() { + optoutFlag = 0; +} void BOSSService::handleSyncRequest(u32 messagePointer) { const u32 command = mem.read32(messagePointer); switch (command) { + case BOSSCommands::GetOptoutFlag: getOptoutFlag(messagePointer); break; case BOSSCommands::InitializeSession: initializeSession(messagePointer); break; default: Helpers::panic("BOSS service requested. Command: %08X\n", command); } @@ -25,4 +29,10 @@ void BOSSService::handleSyncRequest(u32 messagePointer) { void BOSSService::initializeSession(u32 messagePointer) { log("BOSS::InitializeSession (stubbed)\n"); mem.write32(messagePointer + 4, Result::Success); +} + +void BOSSService::getOptoutFlag(u32 messagePointer) { + log("BOSS::getOptoutFlag\n"); + mem.write32(messagePointer + 4, Result::Success); + mem.write8(messagePointer + 8, optoutFlag); } \ No newline at end of file