SceDeci4pDfMgr: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
No edit summary
(Add official names found in 0.940, mark NIDs as valid down to 0.940, refactoring)
Line 16: Line 16:
! Version !! Name !! World !! Visibility !! NID
! Version !! Name !! World !! Visibility !! NID
|-
|-
| 3.65 || [[SceDeci4pDfMgr#SceDeci4pDfMgrForDebugger|SceDeci4pDfMgrForDebugger]] || Non-secure || Kernel || 0x849E3DF5
| 0.940-3.65 || [[SceDeci4pDfMgr#SceDeci4pDfMgrForDebugger|SceDeci4pDfMgrForDebugger]] || Non-secure || Kernel || 0x849E3DF5
|}
|}


Line 22: Line 22:


<source lang="C">
<source lang="C">
typedef SceInt32 SceDfMgr_id; //ID returned by sceDfMgrOpen
typedef int (* SceDfMgrOpen_handler)(int a1, void *a2, void *args);
typedef struct SceDfMgrOpen_param { //Size is 0x1C in 0.940, 0x38 on 3.60
SceSize size;
uint32_t unk4;  // some id
uint32_t unk8;
uint32_t unkC;  // ex: 0x1000004
uint32_t unk10;  // ex: 0x20001
uint16_t unk14;  // ex: 0
uint16_t unk16;  // ex: 1
char name[0x20];
} SceDfMgrOpen_param;


// sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct *pInfoInt = (sceDeci4pDfMgrRegisterSysEventForDebugger_internal *)(data_seg + 0x14); // max entries is 32
// sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct *pInfoInt = (sceDeci4pDfMgrRegisterSysEventForDebugger_internal *)(data_seg + 0x14); // max entries is 32
typedef struct sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct { // size is 0x54
typedef struct sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct { // size is 0x54
sceDeci4pDfMgrRegisterSysEventForDebugger_handler handler;
SceDfMgrOpen_handler handler;
sceDeci4pDfMgrRegisterSysEventForDebugger_struct info;
SceDfMgrOpen_param info;
int data_0x3C;
int data_0x3C;
int data_0x40;
int data_0x40;
Line 38: Line 52:
== SceDeci4pDfMgrForDebugger ==
== SceDeci4pDfMgrForDebugger ==


=== SceDeci4pDfMgrForDebugger_1CC6ED4B ===
=== sceDfMgrCloseForDebugger ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0x1CC6ED4B
| 0.940-3.60 || 0x1CC6ED4B
|}
|}


<source lang="C">int SceDeci4pDfMgrForDebugger_1CC6ED4B(int a1);</source>
<source lang="C">SceInt32 sceDfMgrCloseForDebugger(SceDfMgr_id id);</source>


=== sceDeci4pDfMgrRegisterSysEventForDebugger ===
=== sceDfMgrOpenForDebugger ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0x529979FB
| 0.940-3.60 || 0x529979FB
|}
|}
This is a guessed name.


Handler is called on reboot/standby/suspend/SceShell process create.
Handler is called on reboot/standby/suspend/SceShell process create.


Up to 32 handlers can be registered and their IDs should not be covered (with exceptions).
Up to 32 handles can be opened at a time, and (besides some exceptions) there should be no duplicate IDs (<code>unk4</code> of <code>a2</code>).


<source lang="C">
<source lang="C">
typedef int (* sceDeci4pDfMgrRegisterSysEventForDebugger_handler)(int a1, void *a2, void *args);
// Returns an id (not UID) on success, < 0 on error.
 
// 0x80080004 -> no entry remaining (too many Open)
typedef struct sceDeci4pDfMgrRegisterSysEventForDebugger_struct { // size is 0x38
SceDfMgr_id sceDfMgrOpenForDebugger(SceDfMgrOpen_handler handler, SceDfMgrOpen_param *a2, void *args);
SceSize size;
uint32_t unk4;  // some id
uint32_t unk8;
uint32_t unkC;  // ex: 0x1000004
uint32_t unk10;  // ex: 0x20001
uint16_t unk14;  // ex: 0
uint16_t unk16;  // ex: 1
char name[0x20];
} sceDeci4pDfMgrRegisterSysEventForDebugger_struct;
 
// return id on success, < 0 on error.
int sceDeci4pDfMgrRegisterSysEventForDebugger(sceDeci4pDfMgrRegisterSysEventForDebugger_handler handler, sceDeci4pDfMgrRegisterSysEventForDebugger_struct *a2, void *args);
</source>
</source>


=== SceDeci4pDfMgrForDebugger_5F2C7E11 ===
=== sceDfMgrRecvForDebugger ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0x5F2C7E11
| 0.940-3.60 || 0x5F2C7E11
|}
|}


<source lang="C">int SceDeci4pDfMgrForDebugger_5F2C7E11(int a1, int a2, int a3);</source>
<source lang="C">
// Returns received size on success, < 0 on error.
SceSSize sceDfMgrRecvForDebugger(SceDfMgr_id id, void* buf, SceSize size);
</source>


=== SceDeci4pDfMgrForDebugger_6D26CC56 ===
=== SceDeci4pDfMgrForDebugger_6D26CC56 ===
Line 95: Line 98:
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0x6D26CC56
| 0.940-3.60 || 0x6D26CC56
|}
|}


<source lang="C">void SceDeci4pDfMgrForDebugger_6D26CC56(void *a1, int a2);</source>
Writes <code>val</code> as a 3-byte unsigned integer to <code>ptr</code>.
<source lang="C">void SceDeci4pDfMgrForDebugger_6D26CC56(void *ptr, SceUInt32 val);</source>


=== SceDeci4pDfMgrForDebugger_7EAE4FA2 ===
=== sceDfMgrSendSpaceForDebugger ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0x7EAE4FA2
| 0.940-3.60 || 0x7EAE4FA2
|}
|}


<source lang="C">int SceDeci4pDfMgrForDebugger_7EAE4FA2(int a1);</source>
<source lang="C">SceInt32 sceDfMgrSendSpaceForDebugger(SceDfMgr_id id);</source>


=== SceDeci4pDfMgrForDebugger_BADEF855 ===
=== sceDfMgrReqSendForDebugger ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0xBADEF855
| 0.940-3.60 || 0xBADEF855
|}
|}


<source lang="C">
<source lang="C">
// @param[in] id - id received in the return value of sceDeci4pDfMgrRegisterSysEventForDebugger
SceInt32 sceDfMgrReqSendForDebugger(SceDfMgr_id id);
int SceDeci4pDfMgrForDebugger_BADEF855(int id);
</source>
</source>


=== SceDeci4pDfMgrForDebugger_C3390112 ===
=== sceDfMgrSendForDebugger ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0xC3390112
| 0.940-3.60 || 0xC3390112
|}
|}


<source lang="C">int SceDeci4pDfMgrForDebugger_C3390112(int a1, int a2);</source>
<source lang="C">
// Returns sent size on success, < 0 on error.
SceSSize sceDfMgrSendForDebugger(SceDfMgr_id id, const void* buf, SceSize size);
</source>


=== SceDeci4pDfMgrForDebugger_CACAB5F9 ===
=== SceDeci4pDfMgrForDebugger_CACAB5F9 ===
Line 138: Line 144:
! Version !! NID
! Version !! NID
|-
|-
| 1.69-3.60 || 0xCACAB5F9
| 0.940-3.60 || 0xCACAB5F9
|}
|}


<source lang="C">int SceDeci4pDfMgrForDebugger_CACAB5F9(void *a1);</source>
Reads value at <code>ptr</code> as a 3-byte unsigned integer.
<source lang="C">SceUInt32 SceDeci4pDfMgrForDebugger_CACAB5F9(void *ptr);</source>


=== SceDeci4pDfMgrForDebugger_D0CCF840 ===
=== SceDeci4pDfMgrForDebugger_D0CCF840 ===
Line 147: Line 154:
|-
|-
! Version !! NID
! Version !! NID
|-
| 0.940-0.995 || Not present
|-
|-
| 3.60 || 0xD0CCF840
| 3.60 || 0xD0CCF840

Revision as of 17:06, 11 January 2022

Module

Version World Privilege
3.60-3.65 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
0.940-3.65 SceDeci4pDfMgrForDebugger Non-secure Kernel 0x849E3DF5

Types

typedef SceInt32 SceDfMgr_id; //ID returned by sceDfMgrOpen

typedef int (* SceDfMgrOpen_handler)(int a1, void *a2, void *args);

typedef struct SceDfMgrOpen_param { //Size is 0x1C in 0.940, 0x38 on 3.60
	SceSize size;
	uint32_t unk4;   // some id
	uint32_t unk8;
	uint32_t unkC;   // ex: 0x1000004
	uint32_t unk10;  // ex: 0x20001
	uint16_t unk14;  // ex: 0
	uint16_t unk16;  // ex: 1
	char name[0x20];
} SceDfMgrOpen_param;

// sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct *pInfoInt = (sceDeci4pDfMgrRegisterSysEventForDebugger_internal *)(data_seg + 0x14); // max entries is 32
typedef struct sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct { // size is 0x54
	SceDfMgrOpen_handler handler;
	SceDfMgrOpen_param info;
	int data_0x3C;
	int data_0x40;
	int data_0x44;
	int data_0x48;
	int data_0x4C;
	int data_0x50;
} sceDeci4pDfMgrRegisterSysEventForDebugger_internal_struct;

SceDeci4pDfMgrForDebugger

sceDfMgrCloseForDebugger

Version NID
0.940-3.60 0x1CC6ED4B
SceInt32 sceDfMgrCloseForDebugger(SceDfMgr_id id);

sceDfMgrOpenForDebugger

Version NID
0.940-3.60 0x529979FB

Handler is called on reboot/standby/suspend/SceShell process create.

Up to 32 handles can be opened at a time, and (besides some exceptions) there should be no duplicate IDs (unk4 of a2).

// Returns an id (not UID) on success, < 0 on error.
// 0x80080004 -> no entry remaining (too many Open)
SceDfMgr_id sceDfMgrOpenForDebugger(SceDfMgrOpen_handler handler, SceDfMgrOpen_param *a2, void *args);

sceDfMgrRecvForDebugger

Version NID
0.940-3.60 0x5F2C7E11
// Returns received size on success, < 0 on error.
SceSSize sceDfMgrRecvForDebugger(SceDfMgr_id id, void* buf, SceSize size);

SceDeci4pDfMgrForDebugger_6D26CC56

Version NID
0.940-3.60 0x6D26CC56

Writes val as a 3-byte unsigned integer to ptr.

void SceDeci4pDfMgrForDebugger_6D26CC56(void *ptr, SceUInt32 val);

sceDfMgrSendSpaceForDebugger

Version NID
0.940-3.60 0x7EAE4FA2
SceInt32 sceDfMgrSendSpaceForDebugger(SceDfMgr_id id);

sceDfMgrReqSendForDebugger

Version NID
0.940-3.60 0xBADEF855
SceInt32 sceDfMgrReqSendForDebugger(SceDfMgr_id id);

sceDfMgrSendForDebugger

Version NID
0.940-3.60 0xC3390112
// Returns sent size on success, < 0 on error.
SceSSize sceDfMgrSendForDebugger(SceDfMgr_id id, const void* buf, SceSize size);

SceDeci4pDfMgrForDebugger_CACAB5F9

Version NID
0.940-3.60 0xCACAB5F9

Reads value at ptr as a 3-byte unsigned integer.

SceUInt32 SceDeci4pDfMgrForDebugger_CACAB5F9(void *ptr);

SceDeci4pDfMgrForDebugger_D0CCF840

Version NID
0.940-0.995 Not present
3.60 0xD0CCF840