Panda3DS/src/core/services/nim.cpp
Mary 122b1b2727 hle: Add proper type for result code
This should clean up all HLE errorcode in the codebase.

I didn't removed Rust::Result as this should be a cleanup for another
iteration.
2023-06-16 20:09:37 +02:00

24 lines
No EOL
617 B
C++

#include "services/nim.hpp"
#include "ipc.hpp"
namespace NIMCommands {
enum : u32 {
Initialize = 0x00210000
};
}
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, IPC::responseHeader(0x21, 1, 0));
mem.write32(messagePointer + 4, Result::Success);
}