mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-09-03 16:15:44 +00:00
Add different nim types
This commit is contained in:
parent
3340a5691f
commit
d0eda87f8b
2 changed files with 14 additions and 4 deletions
|
@ -6,7 +6,6 @@
|
|||
#include "result/result.hpp"
|
||||
|
||||
class NIMService {
|
||||
Handle handle = KernelHandles::NIM;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, nimLogger)
|
||||
|
||||
|
@ -14,7 +13,12 @@ class NIMService {
|
|||
void initialize(u32 messagePointer);
|
||||
|
||||
public:
|
||||
enum class Type {
|
||||
AOC, // nim:aoc
|
||||
U, // nim:u
|
||||
};
|
||||
|
||||
NIMService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
void handleSyncRequest(u32 messagePointer, Type type);
|
||||
};
|
|
@ -9,10 +9,16 @@ namespace NIMCommands {
|
|||
|
||||
void NIMService::reset() {}
|
||||
|
||||
void NIMService::handleSyncRequest(u32 messagePointer) {
|
||||
void NIMService::handleSyncRequest(u32 messagePointer, Type type) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case NIMCommands::Initialize: initialize(messagePointer); break;
|
||||
if (type == Type::AOC) {
|
||||
switch (command) {
|
||||
case NIMCommands::Initialize: initialize(messagePointer); break;
|
||||
|
||||
default: Helpers::panic("NIM AOC service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
default: Helpers::panic("NIM service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue