mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
Stub AM::GetDLCTitleInfo got PMD: Gates to Infinity
This commit is contained in:
parent
708bf9f040
commit
1730ab9734
4 changed files with 11 additions and 4 deletions
|
@ -10,6 +10,7 @@ class AMService {
|
|||
MAKE_LOG_FUNCTION(log, amLogger)
|
||||
|
||||
// Service commands
|
||||
void getDLCTitleInfo(u32 messagePointer);
|
||||
void listTitleInfo(u32 messagePointer);
|
||||
|
||||
public:
|
||||
|
|
|
@ -51,10 +51,9 @@ void Kernel::signalEvent() {
|
|||
const Handle handle = regs[0];
|
||||
const auto event = getObject(handle, KernelObjectType::Event);
|
||||
logSVC("SignalEvent(event handle = %X)\n", handle);
|
||||
printf("Stubbed SignalEvent!!\n");
|
||||
|
||||
if (event == nullptr) [[unlikely]] {
|
||||
Helpers::warn("Signalled non-existent event: %X\n", handle);
|
||||
logThread("Signalled non-existent event: %X\n", handle);
|
||||
regs[0] = SVCResult::Success;
|
||||
//regs[0] = SVCResult::BadHandle;
|
||||
return;
|
||||
|
|
|
@ -80,7 +80,7 @@ void Kernel::switchToNextThread() {
|
|||
std::optional<int> newThreadIndex = getNextThread();
|
||||
|
||||
if (!newThreadIndex.has_value()) {
|
||||
Helpers::warn("Kernel tried to switch to the next thread but none found. Switching to random thread\n");
|
||||
log("Kernel tried to switch to the next thread but none found. Switching to random thread\n");
|
||||
switchThread(rand() % threadCount);
|
||||
} else {
|
||||
switchThread(newThreadIndex.value());
|
||||
|
@ -308,7 +308,7 @@ bool Kernel::shouldWaitOnObject(KernelObject* object) {
|
|||
return !object->getData<Event>()->fired;
|
||||
|
||||
default:
|
||||
Helpers::warn("Not sure whether to wait on object (type: %s)", object->getTypeName());
|
||||
logThread("Not sure whether to wait on object (type: %s)", object->getTypeName());
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace AMCommands {
|
||||
enum : u32 {
|
||||
GetDLCTitleInfo = 0x10050084,
|
||||
ListTitleInfo = 0x10070102
|
||||
};
|
||||
}
|
||||
|
@ -17,6 +18,7 @@ void AMService::reset() {}
|
|||
void AMService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case AMCommands::GetDLCTitleInfo: getDLCTitleInfo(messagePointer); break;
|
||||
case AMCommands::ListTitleInfo: listTitleInfo(messagePointer); break;
|
||||
default: Helpers::panic("AM service requested. Command: %08X\n", command);
|
||||
}
|
||||
|
@ -40,4 +42,9 @@ void AMService::listTitleInfo(u32 messagePointer) {
|
|||
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
mem.write32(messagePointer + 8, ticketCount);
|
||||
}
|
||||
|
||||
void AMService::getDLCTitleInfo(u32 messagePointer) {
|
||||
log("AM::GetDLCTitleInfo (stubbed to fail)\n");
|
||||
mem.write32(messagePointer + 4, -1);
|
||||
}
|
Loading…
Add table
Reference in a new issue