mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-19 12:10:59 +12:00
[CAM] Add service skeleton
This commit is contained in:
parent
b564029a8f
commit
5b9648e0a8
7 changed files with 63 additions and 5 deletions
28
src/core/services/cam.cpp
Normal file
28
src/core/services/cam.cpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "services/cam.hpp"
|
||||
|
||||
namespace CAMCommands {
|
||||
enum : u32 {
|
||||
DriverInitialize = 0x00390000
|
||||
};
|
||||
}
|
||||
|
||||
namespace Result {
|
||||
enum : u32 {
|
||||
Success = 0,
|
||||
};
|
||||
}
|
||||
|
||||
void CAMService::reset() {}
|
||||
|
||||
void CAMService::handleSyncRequest(u32 messagePointer) {
|
||||
const u32 command = mem.read32(messagePointer);
|
||||
switch (command) {
|
||||
case CAMCommands::DriverInitialize: driverInitialize(messagePointer); break;
|
||||
default: Helpers::panic("CAM service requested. Command: %08X\n", command);
|
||||
}
|
||||
}
|
||||
|
||||
void CAMService::driverInitialize(u32 messagePointer) {
|
||||
log("CAM::DriverInitialize\n");
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue