mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-05-03 02:34:48 +12:00
[ACT/MIC/NFC] Stub function for Captain Toad
This commit is contained in:
parent
269efc3c43
commit
3935820c05
11 changed files with 144 additions and 9 deletions
include
|
@ -11,6 +11,7 @@ namespace KernelHandles {
|
|||
CurrentThread = 0xFFFF8000, // Used by the original kernel
|
||||
CurrentProcess = 0xFFFF8001, // Used by the original kernel
|
||||
AC, // Something network related
|
||||
ACT, // Handles NNID accounts
|
||||
AM, // Application manager
|
||||
APT, // App Title something service?
|
||||
BOSS, // Streetpass stuff?
|
||||
|
@ -25,6 +26,7 @@ namespace KernelHandles {
|
|||
LCD, // LCD service (Used for configuring the displays)
|
||||
LDR_RO, // Loader service. Used for loading CROs.
|
||||
MIC, // MIC service (Controls the microphone)
|
||||
NFC, // NFC (Duh), used for Amiibo
|
||||
NIM, // Updates, DLC, etc
|
||||
NDM, // ?????
|
||||
PTM, // PTM service (Used for accessing various console info, such as battery, shell and pedometer state)
|
||||
|
@ -61,6 +63,7 @@ namespace KernelHandles {
|
|||
static const char* getServiceName(Handle handle) {
|
||||
switch (handle) {
|
||||
case AC: return "AC";
|
||||
case ACT: return "ACT";
|
||||
case AM: return "AM";
|
||||
case APT: return "APT";
|
||||
case BOSS: return "BOSS";
|
||||
|
@ -71,11 +74,12 @@ namespace KernelHandles {
|
|||
case FRD: return "FRD";
|
||||
case FS: return "FS";
|
||||
case DSP: return "DSP";
|
||||
case GPU: return "GPU";
|
||||
case LCD: return "LCD";
|
||||
case GPU: return "GSP::GPU";
|
||||
case LCD: return "GSP::LCD";
|
||||
case LDR_RO: return "LDR:RO";
|
||||
case MIC: return "MIC";
|
||||
case NDM: return "NDM";
|
||||
case NFC: return "NFC";
|
||||
case NIM: return "NIM";
|
||||
case PTM: return "PTM";
|
||||
case Y2R: return "Y2R";
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace Log {
|
|||
|
||||
// Service loggers
|
||||
static Logger<false> acLogger;
|
||||
static Logger<false> actLogger;
|
||||
static Logger<false> amLogger;
|
||||
static Logger<false> aptLogger;
|
||||
static Logger<false> bossLogger;
|
||||
|
@ -44,6 +45,7 @@ namespace Log {
|
|||
static Logger<false> gspLCDLogger;
|
||||
static Logger<false> ldrLogger;
|
||||
static Logger<false> micLogger;
|
||||
static Logger<false> nfcLogger;
|
||||
static Logger<false> nimLogger;
|
||||
static Logger<false> ndmLogger;
|
||||
static Logger<false> ptmLogger;
|
||||
|
|
19
include/services/act.hpp
Normal file
19
include/services/act.hpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
class ACTService {
|
||||
Handle handle = KernelHandles::ACT;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, actLogger)
|
||||
|
||||
// Service commands
|
||||
void initialize(u32 messagePointer);
|
||||
|
||||
public:
|
||||
ACTService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
|
@ -16,6 +16,7 @@ class MICService {
|
|||
void setGain(u32 messagePointer);
|
||||
void setPower(u32 messagePointer);
|
||||
void startSampling(u32 messagePointer);
|
||||
void theCaptainToadFunction(u32 messagePointer);
|
||||
|
||||
u8 gain = 0; // How loud our microphone input signal is
|
||||
bool micEnabled = false;
|
||||
|
|
19
include/services/nfc.hpp
Normal file
19
include/services/nfc.hpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
#include "helpers.hpp"
|
||||
#include "kernel_types.hpp"
|
||||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
|
||||
class NFCService {
|
||||
Handle handle = KernelHandles::NFC;
|
||||
Memory& mem;
|
||||
MAKE_LOG_FUNCTION(log, nfcLogger)
|
||||
|
||||
// Service commands
|
||||
void initialize(u32 messagePointer);
|
||||
|
||||
public:
|
||||
NFCService(Memory& mem) : mem(mem) {}
|
||||
void reset();
|
||||
void handleSyncRequest(u32 messagePointer);
|
||||
};
|
|
@ -5,6 +5,7 @@
|
|||
#include "logger.hpp"
|
||||
#include "memory.hpp"
|
||||
#include "services/ac.hpp"
|
||||
#include "services/act.hpp"
|
||||
#include "services/am.hpp"
|
||||
#include "services/apt.hpp"
|
||||
#include "services/boss.hpp"
|
||||
|
@ -19,6 +20,7 @@
|
|||
#include "services/gsp_lcd.hpp"
|
||||
#include "services/ldr_ro.hpp"
|
||||
#include "services/mic.hpp"
|
||||
#include "services/nfc.hpp"
|
||||
#include "services/nim.hpp"
|
||||
#include "services/ndm.hpp"
|
||||
#include "services/ptm.hpp"
|
||||
|
@ -37,6 +39,7 @@ class ServiceManager {
|
|||
MAKE_LOG_FUNCTION(log, srvLogger)
|
||||
|
||||
ACService ac;
|
||||
ACTService act;
|
||||
AMService am;
|
||||
APTService apt;
|
||||
BOSSService boss;
|
||||
|
@ -51,6 +54,7 @@ class ServiceManager {
|
|||
LCDService gsp_lcd;
|
||||
LDRService ldr;
|
||||
MICService mic;
|
||||
NFCService nfc;
|
||||
NIMService nim;
|
||||
NDMService ndm;
|
||||
PTMService ptm;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue