mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 12:39:13 +12:00
[NDM] Stub NDM service
This commit is contained in:
parent
aef1520f17
commit
36a30da78d
9 changed files with 84 additions and 10 deletions
35
src/core/services/ndm.cpp
Normal file
35
src/core/services/ndm.cpp
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "services/ndm.hpp"
|
||||
|
||||
namespace NDMCommands {
|
||||
enum : u32 {
|
||||
OverrideDefaultDaemons = 0x00140040,
|
||||
SuspendDaemons = 0x00060040
|
||||
};
|
||||
}
|
||||
|
||||
namespace Result {
|
||||
enum : u32 {
|
||||
Success = 0,
|
||||
};
|
||||
}
|
||||
|
||||
void NDMService::reset() {}
|
||||
|
||||
void NDMService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case NDMCommands::OverrideDefaultDaemons: overrideDefaultDaemons(messagePointer); break;
|
||||
case NDMCommands::SuspendDaemons: suspendDaemons(messagePointer); break;
|
||||
default: Helpers::panic("NDM service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void NDMService::overrideDefaultDaemons(u32 messagePointer) {
|
||||
printf("NDM::OverrideDefaultDaemons(stubbed)\n");
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
||||
|
||||
void NDMService::suspendDaemons(u32 messagePointer) {
|
||||
printf("NDM::SuspendDaemons(stubbed)\n");
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue