mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 20:19:13 +12:00
Add DLP::SRVR service
This commit is contained in:
parent
b37256e9ea
commit
e3fb364d95
7 changed files with 67 additions and 6 deletions
32
src/core/services/dlp_srvr.cpp
Normal file
32
src/core/services/dlp_srvr.cpp
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include "services/dlp_srvr.hpp"
|
||||
#include "ipc.hpp"
|
||||
|
||||
namespace DlpSrvrCommands {
|
||||
enum : u32 {
|
||||
IsChild = 0x000E0040
|
||||
};
|
||||
}
|
||||
|
||||
namespace Result {
|
||||
enum : u32 {
|
||||
Success = 0,
|
||||
};
|
||||
}
|
||||
|
||||
void DlpSrvrService::reset() {}
|
||||
|
||||
void DlpSrvrService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case DlpSrvrCommands::IsChild: isChild(messagePointer); break;
|
||||
default: Helpers::panic("DLP::SRVR service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void DlpSrvrService::isChild(u32 messagePointer) {
|
||||
log("DLP::SRVR: IsChild\n");
|
||||
|
||||
mem.write32(messagePointer, IPC::responseHeader(0x0E, 2, 0));
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
mem.write32(messagePointer + 8, 0); // We are responsible adults
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue