mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 22:25:41 +12:00
[APT] Start implementing shared font
This commit is contained in:
parent
e052c16a36
commit
098b70690a
3 changed files with 18 additions and 0 deletions
|
@ -31,6 +31,7 @@ namespace KernelHandles {
|
|||
MaxServiceHandle = PTM,
|
||||
|
||||
GSPSharedMemHandle = MaxServiceHandle + 1, // Handle for the GSP shared memory
|
||||
FontSharedMemHandle,
|
||||
HIDSharedMemHandle,
|
||||
|
||||
MinSharedMemHandle = GSPSharedMemHandle,
|
||||
|
@ -56,16 +57,21 @@ namespace KernelHandles {
|
|||
// Returns the name of a handle as a string based on the given handle
|
||||
static const char* getServiceName(Handle handle) {
|
||||
switch (handle) {
|
||||
case AC: return "AC";
|
||||
case AM: return "AM";
|
||||
case APT: return "APT";
|
||||
case BOSS: return "BOSS";
|
||||
case CECD: return "CECD";
|
||||
case CFG: return "CFG";
|
||||
case HID: return "HID";
|
||||
case FRD: return "FRD";
|
||||
case FS: return "FS";
|
||||
case DSP: return "DSP";
|
||||
case GPU: return "GPU";
|
||||
case LCD: return "LCD";
|
||||
case MIC: return "MIC";
|
||||
case NDM: return "NDM";
|
||||
case NIM: return "NIM";
|
||||
case PTM: return "PTM";
|
||||
default: return "Unknown";
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ class APTService {
|
|||
void checkNew3DS(u32 messagePointer);
|
||||
void checkNew3DSApp(u32 messagePointer);
|
||||
void enable(u32 messagePointer);
|
||||
void getSharedFont(u32 messagePointer);
|
||||
void initialize(u32 messagePointer);
|
||||
void inquireNotification(u32 messagePointer);
|
||||
void notifyToWait(u32 messagePointer);
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace APTCommands {
|
|||
ReceiveParameter = 0x000D0080,
|
||||
ReplySleepQuery = 0x003E0080,
|
||||
NotifyToWait = 0x00430040,
|
||||
GetSharedFont = 0x00440000,
|
||||
AppletUtility = 0x004B00C2,
|
||||
SetApplicationCpuTimeLimit = 0x004F0080,
|
||||
GetApplicationCpuTimeLimit = 0x00500040,
|
||||
|
@ -50,6 +51,7 @@ void APTService::handleSyncRequest(u32 messagePointer) {
|
|||
case APTCommands::CheckNew3DS: checkNew3DS(messagePointer); break;
|
||||
case APTCommands::CheckNew3DSApp: checkNew3DSApp(messagePointer); break;
|
||||
case APTCommands::Enable: enable(messagePointer); break;
|
||||
case APTCommands::GetSharedFont: getSharedFont(messagePointer); break;
|
||||
case APTCommands::Initialize: initialize(messagePointer); break;
|
||||
case APTCommands::InquireNotification: inquireNotification(messagePointer); break;
|
||||
case APTCommands::GetApplicationCpuTimeLimit: getApplicationCpuTimeLimit(messagePointer); break;
|
||||
|
@ -182,4 +184,13 @@ void APTService::setScreencapPostPermission(u32 messagePointer) {
|
|||
// Apparently only 1-3 are valid values, but I see 0 used in some games like Pokemon Rumble
|
||||
mem.write32(messagePointer, Result::Success);
|
||||
screencapPostPermission = perm;
|
||||
}
|
||||
|
||||
void APTService::getSharedFont(u32 messagePointer) {
|
||||
log("APT::GetSharedFont\n");
|
||||
|
||||
constexpr u32 fontVaddr = 0x18000000;
|
||||
mem.write32(messagePointer + 4, Result::Success);
|
||||
mem.write32(messagePointer + 8, fontVaddr);
|
||||
mem.write32(messagePointer + 16, KernelHandles::FontSharedMemHandle);
|
||||
}
|
Loading…
Add table
Reference in a new issue