Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/kernel/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SYSREG_OBJS = sceSysreg_driver_0000.o sceSysreg_driver_0001.o sceSysreg_driver_0

UTILS_OBJS = UtilsForKernel_0000.o UtilsForKernel_0001.o UtilsForKernel_0002.o UtilsForKernel_0003.o UtilsForKernel_0004.o UtilsForKernel_0005.o UtilsForKernel_0006.o UtilsForKernel_0007.o UtilsForKernel_0008.o UtilsForKernel_0009.o UtilsForKernel_0010.o UtilsForKernel_0011.o UtilsForKernel_0012.o UtilsForKernel_0013.o UtilsForKernel_0014.o UtilsForKernel_0015.o UtilsForKernel_0016.o UtilsForKernel_0017.o UtilsForKernel_0018.o UtilsForKernel_0019.o UtilsForKernel_0020.o UtilsForKernel_0021.o UtilsForKernel_0022.o UtilsForKernel_0023.o UtilsForKernel_0024.o UtilsForKernel_0025.o UtilsForKernel_0026.o UtilsForKernel_0027.o UtilsForKernel_0028.o UtilsForKernel_0029.o UtilsForKernel_0030.o UtilsForKernel_0031.o UtilsForKernel_0032.o UtilsForKernel_0033.o UtilsForKernel_0034.o UtilsForKernel_0035.o UtilsForKernel_0036.o UtilsForKernel_0037.o UtilsForKernel_0038.o UtilsForKernel_0039.o

SYSCON_OBJS = sceSyscon_driver_0000.o sceSyscon_driver_0001.o sceSyscon_driver_0002.o sceSyscon_driver_0003.o sceSyscon_driver_0004.o sceSyscon_driver_0005.o sceSyscon_driver_0006.o sceSyscon_driver_0007.o sceSyscon_driver_0008.o sceSyscon_driver_0009.o sceSyscon_driver_0010.o sceSyscon_driver_0011.o sceSyscon_driver_0012.o sceSyscon_driver_0013.o sceSyscon_driver_0014.o sceSyscon_driver_0015.o sceSyscon_driver_0016.o sceSyscon_driver_0017.o sceSyscon_driver_0018.o sceSyscon_driver_0019.o sceSyscon_driver_0020.o sceSyscon_driver_0021.o sceSyscon_driver_0022.o sceSyscon_driver_0023.o sceSyscon_driver_0024.o sceSyscon_driver_0025.o sceSyscon_driver_0026.o sceSyscon_driver_0027.o sceSyscon_driver_0028.o sceSyscon_driver_0029.o sceSyscon_driver_0030.o sceSyscon_driver_0031.o sceSyscon_driver_0032.o sceSyscon_driver_0033.o sceSyscon_driver_0034.o sceSyscon_driver_0035.o sceSyscon_driver_0036.o sceSyscon_driver_0037.o sceSyscon_driver_0038.o sceSyscon_driver_0039.o sceSyscon_driver_0040.o sceSyscon_driver_0041.o sceSyscon_driver_0042.o sceSyscon_driver_0043.o sceSyscon_driver_0044.o sceSyscon_driver_0045.o sceSyscon_driver_0046.o sceSyscon_driver_0047.o sceSyscon_driver_0048.o sceSyscon_driver_0049.o sceSyscon_driver_0050.o sceSyscon_driver_0051.o sceSyscon_driver_0052.o sceSyscon_driver_0053.o sceSyscon_driver_0054.o sceSyscon_driver_0055.o sceSyscon_driver_0056.o sceSyscon_driver_0057.o sceSyscon_driver_0058.o sceSyscon_driver_0059.o sceSyscon_driver_0060.o sceSyscon_driver_0061.o sceSyscon_driver_0062.o sceSyscon_driver_0063.o sceSyscon_driver_0064.o sceSyscon_driver_0065.o sceSyscon_driver_0066.o sceSyscon_driver_0067.o sceSyscon_driver_0068.o sceSyscon_driver_0069.o sceSyscon_driver_0070.o sceSyscon_driver_0071.o sceSyscon_driver_0072.o sceSyscon_driver_0073.o sceSyscon_driver_0074.o sceSyscon_driver_0075.o sceSyscon_driver_0076.o sceSyscon_driver_0077.o sceSyscon_driver_0078.o sceSyscon_driver_0079.o sceSyscon_driver_0080.o sceSyscon_driver_0081.o sceSyscon_driver_0082.o sceSyscon_driver_0083.o sceSyscon_driver_0084.o sceSyscon_driver_0085.o sceSyscon_driver_0086.o sceSyscon_driver_0087.o sceSyscon_driver_0088.o sceSyscon_driver_0089.o sceSyscon_driver_0090.o sceSyscon_driver_0091.o sceSyscon_driver_0092.o sceSyscon_driver_0093.o sceSyscon_driver_0094.o sceSyscon_driver_0095.o sceSyscon_driver_0096.o sceSyscon_driver_0097.o sceSyscon_driver_0098.o sceSyscon_driver_0099.o sceSyscon_driver_0100.o sceSyscon_driver_0101.o sceSyscon_driver_0102.o sceSyscon_driver_0103.o sceSyscon_driver_0104.o sceSyscon_driver_0105.o sceSyscon_driver_0106.o sceSyscon_driver_0107.o sceSyscon_driver_0108.o sceSyscon_driver_0109.o sceSyscon_driver_0110.o sceSyscon_driver_0111.o sceSyscon_driver_0112.o sceSyscon_driver_0113.o
SYSCON_OBJS = sceSyscon_driver_0000.o sceSyscon_driver_0001.o sceSyscon_driver_0002.o sceSyscon_driver_0003.o sceSyscon_driver_0004.o sceSyscon_driver_0005.o sceSyscon_driver_0006.o sceSyscon_driver_0007.o sceSyscon_driver_0008.o sceSyscon_driver_0009.o sceSyscon_driver_0010.o sceSyscon_driver_0011.o sceSyscon_driver_0012.o sceSyscon_driver_0013.o sceSyscon_driver_0014.o sceSyscon_driver_0015.o sceSyscon_driver_0016.o sceSyscon_driver_0017.o sceSyscon_driver_0018.o sceSyscon_driver_0019.o sceSyscon_driver_0020.o sceSyscon_driver_0021.o sceSyscon_driver_0022.o sceSyscon_driver_0023.o sceSyscon_driver_0024.o sceSyscon_driver_0025.o sceSyscon_driver_0026.o sceSyscon_driver_0027.o sceSyscon_driver_0028.o sceSyscon_driver_0029.o sceSyscon_driver_0030.o sceSyscon_driver_0031.o sceSyscon_driver_0032.o sceSyscon_driver_0033.o sceSyscon_driver_0034.o sceSyscon_driver_0035.o sceSyscon_driver_0036.o sceSyscon_driver_0037.o sceSyscon_driver_0038.o sceSyscon_driver_0039.o sceSyscon_driver_0040.o sceSyscon_driver_0041.o sceSyscon_driver_0042.o sceSyscon_driver_0043.o sceSyscon_driver_0044.o sceSyscon_driver_0045.o sceSyscon_driver_0046.o sceSyscon_driver_0047.o sceSyscon_driver_0048.o sceSyscon_driver_0049.o sceSyscon_driver_0050.o sceSyscon_driver_0051.o sceSyscon_driver_0052.o sceSyscon_driver_0053.o sceSyscon_driver_0054.o sceSyscon_driver_0055.o sceSyscon_driver_0056.o sceSyscon_driver_0057.o sceSyscon_driver_0058.o sceSyscon_driver_0059.o sceSyscon_driver_0060.o sceSyscon_driver_0061.o sceSyscon_driver_0062.o sceSyscon_driver_0063.o sceSyscon_driver_0064.o sceSyscon_driver_0065.o sceSyscon_driver_0066.o sceSyscon_driver_0067.o sceSyscon_driver_0068.o sceSyscon_driver_0069.o sceSyscon_driver_0070.o sceSyscon_driver_0071.o sceSyscon_driver_0072.o sceSyscon_driver_0073.o sceSyscon_driver_0074.o sceSyscon_driver_0075.o sceSyscon_driver_0076.o sceSyscon_driver_0077.o sceSyscon_driver_0078.o sceSyscon_driver_0079.o sceSyscon_driver_0080.o sceSyscon_driver_0081.o sceSyscon_driver_0082.o sceSyscon_driver_0083.o sceSyscon_driver_0084.o sceSyscon_driver_0085.o sceSyscon_driver_0086.o sceSyscon_driver_0087.o sceSyscon_driver_0088.o sceSyscon_driver_0089.o sceSyscon_driver_0090.o sceSyscon_driver_0091.o sceSyscon_driver_0092.o sceSyscon_driver_0093.o sceSyscon_driver_0094.o sceSyscon_driver_0095.o sceSyscon_driver_0096.o sceSyscon_driver_0097.o sceSyscon_driver_0098.o sceSyscon_driver_0099.o sceSyscon_driver_0100.o sceSyscon_driver_0101.o sceSyscon_driver_0102.o sceSyscon_driver_0103.o sceSyscon_driver_0104.o sceSyscon_driver_0105.o sceSyscon_driver_0106.o sceSyscon_driver_0107.o sceSyscon_driver_0108.o sceSyscon_driver_0109.o sceSyscon_driver_0110.o sceSyscon_driver_0111.o sceSyscon_driver_0112.o sceSyscon_driver_0113.o sceSyscon_driver_0114.o sceSyscon_driver_0115.o

INTR_OBJS = InterruptManagerForKernel_0000.o InterruptManagerForKernel_0001.o InterruptManagerForKernel_0002.o InterruptManagerForKernel_0003.o InterruptManagerForKernel_0004.o InterruptManagerForKernel_0005.o InterruptManagerForKernel_0006.o InterruptManagerForKernel_0007.o InterruptManagerForKernel_0008.o InterruptManagerForKernel_0009.o InterruptManagerForKernel_0010.o InterruptManagerForKernel_0011.o InterruptManagerForKernel_0012.o InterruptManagerForKernel_0013.o InterruptManagerForKernel_0014.o InterruptManagerForKernel_0015.o InterruptManagerForKernel_0016.o InterruptManagerForKernel_0017.o InterruptManagerForKernel_0018.o InterruptManagerForKernel_0019.o InterruptManagerForKernel_0020.o InterruptManagerForKernel_0021.o InterruptManagerForKernel_0022.o InterruptManagerForKernel_0023.o InterruptManagerForKernel_0024.o InterruptManagerForKernel_0025.o InterruptManagerForKernel_0026.o InterruptManagerForKernel_0027.o InterruptManagerForKernel_0028.o InterruptManagerForKernel_0029.o InterruptManagerForKernel_0030.o InterruptManagerForKernel_0031.o InterruptManagerForKernel_0032.o InterruptManagerForKernel_0033.o InterruptManagerForKernel_0034.o InterruptManagerForKernel_0035.o InterruptManagerForKernel_0036.o InterruptManagerForKernel_0037.o InterruptManagerForKernel_0038.o InterruptManagerForKernel_0039.o InterruptManagerForKernel_0040.o InterruptManagerForKernel_0041.o InterruptManagerForKernel_0042.o InterruptManagerForKernel_0043.o InterruptManagerForKernel_0044.o

Expand Down
15 changes: 15 additions & 0 deletions src/kernel/pspsyscon.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ int sceSysconGetTimeStamp(s8 *timeStamp);

int sceSysconReceiveSetParam(int n, u8 *buf);


/**
* Controls power supply to the USB accessory port (PSP Cam, GPS, etc.).
* @param power 1 to turn on, 0 to turn off
* @return 0 if success, < 0 otherwise
*/
int sceSysconCtrlUsbPower(u8 power);

/**
* Gets the power status of the USB accessory port (PSP Cam, GPS, etc.).
* @return 1 if powered on, 0 otherwise
*/
u8 sceSysconGetUsbPowerCtrl(void);


/**@}*/

#ifdef __cplusplus
Expand Down
6 changes: 6 additions & 0 deletions src/kernel/sceSyscon_driver.S
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,9 @@
#ifdef F_sceSyscon_driver_0113
IMPORT_FUNC "sceSyscon_driver",0xC8D97773,sceSyscon_driver_C8D97773
#endif
#ifdef F_sceSyscon_driver_0114
IMPORT_FUNC "sceSyscon_driver", 0x3987FEA3, sceSysconCtrlUsbPower
#endif
#ifdef F_sceSyscon_driver_0115
IMPORT_FUNC "sceSyscon_driver", 0xEE81C5B1, sceSysconGetUsbPowerCtrl
#endif
Comment on lines +347 to +352

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NIDs are wrong, for the PSPSDK the NID must be the one from the lowest firmware where the stub is available.

These are the NID for those functions on the FW >= 6.60

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fw 3.00 NIDs for those functions are respectively 0x3987FEA3 and 0xEE81C5B1 according to the psplibdoc, but i can't test them.
If you have time can you please explain me how does the nid resolve work for later versions (when you compile something for a higher firmware), or give me indications on where i can learn about that?

@GrayJack GrayJack Sep 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most CFW takes the task to translate old kernel NID to new kernel NID. They basically have a table of old NID (in PSPSDK, or commonly used even withou the SDK) and it's correct value on the CFW supported firmware.

I also recommend to at least request for the maintained CFWs to include these in their translation table it they are not already.

The ones that are currently maintained is ARK-5 and Epinephrine (Adrenaline's default eCFW).

In this particular case , it is not a issue for Epinephrine, since VITA has no sceSyscon_driver, but for ARK-5, that supports both PSP and VITA PSPemu, it probably is

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does PRO-C2 do that translation too? that's the one i use, since ARK-5 appears a lot more bloated. if it doesn't, the recent NID modifications to target older NIDs would likely break pspsdk-built programs for me.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it does, most CFW does. It is a important feature if the CFW wants to:

  1. Support kernel plugins build with PSPSDK
  2. Support for closed-source kernel plugins (focusnon the ones no longer maintained, like CWCheat)

That being said, there is a chance unmaintained CFW may not have these specific ones being added here, but you can always fork PRO and added it in such cases.

I don't know about recent kernel NID change in PSPSDK, using the oldest kernel NID for kernel stubs is the PSPSDK policy since forever (way before I syarted to get involved)

Loading