mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-03 12:27:21 +12:00
Added GSP services
This commit is contained in:
parent
818ade660d
commit
a56b67f3ba
9 changed files with 96 additions and 5 deletions
|
@ -13,9 +13,11 @@ namespace KernelHandles {
|
|||
APT = 0xFFFF8002, // App Title something service?
|
||||
HID = 0xFFFF8003, // Handles everything input-related including gyro
|
||||
FS = 0xFFFF8004, // Filesystem service
|
||||
GPU = 0xFFFF8005, // GPU service
|
||||
LCD = 0xFFFF8006, // LCD service
|
||||
|
||||
MinServiceHandle = APT,
|
||||
MaxServiceHandle = FS
|
||||
MaxServiceHandle = LCD
|
||||
};
|
||||
|
||||
// Returns whether "handle" belongs to one of the OS services
|
||||
|
@ -29,6 +31,8 @@ namespace KernelHandles {
|
|||
case APT: return "APT";
|
||||
case HID: return "HID";
|
||||
case FS: return "FS";
|
||||
case GPU: return "GPU";
|
||||
case LCD: return "LCD";
|
||||
default: return "Unknown";
|
||||
}
|
||||
}
|
||||
|
|
16
include/services/gsp_gpu.hpp
Normal file
16
include/services/gsp_gpu.hpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
class GPUService {
|
||||
Handle handle = KernelHandles::GPU;
|
||||
Memory& mem;
|
||||
|
||||
// Service commands
|
||||
|
||||
public:
|
||||
GPUService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
16
include/services/gsp_lcd.hpp
Normal file
16
include/services/gsp_lcd.hpp
Normal file
|
@ -0,0 +1,16 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
class LCDService {
|
||||
Handle handle = KernelHandles::LCD;
|
||||
Memory& mem;
|
||||
|
||||
// Service commands
|
||||
|
||||
public:
|
||||
LCDService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
|
@ -5,6 +5,8 @@
|
|||
#include "services/apt.hpp"
|
||||
#include "services/hid.hpp"
|
||||
#include "services/fs.hpp"
|
||||
#include "services/gsp_gpu.hpp"
|
||||
#include "services/gsp_lcd.hpp"
|
||||
|
||||
class ServiceManager {
|
||||
std::array<u32, 16>& regs;
|
||||
|
@ -13,6 +15,8 @@ class ServiceManager {
|
|||
APTService apt;
|
||||
HIDService hid;
|
||||
FSService fs;
|
||||
GPUService gsp_gpu;
|
||||
LCDService gsp_lcd;
|
||||
|
||||
// "srv:" commands
|
||||
void getServiceHandle(u32 messagePointer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue