Changes

Jump to navigation Jump to search
4,441 bytes added ,  09:15, 20 November 2021
no edit summary
Line 1: Line 1:  +
Much of this page is wrong because much of the PAF is written in C++.
 +
 +
But it works as a "function".
 +
 
== Module ==
 
== Module ==
   Line 9: Line 13:  
This way we can restore initial class structure.
 
This way we can restore initial class structure.
   −
=== Known NIDs ===
   
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Version !! Name !! World !! Privilege !! NID
+
! Version !! Name !! World !! Privilege
 
|-
 
|-
| 1.69 || ScePaf || Non-secure || User || 0x614CFD65
+
| 1.69-3.73 || ScePaf || Non-secure || User
|-
  −
| 3.60 || ScePaf || Non-secure || User || 0xCD679177
   
|}
 
|}
   Line 45: Line 46:  
| 3.60 || ScePafWidget || Non-secure || User || 0x073F8C68
 
| 3.60 || ScePafWidget || Non-secure || User || 0x073F8C68
 
|}
 
|}
 +
 +
== Types ==
 +
 +
<source lang="C">
 +
typedef struct ScePafSha1Context { // size is 0x68
 +
uint32_t h[5];
 +
char unk[0x54];
 +
} ScePafSha1Context;
 +
 +
typedef struct ScePafDateTime {
 +
  SceDateTime data;
 +
  int data_0x10;
 +
  int data_0x14;
 +
} ScePafDateTime;
 +
 +
typedef struct ScePafHeapContext { // size is 0x60
 +
void *vtable;
 +
void *heap;
 +
void *membase;
 +
SceSize size;
 +
char name[0x20];
 +
SceBool is_import_membase;
 +
char data_0x30[3];
 +
int data_0x34;
 +
SceKernelLwMutexWork lw_mtx;
 +
SceUID memblk_id;
 +
int data_0x5C;              // ex:1
 +
} ScePafHeapContext;
 +
 +
typedef struct ScePafHeapOpt { // size is 0x14
 +
int a1;
 +
int a2;
 +
char a3[4];
 +
int a4;
 +
int a5;
 +
} ScePafHeapOpt;
 +
</source>
 +
 +
== ScePafMisc ==
 +
 +
=== scePafGetCurrentClockLocalTime ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x96345146
 +
|}
 +
 +
<source lang="C">int scePafGetCurrentClockLocalTime(ScePafDateTime *data);</source>
 +
 +
=== scePafCreateHeap ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xA2B0BF4D
 +
|}
 +
 +
<source lang="C">void scePafCreateHeap(ScePafHeapContext *context, void *membase, SceSize size, const char *name, ScePafHeapOpt *opt);</source>
 +
 +
=== scePafDeleteHeap ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x25238A3A
 +
|}
 +
 +
<source lang="C">void scePafDeleteHeap(ScePafHeapContext *context);</source>
 +
 +
=== scePafMallocWithContext ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x89A1CE78
 +
|}
 +
 +
<source lang="C">void *scePafMallocWithContext(ScePafHeapContext *context, SceSize len);</source>
 +
 +
=== scePafFreeWithContext ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xCE97B579
 +
|}
 +
 +
<source lang="C">void scePafFreeWithContext(ScePafHeapContext *context, void *ptr);</source>
 +
 +
=== scePafMallocAlignWithContext ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x04716F15
 +
|}
 +
 +
<source lang="C">void *scePafMallocAlignWithContext(ScePafHeapContext *context, SceUInt32 align, SceSize len);</source>
 +
 +
=== scePafReallocWithContext ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x74DB7F5D
 +
|}
 +
 +
<source lang="C">void *scePafReallocWithContext(ScePafHeapContext *context, void *ptr, SceSize len);</source>
 +
 +
=== scePafSha1Init ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xB38C53C0
 +
|}
 +
 +
<source lang="C">int scePafSha1Init(ScePafSha1Context *context);</source>
 +
 +
=== scePafSha1Update ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xE6BB459E
 +
|}
 +
 +
<source lang="C">int scePafSha1Update(ScePafSha1Context *context, const void *data, SceSize length);</source>
 +
 +
=== scePafSha1Result ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xB3BF59FC
 +
|}
 +
 +
<source lang="C">int scePafSha1Result(ScePafSha1Context *context, void *dst);</source>
    
== ScePafStdc ==
 
== ScePafStdc ==
Line 57: Line 197:     
<source lang="C">void *scePafDefaultHeapInfo(void);</source>
 
<source lang="C">void *scePafDefaultHeapInfo(void);</source>
 +
 +
=== delete ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x347AFDD9
 +
|}
 +
 +
<source lang="C">void delete(void *ptr);</source>
 +
 +
=== sce_paf_memalign ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xAA9952E0
 +
|}
 +
 +
<source lang="C">void *sce_paf_memalign(SceSize align, SceSize length);</source>
 +
 +
== ScePafResource ==
 +
 +
=== scePafResourceGetIdByName ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x5F05DE68
 +
|}
 +
 +
<source lang="C">unsigned int scePafResourceGetIdByName(void *a1, void *a2);</source>
    
== ScePafWidget ==
 
== ScePafWidget ==
Line 191: Line 363:     
<source lang="C">const char *scePafWidgetTypeText2(void);</source>
 
<source lang="C">const char *scePafWidgetTypeText2(void);</source>
 +
 +
=== scePafWidgetTypeBusyIndicator1 ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xDBCC58BB
 +
|}
 +
 +
<source lang="C">const char *scePafWidgetTypeBusyIndicator1(void);</source>
 +
 +
=== scePafWidgetTypeBusyIndicator2 ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x1D1F5BF7
 +
|}
 +
 +
same to scePafWidgetTypeBusyIndicator1
 +
 +
<source lang="C">const char *scePafWidgetTypeBusyIndicator2(void);</source>
 +
 +
=== scePafWidgetCmpTypeBase ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x8EDFDE19
 +
|}
 +
 +
<source lang="C">int scePafWidgetCmpTypeBase(void *pWidget, const char *type);</source>
 +
 +
=== scePafWidgetCmpTypeBusyIndicator ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0xB954B379
 +
|}
 +
 +
<source lang="C">int scePafWidgetCmpTypeBusyIndicator(void *pWidget, const char *type);</source>
    
=== scePafWidgetSetFontSize ===
 
=== scePafWidgetSetFontSize ===
Line 212: Line 426:  
</source>
 
</source>
   −
=== scePafWidgetAddWidget ===
+
=== scePafWidgetSetPosition ===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 219: Line 433:  
| 3.60 || 0xE29AB31F
 
| 3.60 || 0xE29AB31F
 
|}
 
|}
 +
 +
Temp name was scePafWidgetAddWidget.
    
<source lang="C">
 
<source lang="C">
Line 239: Line 455:  
   float x;      // Distance from display center
 
   float x;      // Distance from display center
 
   float y;      // Distance from display center
 
   float y;      // Distance from display center
   int unk_0x04; // set 0
+
   float z;
   int unk_0x08; // set 0
+
   int unk_0x0C; // set 0
 
} ScePafWidgetPos;
 
} ScePafWidgetPos;
   −
int scePafWidgetAddWidget(void *pWidget, ScePafWidgetPos *pWidgetPos, float a3, int a4, int a5, int a6, int a7, int a8);
+
int scePafWidgetSetPosition(void *pWidget, ScePafWidgetPos *pWidgetPos, float a3, int a4, int a5, int a6, int a7, int a8);
    
Example of use
 
Example of use
    
ScePafWidgetPos widget_pos;
 
ScePafWidgetPos widget_pos;
widget_pos.x        = x_pos - (960.0f / 2.0f);
+
widget_pos.x        = x_pos - (960.0f / 2.0f);
widget_pos.y        = (544.0f / 2.0f) - y_pos;
+
widget_pos.y        = (544.0f / 2.0f) - y_pos;
widget_pos.unk_0x04 = 0;
+
widget_pos.z        = 0.0f;
 
widget_pos.unk_0x08 = 0;
 
widget_pos.unk_0x08 = 0;
scePafWidgetAddWidget(p_widget, &widget_pos, 0.0f, 0, 0x10000, 0, 0, 0);
+
scePafWidgetSetPosition(p_widget, &widget_pos, 0.0f, 0, 0x10000, 0, 0, 0);
 
</source>
 
</source>
   −
=== ScePafWidget_9D304F4A ===
+
=== scePafWidgetSearchWidgetById ===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
Line 266: Line 482:     
<source lang="C">
 
<source lang="C">
typedef struct ScePafWidgetAddParam {
+
typedef struct ScePafWidgetSearchParam {
 
void *unk_0;
 
void *unk_0;
 
unsigned int unk_4;
 
unsigned int unk_4;
 
void *unk_8;
 
void *unk_8;
 
unsigned int id;
 
unsigned int id;
} ScePafWidgetAddParam;
+
} ScePafWidgetSearchParam;
   −
void *ScePafWidget_9D304F4A(void *a1, ScePafWidgetAddParam *a2, int a3);
+
void *scePafWidgetSearchWidgetById(void *a1, ScePafWidgetSearchParam *a2, int a3);
 
</source>
 
</source>
   −
[[Category:Modules]]
+
=== scePafWidgetShowBusyIndicator ===
[[Category:Userland]]
+
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x04310E14
 +
|}
 +
 
 +
<source lang="C">void scePafWidgetShowBusyIndicator(void *pWidget);</source>
 +
 
 +
=== scePafWidgetHideBusyIndicator ===
 +
{| class="wikitable"
 +
|-
 +
! Version !! NID
 +
|-
 +
| 3.60 || 0x73D27A1B
 +
|}
 +
 
 +
<source lang="C">void scePafWidgetHideBusyIndicator(void *pWidget);</source>
 +
 
 +
[[Category:Modules]][[Category:Usermode]]

Navigation menu