SceUsbDevSerial: Difference between revisions

From Vita Development Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Module ==
== Module ==


Not decryptable on Release firmwares.
A simplified and internal development version of [[SceUsbSerial]]:
* Does not check SceSblACMgrForDriver for processes capabilities.
* Does not check sceIdStorageLookupForDriver(0x112, 0, /*s_data_81003184*/ "", 0x40); (might be Driver name similarly to PSP IdStorage)


A simplified version of SceUsbSerial:
This module exists only in Non-secure world. The SELF can be found in <code>os0:kd/usbdev_serial.skprx</code>.
* Does not check SceSblACMgrForDriver for processes capabilities.
* Does not check sceIdStorageLookupForDriver(0x112, 0, /*s_data_81003184*/ "", 0x40);


=== Known NIDs ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! Name !! World !! Privilege !! NID
! Version !! World !! Privilege
|-
|-
| 3.60 || SceUsbDevSerial || Non-secure || Kernel || 0x9A1CD725
| 0.990-3.60 || Non-secure || Kernel
|}
|}


Line 23: Line 22:
! Version !! Name !! World !! Visibility !! NID
! Version !! Name !! World !! Visibility !! NID
|-
|-
| 3.60 || [[SceUsbSerial#SceUsbSerial|SceUsbSerial]] || Non-secure || User || 0x125C67C7
| 0.990-3.60 || [[SceUsbDevSerial#SceUsbDevSerial|SceUsbDevSerial]] || Non-secure || User || 0x125C67C7
|}
|}


Line 36: Line 35:
|}
|}


<source lang="c">
<source lang="C">int SceUsbDevSerial_4437FF2D(void *pIn, SceSize size);</source>
 
</source>


=== SceUsbDevSerial_57FBB08C ===
=== SceUsbDevSerial_57FBB08C ===
Line 48: Line 45:
|}
|}


<source lang="c">
<source lang="C">int SceUsbDevSerial_57FBB08C(void *pOut, SceSize *puiSize);</source>
 
</source>


=== SceUsbDevSerial_6F2B3960 ===
=== SceUsbDevSerial_6F2B3960 ===
Line 60: Line 55:
|}
|}


<source lang="c">
<source lang="C">int SceUsbDevSerial_6F2B3960(void);</source>
 
</source>


=== SceUsbDevSerial_918D359E ===
=== SceUsbDevSerial_918D359E ===
Line 72: Line 65:
|}
|}


<source lang="c">
<source lang="C">
// version: on FW 3.60, it must be 0x3517008 or 0x3517001
// value: anything different than 0
// value_size: must be 4
int SceUsbDevSerial_918D359E(SceUInt32 version, SceUInt32 value, SceSize value_size);</source>


</source>
=== sceUsbDevSerialFinalize ===
 
=== SceUsbDevSerial_9F497D4E ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0x9F497D4E
| 0.990-3.60 || 0x9F497D4E
|}
|}


<source lang="c">
Reversed code:
<source lang="C">
sceUdcdDeactivateInternalForDriver(2);
sceUdcdStopInternalForDriver("USBSerialDriver", 0, 0, 2);
sceUdcdStopInternalForDriver("USBDeviceControllerDriver", 0, 0, 2);
</source>


<source lang="C">
/**
* Stops USB Dev Serial device
*/
int sceUsbDevSerialFinalize(void);
</source>
</source>


=== SceUsbDevSerial_C0FDECAF ===
=== sceUsbDevSerialGetDeviceState ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xC0FDECAF
| 0.990-3.60 || 0xC0FDECAF
|}
|}


<source lang="c">
Calls [[SceUdcd#sceUdcdGetDeviceStateInternalForDriver]](2).


</source>
<source lang="C">int sceUsbDevSerialGetDeviceState(void);</source>


=== SceUsbDevSerial_DAE5C362 ===
=== sceUsbDevSerialInit ===
{| class="wikitable"
{| class="wikitable"
|-
|-
! Version !! NID
! Version !! NID
|-
|-
| 3.60 || 0xDAE5C362
| 0.990-3.60 || 0xDAE5C362
|}
|}


<source lang="c">
Reversed code:
<source lang="C">
int sceUsbDevSerialInit(SceUInt32 bus) {
    int ret = 0;
    if (bus >= 2)
        return 0x80243300;
    ret = sceUdcdStartInternalForDriver("USBDeviceControllerDriver", 0, 0, 2));
    if (ret != 0)
        return ret;
    ret = sceUdcdStartInternalForDriver("USBSerialDriver", 0, 0, 2);
    if (ret != 0) {
        sceUdcdStopInternalForDriver("USBDeviceControllerDriver", 0, 0, 2);
        return ret;
    }
    ret = sceUdcdActivateInternalForDriver(0xFFFF, bus);
    if (ret != 0)
        sceUdcdStopInternalForDriver("USBSerialDriver", 0, 0, 2);
    return ret;
}
</source>


<source lang="C">
/**
* Initialize USB Dev Serial device
*
* bus: Must be 0 or 1.
*
* @return 0 on success, < 0 on error
*/
int sceUsbDevSerialInit(SceUInt32 bus);
</source>
</source>


Line 120: Line 153:
|}
|}


<source lang="c">
<source lang="C">int SceUsbDevSerial_F0C3F3D4(void);</source>
 
</source>
 


[[Category:ARM]]
[[Category:Kernel]]
[[Category:Modules]]
[[Category:Modules]]
[[Category:Kernel]]
[[Category:Library]]

Latest revision as of 21:36, 1 May 2023

Module

A simplified and internal development version of SceUsbSerial:

  • Does not check SceSblACMgrForDriver for processes capabilities.
  • Does not check sceIdStorageLookupForDriver(0x112, 0, /*s_data_81003184*/ "", 0x40); (might be Driver name similarly to PSP IdStorage)

This module exists only in Non-secure world. The SELF can be found in os0:kd/usbdev_serial.skprx.

Version World Privilege
0.990-3.60 Non-secure Kernel

Libraries

Known NIDs

Version Name World Visibility NID
0.990-3.60 SceUsbDevSerial Non-secure User 0x125C67C7

SceUsbDevSerial

SceUsbDevSerial_4437FF2D

Version NID
3.60 0x4437FF2D
int SceUsbDevSerial_4437FF2D(void *pIn, SceSize size);

SceUsbDevSerial_57FBB08C

Version NID
3.60 0x57FBB08C
int SceUsbDevSerial_57FBB08C(void *pOut, SceSize *puiSize);

SceUsbDevSerial_6F2B3960

Version NID
3.60 0x6F2B3960
int SceUsbDevSerial_6F2B3960(void);

SceUsbDevSerial_918D359E

Version NID
3.60 0x918D359E
// version: on FW 3.60, it must be 0x3517008 or 0x3517001
// value: anything different than 0
// value_size: must be 4
int SceUsbDevSerial_918D359E(SceUInt32 version, SceUInt32 value, SceSize value_size);

sceUsbDevSerialFinalize

Version NID
0.990-3.60 0x9F497D4E

Reversed code:

sceUdcdDeactivateInternalForDriver(2);
sceUdcdStopInternalForDriver("USBSerialDriver", 0, 0, 2);
sceUdcdStopInternalForDriver("USBDeviceControllerDriver", 0, 0, 2);
/**
 * Stops USB Dev Serial device
 */
int sceUsbDevSerialFinalize(void);

sceUsbDevSerialGetDeviceState

Version NID
0.990-3.60 0xC0FDECAF

Calls SceUdcd#sceUdcdGetDeviceStateInternalForDriver(2).

int sceUsbDevSerialGetDeviceState(void);

sceUsbDevSerialInit

Version NID
0.990-3.60 0xDAE5C362

Reversed code:

int sceUsbDevSerialInit(SceUInt32 bus) {
    int ret = 0;
    if (bus >= 2)
        return 0x80243300;
    ret = sceUdcdStartInternalForDriver("USBDeviceControllerDriver", 0, 0, 2));
    if (ret != 0)
        return ret;
    ret = sceUdcdStartInternalForDriver("USBSerialDriver", 0, 0, 2);
    if (ret != 0) {
        sceUdcdStopInternalForDriver("USBDeviceControllerDriver", 0, 0, 2);
        return ret;
    }
    ret = sceUdcdActivateInternalForDriver(0xFFFF, bus);
    if (ret != 0)
        sceUdcdStopInternalForDriver("USBSerialDriver", 0, 0, 2);
    return ret;
}
/**
 * Initialize USB Dev Serial device
 *
 * bus: Must be 0 or 1.
 * 
 * @return 0 on success, < 0 on error
 */
int sceUsbDevSerialInit(SceUInt32 bus);

SceUsbDevSerial_F0C3F3D4

Version NID
3.60 0xF0C3F3D4
int SceUsbDevSerial_F0C3F3D4(void);