Updated some module's FunctionTable from 3dbrez

This commit is contained in:
JamePeng 2016-02-09 01:21:40 +08:00
parent f1d1049c4f
commit 1d86878be4
10 changed files with 953 additions and 745 deletions

View file

@ -46,24 +46,34 @@ enum class SignalType : u32 {
enum class AppletId : u32 {
HomeMenu = 0x101,
AlternateMenu = 0x103,
Camera = 0x110,
FriendsList = 0x112,
GameNotes = 0x113,
CameraApplet = 0x110,
FriendsListApplet = 0x112,
GameNotesApplet = 0x113,
InternetBrowser = 0x114,
InstructionManual = 0x115,
Notifications = 0x116,
Miiverse = 0x117,
MiiverseApplet = 0x117,
MiiversePostingApplet = 0x118,
AmiiboSettings = 0x119,
SoftwareKeyboard1 = 0x201,
Ed = 0x202,
PnoteApp = 0x204,
SnoteApp = 0x205,
Error = 0x206,
Mint = 0x207,
Extrapad = 0x208,
Memolib = 0x209,
MiiSelectorEd1 = 0x202,
PhotoSelector1 = 0x204,
SoundSelector1 = 0x205,
ErrorDisplay1 = 0x206,
EShopMint1 = 0x207,
Extrapad1 = 0x208,
Notepad1 = 0x209,
Application = 0x300,
EShopTiger = 0x301,
AnyLibraryApplet = 0x400,
SoftwareKeyboard2 = 0x401,
MiiSelectorEd2 = 0x402,
PhotoSelector2 = 0x404,
SoundSelector2 = 0x405,
ErrorDisplay2 = 0x406,
EShopMint2 = 0x407,
Extrapad2 = 0x408,
Notepad2 = 0x409
};
/// Send a parameter to the currently-running application, which will read it via ReceiveParameter

View file

@ -9,25 +9,94 @@ namespace Service {
namespace APT {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010040, GetLockHandle, "GetLockHandle?"},
{0x00020080, Initialize, "Initialize?"},
{0x00030040, Enable, "Enable?"},
{0x00040040, nullptr, "Finalize?"},
{0x00050040, nullptr, "GetAppletManInfo?"},
{0x00060040, nullptr, "GetAppletInfo?"},
{ 0x00010040, GetLockHandle, "GetLockHandle"},
{ 0x00020080, Initialize, "Initialize"},
{ 0x00030040, Enable, "Enable"},
{ 0x00040040, nullptr, "Finalize"},
{ 0x00050040, nullptr, "GetAppletManInfo"},
{ 0x00060040, nullptr, "GetAppletInfo"},
{ 0x00070000, nullptr, "GetLastSignaledAppletId"},
{ 0x00080000, nullptr, "CountRegisteredApplet"},
{ 0x00090040, IsRegistered, "IsRegistered"},
{ 0x000A0040, nullptr, "GetAttribute"},
{ 0x000B0040, InquireNotification, "InquireNotification"},
{ 0x000C0104, SendParameter, "SendParameter"},
{ 0x000D0080, ReceiveParameter, "ReceiveParameter"},
{ 0x000E0080, GlanceParameter, "GlanceParameter"},
{ 0x000F0100, CancelParameter, "CancelParameter"},
{ 0x001000C2, nullptr, "DebugFunc"},
{ 0x001100C0, nullptr, "MapProgramIdForDebug"},
{ 0x00120040, nullptr, "SetHomeMenuAppletIdForDebug"},
{ 0x00130000, nullptr, "GetPreparationState"},
{ 0x00140040, nullptr, "SetPreparationState"},
{ 0x00150140, nullptr, "PrepareToStartApplication"},
{ 0x00160040, PreloadLibraryApplet, "PreloadLibraryApplet"},
{ 0x00170040, nullptr, "FinishPreloadingLibraryApplet"},
{ 0x00180040, PrepareToStartLibraryApplet, "PrepareToStartLibraryApplet" },
{0x001E0084, StartLibraryApplet, "StartLibraryApplet"},
{0x003B0040, nullptr, "CancelLibraryApplet?"},
{0x00430040, NotifyToWait, "NotifyToWait?"},
{0x00440000, GetSharedFont, "GetSharedFont?"},
{0x004B00C2, AppletUtility, "AppletUtility?"},
{0x00550040, nullptr, "WriteInputToNsState?"},
{ 0x00190040, nullptr, "PrepareToStartSystemApplet" },
{ 0x001A0000, nullptr, "PrepareToStartNewestHomeMenu" },
{ 0x001B00C4, nullptr, "StartApplication" },
{ 0x001C0000, nullptr, "WakeupApplication" },
{ 0x001D0000, nullptr, "CancelApplication" },
{ 0x001E0084, nullptr, "StartLibraryApplet" },
{ 0x001F0084, StartLibraryApplet, "StartSystemApplet" },
{ 0x00200044, nullptr, "StartNewestHomeMenu" },
{ 0x00210000, nullptr, "OrderToCloseApplication" },
{ 0x00220040, nullptr, "PrepareToCloseApplication" },
{ 0x00230040, nullptr, "PrepareToJumpToApplication" },
{ 0x00240044, nullptr, "JumpToApplication" },
{ 0x002500C0, nullptr, "PrepareToCloseLibraryApplet" },
{ 0x00260000, nullptr, "PrepareToCloseSystemApplet" },
{ 0x00270044, nullptr, "CloseApplication" },
{ 0x00280044, nullptr, "CloseLibraryApplet" },
{ 0x00290044, nullptr, "CloseSystemApplet" },
{ 0x002A0000, nullptr, "OrderToCloseSystemApplet" },
{ 0x002B0000, nullptr, "PrepareToJumpToHomeMenu" },
{ 0x002C0044, nullptr, "JumpToHomeMenu" },
{ 0x002D0000, nullptr, "PrepareToLeaveHomeMenu" },
{ 0x002E0044, nullptr, "LeaveHomeMenu" },
{ 0x002F0040, nullptr, "PrepareToLeaveResidentApplet" },
{ 0x00300044, nullptr, "LeaveResidentApplet" },
{ 0x00310100, nullptr, "PrepareToDoApplicationJump" },
{ 0x00320084, nullptr, "DoApplicationJump" },
{ 0x00330000, nullptr, "GetProgramIdOnApplicationJump" },
{ 0x00340084, nullptr, "SendDeliverArg" },
{ 0x00350080, nullptr, "ReceiveDeliverArg" },
{ 0x00360040, nullptr, "LoadSysMenuArg" },
{ 0x00370042, nullptr, "StoreSysMenuArg" },
{ 0x00380040, nullptr, "PreloadResidentApplet" },
{ 0x00390040, nullptr, "PrepareToStartResidentApplet" },
{ 0x003A0044, nullptr, "StartResidentApplet" },
{ 0x003B0040, nullptr, "CancelLibraryApplet" },
{ 0x003C0042, nullptr, "SendDspSleep" },
{ 0x003D0042, nullptr, "SendDspWakeUp" },
{ 0x003E0080, nullptr, "ReplySleepQuery" },
{ 0x003F0040, nullptr, "ReplySleepNotificationComplete" },
{ 0x00400042, nullptr, "SendCaptureBufferInfo" },
{ 0x00410040, nullptr, "ReceiveCaptureBufferInfo" },
{ 0x00420080, nullptr, "SleepSystem" },
{ 0x00430040, NotifyToWait, "NotifyToWait" },
{ 0x00440000, GetSharedFont, "GetSharedFont" },
{ 0x00450040, nullptr, "GetWirelessRebootInfo" },
{ 0x00460104, nullptr, "Wrap" },
{ 0x00470104, nullptr, "Unwrap" },
{ 0x00480100, nullptr, "GetProgramInfo" },
{ 0x00490180, nullptr, "Reboot" },
{ 0x004A0040, nullptr, "GetCaptureInfo" },
{ 0x004B00C2, AppletUtility, "AppletUtility" },
{ 0x004C0000, nullptr, "SetFatalErrDispMode" },
{ 0x004D0080, nullptr, "GetAppletProgramInfo" },
{ 0x004E0000, nullptr, "HardwareResetAsync" },
{ 0x004F0080, SetAppCpuTimeLimit, "SetAppCpuTimeLimit" },
{ 0x00500040, GetAppCpuTimeLimit, "GetAppCpuTimeLimit" },
{ 0x00510080, nullptr, "GetStartupArgument" },
{ 0x00520104, nullptr, "Wrap1" },
{ 0x00530104, nullptr, "Unwrap1" },
{ 0x00580002, nullptr, "GetProgramID" },
{ 0x01010000, nullptr, "CheckNew3DSApp" },
{ 0x01020000, nullptr, "CheckNew3DS" },
{ 0x01040000, nullptr, "IsStandardMemoryLayout"},
{ 0x01050100, nullptr, "IsTitleAllowed"}
};
APT_A_Interface::APT_A_Interface() {

View file

@ -39,7 +39,7 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x001C0000, nullptr, "WakeupApplication"},
{0x001D0000, nullptr, "CancelApplication"},
{0x001E0084, nullptr, "StartLibraryApplet"},
{0x001F0084, nullptr, "StartSystemApplet"},
{0x001F0084, StartLibraryApplet, "StartSystemApplet"},
{0x00200044, nullptr, "StartNewestHomeMenu"},
{0x00210000, nullptr, "OrderToCloseApplication"},
{0x00220040, nullptr, "PrepareToCloseApplication"},
@ -87,14 +87,16 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x004C0000, nullptr, "SetFatalErrDispMode"},
{0x004D0080, nullptr, "GetAppletProgramInfo"},
{0x004E0000, nullptr, "HardwareResetAsync"},
{0x004F0080, nullptr, "SetApplicationCpuTimeLimit"},
{0x00500040, nullptr, "GetApplicationCpuTimeLimit"},
{0x004F0080, SetAppCpuTimeLimit, "SetAppCpuTimeLimit" },
{0x00500040, GetAppCpuTimeLimit, "GetAppCpuTimeLimit" },
{0x00510080, nullptr, "GetStartupArgument"},
{0x00520104, nullptr, "Wrap1"},
{0x00530104, nullptr, "Unwrap1"},
{0x00580002, nullptr, "GetProgramID"},
{0x01010000, nullptr, "CheckNew3DSApp"},
{0x01020000, nullptr, "CheckNew3DS"}
{0x01020000, nullptr, "CheckNew3DS"},
{0x01040000, nullptr, "IsStandardMemoryLayout" },
{0x01050100, nullptr, "IsTitleAllowed" }
};
APT_S_Interface::APT_S_Interface() {

View file

@ -94,7 +94,9 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00530104, nullptr, "Unwrap1"},
{0x00580002, nullptr, "GetProgramID"},
{0x01010000, nullptr, "CheckNew3DSApp"},
{0x01020000, nullptr, "CheckNew3DS"}
{0x01020000, nullptr, "CheckNew3DS"},
{0x01040000, nullptr, "IsStandardMemoryLayout" },
{0x01050100, nullptr, "IsTitleAllowed" }
};
APT_U_Interface::APT_U_Interface() {

View file

@ -28,6 +28,22 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00100040, nullptr, "unknown_input2"},
};
enum Encoding
{
ENCODING_PCM8=0,
ENCODING_PCM16,
ENCODING_PCM8_SIGNED,
ENCODING_PCM16_SIGNED
};
enum SampleRate
{
SAMPLE_RATE_32730=0,
SAMPLE_RATE_16360,
SAMPLE_RATE_10910,
SAMPLE_RATE_8180
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class

View file

@ -35,6 +35,56 @@ const Interface::FunctionInfo FunctionTable[] = {
{0x00170000, nullptr, "ClearHalfAwakeMacFilter"},
};
enum ExclusiveState
{
EXCLUSIVE_STATE_NONE=0,
EXCLUSIVE_STATE_INFRASTRUCTURE,
EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS,
EXCLUSIVE_STATE_STREETPASS,
EXCLUSIVE_STATE_STREETPASS_DATA
};
enum Daemon
{
DAEMON_CEC=0,
DAEMON_BOSS,
DAEMON_NIM,
DAEMON_FRIENDS
};
enum DaemonMask
{
DAEMON_MASK_CEC = (1 << DAEMON_CEC),
DAEMON_MASK_BOSS = (1 << DAEMON_BOSS),
DAEMON_MASK_NIM = (1 << DAEMON_NIM),
DAEMON_MASK_FRIENDS = (1 << DAEMON_FRIENDS)
};
enum DaemonStatus
{
DAEMON_STATUS_BUSY=0,
DAEMON_STATUS_IDLE,
DAEMON_STATUS_SUSPENDING,
DAEMON_STATUS_SUSPENDED
};
enum State
{
STATE_INITIAL=0,
STATE_SUSPENDED,
STATE_INFRASTRUCTURE_CONNECTING,
STATE_INFRASTRUCTURE_CONNECTED,
STATE_INFRASTRUCTURE_WORKING,
STATE_INFRASTRUCTURE_SUSPENDING,
STATE_INFRASTRUCTURE_FORCE_SUSPENDING,
STATE_INFRASTRUCTURE_DISCONNECTING,
STATE_INFRASTRUCTURE_FORCE_DISCONNECTING,
STATE_CEC_WORKING,
STATE_CEC_FORCE_SUSPENDING,
STATE_CEC_SUSPENDING
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class

View file

@ -0,0 +1,25 @@
// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/hle/service/pm_dbg.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace PM_APP
namespace PM_DBG {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010140,nullptr, "LaunchAppDebug"},
{0x00020140,nullptr, "LaunchApp"},
{0x00030000,nullptr, "RunQueuedProcess"}
};
////////////////////////////////////////////////////////////////////////////////////////////////////
// Interface class
Interface::Interface() {
Register(FunctionTable);
}
} // namespace

View file

@ -0,0 +1,23 @@
// Copyright 2014 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include "core/hle/service/service.h"
////////////////////////////////////////////////////////////////////////////////////////////////////
// Namespace PM_DBG
namespace PM_DBG {
class Interface : public Service::Interface {
public:
Interface();
std::string GetPortName() const override {
return "pm:dbg";
}
};
} // namespace

View file

@ -21,7 +21,7 @@ static void Initialize(Service::Interface* self) {
cmd_buff[1] = 0; // No error
}
static void GetProcSemaphore(Service::Interface* self) {
static void EnableNotification(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
// TODO(bunnei): Change to a semaphore once these have been implemented
@ -51,14 +51,19 @@ static void GetServiceHandle(Service::Interface* self) {
const Interface::FunctionInfo FunctionTable[] = {
{0x00010002, Initialize, "Initialize"},
{0x00020000, GetProcSemaphore, "GetProcSemaphore"},
{0x00020000, EnableNotification, "EnableNotification"},
{0x00030100, nullptr, "RegisterService"},
{0x000400C0, nullptr, "UnregisterService"},
{0x00050100, GetServiceHandle, "GetServiceHandle"},
{0x000600C2, nullptr, "RegisterHandle"},
{0x000700C0, nullptr, "UnregisterPort"},
{0x00080100, nullptr, "GetPort"},
{0x00090040, nullptr, "Subscribe"},
{0x000A0040, nullptr, "Unsubscribe"},
{0x000B0000, nullptr, "ReceiveNotification"},
{0x000C0080, nullptr, "PublishToSubscriber"},
{0x000D0040, nullptr, "PublishAndGetSubscriber"},
{0x000E00C0, nullptr, "IsServiceRegistered"}
};
////////////////////////////////////////////////////////////////////////////////////////////////////

View file

@ -20,6 +20,12 @@ struct PageInfo {
u32 flags;
};
enum PageFlags
{
LOCKED=0,
CHANGED
};
enum ResetType {
RESETTYPE_ONESHOT,
RESETTYPE_STICKY,