Make APT::GetLockHandle fail to skip aptInit

This commit is contained in:
wheremyfoodat 2022-09-18 02:18:40 +03:00
parent 6154a360c6
commit 5bc8c9d671
6 changed files with 33 additions and 4 deletions

View file

@ -1,7 +1,30 @@
#include "services/apt.hpp"
namespace APTCommands {
enum : u32 {
GetLockHandle = 0x00010040
};
}
namespace Result {
enum : u32 {
Success = 0,
Failure = 0xFFFFFFFF
};
}
void APTService::reset() {}
void APTService::handleSyncRequest(u32 messagePointer) {
Helpers::panic("APT service requested");
const u32 command = mem.read32(messagePointer);
switch (command) {
case APTCommands::GetLockHandle: getLockHandle(messagePointer); break;
default: Helpers::panic("APT service requested. Command: %08X\n", command);
}
}
void APTService::getLockHandle(u32 messagePointer) {
printf("APT: getLockHandle (Failure)\n");
mem.write32(messagePointer + 4, Result::Failure); // Result code
mem.write32(messagePointer + 16, 0); // Translation descriptor
}