Skip to content

Commit aeb9951

Browse files
authored
Merge pull request #265 from joel16/syscon
syscon: Use known/documented function names
2 parents 3826a1e + 8188e46 commit aeb9951

File tree

2 files changed

+45
-30
lines changed

2 files changed

+45
-30
lines changed

src/kernel/pspsyscon.h

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,56 +25,71 @@ extern "C" {
2525
/**@{*/
2626

2727
/**
28-
* Force the PSP to go into standby
28+
* Force the PSP to go into standby.
2929
*/
3030
void sceSysconPowerStandby(void);
3131

3232
/**
33-
* Reset the PSP
33+
* Reset the PSP.
3434
*
35-
* @param unk1 - Unknown, pass 1
36-
* @param unk2 - Unknown, pass 1
35+
* @param unk1 - Unknown, pass 1.
36+
* @param unk2 - Unknown, pass 1.
3737
*/
3838
void sceSysconResetDevice(int unk1, int unk2);
3939

4040
#define SCE_LED_POWER 1
4141
#define LED_ON 1
4242
#define LED_OFF 0
4343
/**
44-
* Control an LED
44+
* Control an LED.
4545
*
46-
* @param SceLED - The led to toggle (only SCE_LED_POWER)
47-
* @param state - Whether to turn on or off
46+
* @param SceLED - The led to toggle (only SCE_LED_POWER).
47+
* @param state - Whether to turn on or off.
4848
*/
4949
int sceSysconCtrlLED(int SceLED, int state);
5050

5151
/**
52-
* Control the remote control power
52+
* Control the remote control power.
5353
*
54-
* @param power - 1 is on, 0 is off
54+
* @param power - 1 is on, 0 is off.
5555
*
56-
* @return < 0 on error
56+
* @return < 0 on error.
5757
*/
5858
int sceSysconCtrlHRPower(int power);
5959

60+
/**
61+
* Get the headphone connection status.
62+
* @return 1 if the headphone is connected, 0 if the headphone is disconnected.
63+
*/
64+
s8 sceSysconGetHPConnect(void);
6065

61-
int sceSysconGetHPConnect(void);
66+
int sceSysconSetHPConnectCallback(void (*)(int), int unk0);
6267

63-
int sceSysconSetHPConnectCallback( void (*)(int), int unk0 );
68+
int sceSysconSetHRPowerCallback(void (*)(int), int unk0);
6469

65-
int sceSysconSetHRPowerCallback( void (*)(int), int unk0 );
70+
/**
71+
* Get the PSP's Pommel version.
72+
* @param version - A pointer to an int to receive the Pommel version into.
73+
*/
74+
int sceSysconGetPommelVersion(int* version);
75+
76+
/**
77+
* Get the PSP's Baryon version.
78+
* @param version - A pointer to an int to receive the Baryon version into.
79+
*/
80+
int sceSysconGetBaryonVersion(int* version);
6681

6782
/**
68-
* Get the PSP's Pommel version
69-
* @param version - A pointer to an int to receive the Pommel version into
83+
* Get the PSP's Polestar version.
84+
* @param version - A pointer to an int to receive the Polestar version into.
7085
*/
71-
int sceSysconGetPommelVersion( int* version );
86+
int sceSysconGetPolestarVersion(int* version);
7287

7388
/**
74-
* Get the PSP's Baryon version
75-
* @param version - A pointer to an int to receive the Baryon version into
89+
* Get the baryon timestamp string.
90+
* @param timeStamp A pointer to a string at least 12 bytes long.
7691
*/
77-
int sceSysconGetBaryonVersion( int* version );
92+
int sceSysconGetTimeStamp(s8 *timeStamp);
7893

7994
/**@}*/
8095

src/kernel/sceSyscon_driver.S

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
IMPORT_FUNC "sceSyscon_driver",0x56931095,sceSysconResume
1919
#endif
2020
#ifdef F_sceSyscon_driver_0005
21-
IMPORT_FUNC "sceSyscon_driver",0x5EE92F3C,sceSyscon_driver_5EE92F3C
21+
IMPORT_FUNC "sceSyscon_driver",0x5EE92F3C,sceSysconSetDebugHandlers
2222
#endif
2323
#ifdef F_sceSyscon_driver_0006
2424
IMPORT_FUNC "sceSyscon_driver",0x5FF1D610,sceSyscon_driver_5FF1D610
@@ -66,7 +66,7 @@
6666
IMPORT_FUNC "sceSyscon_driver",0xF350F666,sceSysconCmdSync
6767
#endif
6868
#ifdef F_sceSyscon_driver_0021
69-
IMPORT_FUNC "sceSyscon_driver",0x86D4CAD8,sceSyscon_driver_86D4CAD8
69+
IMPORT_FUNC "sceSyscon_driver",0x86D4CAD8,sceSysconGetBaryonStatus
7070
#endif
7171
#ifdef F_sceSyscon_driver_0022
7272
IMPORT_FUNC "sceSyscon_driver",0x32CFD20F,sceSysconIsLowBattery
@@ -132,7 +132,7 @@
132132
IMPORT_FUNC "sceSyscon_driver",0x7EC5A957,sceSysconGetBaryonVersion
133133
#endif
134134
#ifdef F_sceSyscon_driver_0043
135-
IMPORT_FUNC "sceSyscon_driver",0x7BCC5EAE,sceSyscon_driver_7BCC5EAE
135+
IMPORT_FUNC "sceSyscon_driver",0x7BCC5EAE,sceSysconGetTimeStamp
136136
#endif
137137
#ifdef F_sceSyscon_driver_0044
138138
IMPORT_FUNC "sceSyscon_driver",0x3B657A27,sceSyscon_driver_3B657A27
@@ -159,10 +159,10 @@
159159
IMPORT_FUNC "sceSyscon_driver",0x6C911742,sceSysconWriteAlarm
160160
#endif
161161
#ifdef F_sceSyscon_driver_0052
162-
IMPORT_FUNC "sceSyscon_driver",0x65EB6096,sceSyscon_driver_65EB6096
162+
IMPORT_FUNC "sceSyscon_driver",0x65EB6096,sceSysconWriteScratchPad
163163
#endif
164164
#ifdef F_sceSyscon_driver_0053
165-
IMPORT_FUNC "sceSyscon_driver",0xEB277C88,sceSyscon_driver_EB277C88
165+
IMPORT_FUNC "sceSyscon_driver",0xEB277C88,sceSysconReadScratchPad
166166
#endif
167167
#ifdef F_sceSyscon_driver_0054
168168
IMPORT_FUNC "sceSyscon_driver",0x992C22C2,sceSysconSendSetParam
@@ -174,7 +174,7 @@
174174
IMPORT_FUNC "sceSyscon_driver",0x882F0AAB,sceSyscon_driver_882F0AAB
175175
#endif
176176
#ifdef F_sceSyscon_driver_0057
177-
IMPORT_FUNC "sceSyscon_driver",0x2EE82492,sceSyscon_driver_2EE82492
177+
IMPORT_FUNC "sceSyscon_driver",0x2EE82492,sceSysconCtrlTachyonWDT
178178
#endif
179179
#ifdef F_sceSyscon_driver_0058
180180
IMPORT_FUNC "sceSyscon_driver",0x8CBC7987,sceSysconResetDevice
@@ -195,7 +195,7 @@
195195
IMPORT_FUNC "sceSyscon_driver",0xE7E87741,sceSysconGetPommelVersion
196196
#endif
197197
#ifdef F_sceSyscon_driver_0064
198-
IMPORT_FUNC "sceSyscon_driver",0xFB148FB6,sceSyscon_driver_FB148FB6
198+
IMPORT_FUNC "sceSyscon_driver",0xFB148FB6,sceSysconGetPolestarVersion
199199
#endif
200200
#ifdef F_sceSyscon_driver_0065
201201
IMPORT_FUNC "sceSyscon_driver",0x01677F91,sceSyscon_driver_01677F91
@@ -210,10 +210,10 @@
210210
IMPORT_FUNC "sceSyscon_driver",0x18BFBE65,sceSysconCtrlLED
211211
#endif
212212
#ifdef F_sceSyscon_driver_0069
213-
IMPORT_FUNC "sceSyscon_driver",0xD1B501E8,sceSyscon_driver_D1B501E8
213+
IMPORT_FUNC "sceSyscon_driver",0xD1B501E8,sceSysconWritePommelReg
214214
#endif
215215
#ifdef F_sceSyscon_driver_0070
216-
IMPORT_FUNC "sceSyscon_driver",0x3DE38336,sceSyscon_driver_3DE38336
216+
IMPORT_FUNC "sceSyscon_driver",0x3DE38336,sceSysconReadPommelReg
217217
#endif
218218
#ifdef F_sceSyscon_driver_0071
219219
IMPORT_FUNC "sceSyscon_driver",0x2B9E6A06,sceSysconGetPowerError
@@ -240,10 +240,10 @@
240240
IMPORT_FUNC "sceSyscon_driver",0x9478F399,sceSyscon_driver_9478F399
241241
#endif
242242
#ifdef F_sceSyscon_driver_0079
243-
IMPORT_FUNC "sceSyscon_driver",0x806D4D6C,sceSyscon_driver_806D4D6C
243+
IMPORT_FUNC "sceSyscon_driver",0x806D4D6C,sceSysconWritePolestarReg
244244
#endif
245245
#ifdef F_sceSyscon_driver_0080
246-
IMPORT_FUNC "sceSyscon_driver",0xD8471760,sceSyscon_driver_D8471760
246+
IMPORT_FUNC "sceSyscon_driver",0xD8471760,sceSysconReadPolestarReg
247247
#endif
248248
#ifdef F_sceSyscon_driver_0081
249249
IMPORT_FUNC "sceSyscon_driver",0xEAB13FBE,sceSyscon_driver_EAB13FBE

0 commit comments

Comments
 (0)