mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
[Y2R] Add service skeleton
This commit is contained in:
parent
38fde0f608
commit
9a6640cae2
6 changed files with 51 additions and 3 deletions
|
@ -26,9 +26,10 @@ namespace KernelHandles {
|
|||
NIM, // Updates, DLC, etc
|
||||
NDM, // ?????
|
||||
PTM, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
|
||||
Y2R,
|
||||
|
||||
MinServiceHandle = AC,
|
||||
MaxServiceHandle = PTM,
|
||||
MaxServiceHandle = Y2R,
|
||||
|
||||
GSPSharedMemHandle = MaxServiceHandle + 1, // Handle for the GSP shared memory
|
||||
FontSharedMemHandle,
|
||||
|
@ -73,6 +74,7 @@ namespace KernelHandles {
|
|||
case NDM: return "NDM";
|
||||
case NIM: return "NIM";
|
||||
case PTM: return "PTM";
|
||||
case Y2R: return "Y2R";
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "services/nim.hpp"
|
||||
#include "services/ndm.hpp"
|
||||
#include "services/ptm.hpp"
|
||||
#include "services/y2r.hpp"
|
||||
|
||||
// More circular dependencies!!
|
||||
class Kernel;
|
||||
|
@ -49,6 +50,7 @@ class ServiceManager {
|
|||
NIMService nim;
|
||||
NDMService ndm;
|
||||
PTMService ptm;
|
||||
Y2RService y2r;
|
||||
|
||||
// "srv:" commands
|
||||
void enableNotification(u32 messagePointer);
|
||||
|
|
18
include/services/y2r.hpp
Normal file
18
include/services/y2r.hpp
Normal file
|
@ -0,0 +1,18 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
class Y2RService {
|
||||
Handle handle = KernelHandles::Y2R;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, y2rLogger)
|
||||
|
||||
// Service commands
|
||||
|
||||
public:
|
||||
Y2RService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue