mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-23 20:16:25 +12:00
Add AM and NIM services
This commit is contained in:
parent
f965dea916
commit
64de1391ab
9 changed files with 136 additions and 8 deletions
src/core/services
28
src/core/services/nim.cpp
Normal file
28
src/core/services/nim.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "services/nim.hpp"
|
||||
|
||||
namespace NIMCommands {
|
||||
enum : u32 {
|
||||
Initialize = 0x00210000
|
||||
};
|
||||
}
|
||||
|
||||
namespace Result {
|
||||
enum : u32 {
|
||||
Success = 0,
|
||||
};
|
||||
}
|
||||
|
||||
void NIMService::reset() {}
|
||||
|
||||
void NIMService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case NIMCommands::Initialize: initialize(messagePointer); break;
|
||||
default: Helpers::panic("NIM service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void NIMService::initialize(u32 messagePointer) {
|
||||
log("NIM::Initialize\n");
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue