Add BOSS:GetErrorCode

This commit is contained in:
wheremyfoodat 2023-08-20 15:07:19 +03:00
parent 73b9a909cd
commit 197bc93eec
2 changed files with 10 additions and 0 deletions

View file

@ -13,6 +13,7 @@ class BOSSService {
// Service commands
void cancelTask(u32 messagePointer);
void initializeSession(u32 messagePointer);
void getErrorCode(u32 messagePointer);
void getNsDataIdList(u32 messagePointer, u32 commandWord);
void getOptoutFlag(u32 messagePointer);
void getStorageEntryInfo(u32 messagePointer); // Unknown what this is, name taken from Citra

View file

@ -21,6 +21,7 @@ namespace BOSSCommands {
GetTaskState = 0x00200082,
GetTaskStatus = 0x002300C2,
GetTaskInfo = 0x00250082,
GetErrorCode = 0x002E0040,
RegisterStorageEntry = 0x002F0140,
GetStorageEntryInfo = 0x00300000,
};
@ -34,6 +35,7 @@ void BOSSService::handleSyncRequest(u32 messagePointer) {
const u32 command = mem.read32(messagePointer);
switch (command) {
case BOSSCommands::CancelTask: cancelTask(messagePointer); break;
case BOSSCommands::GetErrorCode: getErrorCode(messagePointer); break;
case BOSSCommands::GetNsDataIdList:
case BOSSCommands::GetNsDataIdList1:
getNsDataIdList(messagePointer, command); break;
@ -127,6 +129,13 @@ void BOSSService::getTaskInfo(u32 messagePointer) {
mem.write32(messagePointer + 4, Result::Success);
}
void BOSSService::getErrorCode(u32 messagePointer) {
log("BOSS::GetErrorCode (stubbed)\n");
mem.write32(messagePointer, IPC::responseHeader(0x2E, 2, 0));
mem.write32(messagePointer + 4, Result::Success);
mem.write32(messagePointer + 8, Result::Success); // No error code
}
void BOSSService::getStorageEntryInfo(u32 messagePointer) {
log("BOSS::GetStorageEntryInfo (undocumented)\n");
mem.write32(messagePointer, IPC::responseHeader(0x30, 3, 0));