October 24th, 2008 silverspring

The Utilities library was an excellent idea by SCE to allow ever increasing functionality to be available to Game developers (at the expense of user memory though, the Utilities is partly why a whopping 8MB is reserved for the kernel).

Anyway, on to the new NID’s (note not all are available under all firmwares)…

From libs under sceUtility_Driver:

  • 0x943cba46 sceUtilityAuthDialogInitStart
  • 0x0f3eeaac sceUtilityAuthDialogShutdownStart
  • 0x147f7c85 sceUtilityAuthDialogUpdate
  • 0x16a1a8d8 sceUtilityAuthDialogGetStatus
  • 0xdde5389d sceUtilityDNASInitStart
  • 0x149a7895 sceUtilityDNASShutdownStart
  • 0x4a833ba4 sceUtilityDNASUpdate
  • 0xa50e5b30 sceUtilityDNASGetStatus
  • 0x04b24901 sceUtilityDdHelperInitStart
  • 0x1b698f54 sceUtilityDdHelperShutdownStart
  • 0xfd99af0a sceUtilityDdHelperUpdate
  • 0x8fcabab9 sceUtilityDdHelperGetStatus
  • 0x16d02af0 sceUtilityNpSigninInitStart
  • 0xe19c97d6 sceUtilityNpSigninShutdownStart
  • 0xf3fbc572 sceUtilityNpSigninUpdate
  • 0x86abdb1b sceUtilityNpSigninGetStatus
  • 0x42071a83 sceUtilityPS3ScanInitStart
  • 0xd17a0573 sceUtilityPS3ScanShutdownStart
  • 0xd852cdce sceUtilityPS3ScanUpdate
  • 0x89317c8f sceUtilityPS3ScanGetStatus
  • 0x81c44706 sceUtilityRssReaderInitStart
  • 0xb0fb7ff5 sceUtilityRssReaderContStart
  • 0xe7b778d8 sceUtilityRssReaderShutdownStart
  • 0x6f56f9cf sceUtilityRssReaderUpdate
  • 0x8326ab05 sceUtilityRssReaderGetStatus
  • 0x4b0a8fe5 sceUtilityRssSubscriberInitStart
  • 0x06a48659 sceUtilityRssSubscriberShutdownStart
  • 0xa084e056 sceUtilityRssSubscriberUpdate
  • 0x2b96173b sceUtilityRssSubscriberGetStatus
  • 0x0251b134 sceUtilityScreenshotInitStart
  • 0x86a03a27 sceUtilityScreenshotContStart
  • 0xf9e0008c sceUtilityScreenshotShutdownStart
  • 0xab083ea9 sceUtilityScreenshotUpdate
  • 0xd81957b7 sceUtilityScreenshotGetStatus
  • 0xda97f1aa sceUtilityStoreCheckoutInitStart
  • 0x54a5c62f sceUtilityStoreCheckoutShutdownStart
  • 0xb8592d5f sceUtilityStoreCheckoutUpdate
  • 0x3aad51dc sceUtilityStoreCheckoutGetStatus
  • 0x7635200e sceUtilityDialogGetGameInfo
  • 0xef5bc2d1 sceUtilityDialogGetStructVersion
  • 0x463ea95e sceUtilityAppletGetType (an amazing false positive for this nid is sceUtilityPspDialog !!)
  • 0xab46a24f sceUtilityAppletGetParam
  • 0x463ea95e sceUtilityAppletGetType
  • 0x75ff798c sceUtilityAppletGetSpeed
  • 0x4b677ba1 sceUtilityAppletGetStructVersion
  • 0x00948e27 sceUtilityAppletLoadModule
  • 0x4acd6532 sceUtilityAppletUnloadModule
  • 0x97f922a3 sceUtilityAppletSetStatus
  • 0x9bae7dce sceUtilityAppletSetThreadId
  • 0x976f7805 sceUtilityAppletRegisterPowerCallback
  • 0xe542e9d8 sceUtilityAppletUnregisterPowerCallback
  • 0x8e8e3aa3 sceUtilitySetNetParamLatestID
  • 0x3fd8ccfb sceUtilityGetNetParamInt
  • 0x63c3e40c sceUtilitySetNetParamInt

A few previous Utilities had been added to the PSPSDK most notably the Message Dialogs as well as the Web Browser. Some of these newly discovered Utilities may be also worthwhile to add to PSPSDK especially the Screenshot one. While there are already unofficially screenshot libs, it would be more convenient as well as less memory consuming to use an official lib (for example using the official libmp3 to play mp3 files).

More, more, more…

October 17th, 2008 silverspring

Four more libs are now fully complete:

From sceGpio_driver:

  • 0×95135905 sceGpioPortInvert
  • 0x5691cefa sceGpioEnableTimerCapture
  • 0x2cdc8edc sceGpioDisableTimerCapture
  • 0x6b38b826 sceGpioSetCapturePort
  • 0xc6928224 sceGpioGetCapturePort

That completes the GPIO lib !!

From scePwm_driver:

  • 0xab6d2e36 scePwmChangeDuty
  • 0xf624c1a0 scePwmReferDuty

That completes the PWM lib !!

From sceMp3:

  • 0x8AB81558 sceMp3StartEntry
  • 0x732B042A sceMp3EndEntry

That completes libmp3 !!

From sceAac:

  • 0x6C05813B sceAacStartEntry
  • 0x61AA43C9 sceAacEndEntry

That completes libaac !!

From sceAta_driver:

  • 0x8cada96b sceAtaAhbGetDDRSize
  • 0xb985f2b0 sceAtaAhbSetDDRSize
  • 0x7c6b31d8 sceAtaDisplayIPD
  • 0x9ca52f94 sceAtaExecIPDCmd

From sceClockgen_driver:

  • 0xc6d4c843 sceClockgenSetProtocol

From InitForKernel:

  • 0x7233b5bc sceKernelApplicationType

From IoFileMgrForKernel:

  • 0x30e8abb3 sceIoValidateFd

From sceUsb1Seg_driver:

  • 0xd799104f sceUsb1SegGetFirmVer

From sceUSB_Stor_Ms_driver:

  • 0x7b810720 sceUsbstorMsSetWorkBuf
  • 0xcf2af7b3 sceUsbstorMsGetNickname
  • 0x16173d42 sceUsbstorMsSetNickname

From scePower_driver:

  • 0xd7b9c925 scePowerGetWatchDog
  • 0x442bfbac scePowerGetBacklightMaximum
  • 0x23436a4a scePowerGetInnerTemp
  • 0xf535d928 scePowerSetWakeupCondition
  • 0x78a1a796 scePowerIsSuspendRequired

From sceAsfParser:

  • 0xd2dd1778 sceAsfGetContentDescription
  • 0xaa881a7b sceAsfGetExtContent
  • 0xefc704c3 sceAsfGetHeaderExtension
  • 0x5ec678cb sceAsfGetVariableObject

From sceUmdMan_driver:

  • 0x1f9afff4 sceUmdManMediaPresent
  • 0x84410a8e sceUmdManSetReadAheadSize
  • 0x63acfd28 sceUmdManSetDisableReadAhead
  • 0x39704b6e sceUmdManSetEnableReadAhead

From sceUmd:

  • 0x08709f2d sceUmdAssertLeptonWakeup
  • 0xad18c797 sceUmdNegateLeptonWakeup

From sceMgr_driver:

  • 0xf26c410a sceMgrMSReadPoolPage
  • 0xa85906fc sceMgrMSWritePoolPage

From sceMSAudio_driver:

  • 0x66f19ca3 sceMSAudioUpdateIBD
  • 0x22da9981 sceMSAudioInitFringe
  • 0x9e37e51d sceMSAudioInitTrack
  • 0x5d1c9867 sceMSAudioDecryptFringe
  • 0x38178f2f sceMSAudioDecryptTrack
  • 0x67e58c07 sceMSAudioEndFringe
  • 0x135f2225 sceMSAudioEndTrack
  • 0xda34ab8f sceMSAudioGetMediaType
  • 0xa18a1df6 sceMSAudioClearMACEntry
  • 0xe8b25d38 sceMSAudioCalculateICVn

And vshbridge equivalents:

  • 0x04310D7C vshMSAudioUpdateIBD
  • 0xB27C593F vshMSAudioInitFringe
  • 0×14877197 vshMSAudioInitTrack
  • 0x0D2CEAD2 vshMSAudioDecryptFringe
  • 0xD907B6AA vshMSAudioDecryptTrack
  • 0xD120667D vshMSAudioEndFringe
  • 0x5BBB35E4 vshMSAudioEndTrack
  • 0xB0FD5916 vshMSAudioGetMediaType
  • 0x7A63BE73 vshMSAudioClearMACEntry
  • 0x222A18C4 vshMSAudioCalculateICVn

Marlin DRM Platform (new nids)

October 15th, 2008 silverspring

Marlin is a DRM platform designed to provide interoperability across multiple devices. It’s developed by several big name corporations like Sony, Panasonic, Samsung, Philips, etc.

Naturally the PSP would be a suitable target. The library sceMlnBridge (mlnbridge.prx) has existed since 2.50 but only in the last few firmwares has the API really expanded:

From sceMlnBridge (this is not the full list of nids there are still more unknown):

  • 0x13e68009 sceMlnBridgeAesEcbEncrypt
  • 0x8d7e61dd sceMlnBridgeAesEcbDecrypt
  • 0xde730a46 sceMlnBridgeAesCbcEncrypt
  • 0x7770fc23 sceMlnBridgeAesCbcDecrypt
  • 0x54edc552 sceMlnBridgeSHA1
  • 0x3505ecce sceMlnBridgeHMAC
  • 0x2fdf5639 sceMlnBridgeRandInit
  • 0xd0790a37 sceMlnBridgeRandFin
  • 0xe79622cd sceMlnBridgeRandGetBytes
  • 0xadb4797e sceMlnBridgeRsaInit
  • 0xb7e04efa sceMlnBridgeRsaFin
  • 0x10c4fec6 sceMlnBridgeSha1MakeDigest
  • 0xd455dd97 sceMlnBridgeSha256MakeDigest

Its features include a Public Key Encryption Algorithm, a Public Key Signature Algorithm, a Secret Key Encryption Algorithm, a Secret Key Signature Algorithm, a Digest Algorithm, and more. So here you have access to AES, RSA, SHA1, SHA256, & MT19937 algorithms all in a single usermode lib (though the api was stripped down again from 4.xx for some reason).

All the algorithms are done in software with the exception of AES, which it relies on MagicGate hardware to perform.

From sceMgr_driver:

  • 0xA45A63B6 sceMgrAesEcbEncrypt
  • 0x19B8F2D0 sceMgrAesEcbDecrypt
  • 0xA44A5538 sceMgrAesCbcEncrypt
  • 0xA1F6D85A sceMgrAesCbcDecrypt

These are just convenient wrappers over the sceMgrAESEncrypt/sceMgrAESDecrypt functions that were discovered earlier here.

Also, an interface through a USB driver (usbstormgr.prx).

From sceUsbstormln:

  • 0x1f4ac19c sceUsbstormlnGetCommand
  • 0x5821060d sceUsbstormlnNotifyResponse
  • 0x382898de sceUsbstormlnRegisterBuffer
  • 0x25b6f372 sceUsbstormlnUnregisterBuffer
  • 0xdec0fe8c sceUsbstormlnWaitStatus
  • 0xe11defdf sceUsbstormlnCancelWaitStatus

USB Host ??

October 12th, 2008 silverspring

Some new nids that may suggest that the PSP does in fact have USB Host capabilities:

  • 0x3E961C02 sceSysregUsbhostResetEnable
  • 0xACFA3764 sceSysregUsbhostResetDisable
  • 0xDA4FCA1D sceSysregUsbhostClkEnable
  • 0x228A73E1 sceSysregUsbhostClkDisable
  • 0xE321F41A sceSysregUsbhostBusClockEnable
  • 0x4D2FFC60 sceSysregUsbhostBusClockDisable
  • 0xFFEB6E00 sceSysregUsbhostQueryIntr
  • 0x87C2BA20 sceSysregUsbhostAcquireIntr

However, these nids were only added in 2.70. At the same time, sceSysregAtahdd___ nids were also added so it could be that this was for the unreleased HDD model PSP and not actually for any current model. Usb Host may have been destined for this new PSP which, along with the internal HDD+GSensor and Bluetooth, defintely would have been a dream handheld.

At one point it seemed that the new PSP-3000 would be the model to integrate these great features however that does not seem to be the case anymore. With the disappointing new features of the PSP-3000 let’s hope a PSP-4000 will finally be the time Sony releases this new model.

Another interesting fact that may mean something or may mean absolutely nothing at all:

0xBC1000B0 is the Usbhost Interrupt Status register. On normal boot this register is set to 1 however on service mode & test mode boot (ie. for battery serial 0xFFFFFFFF & 0×00000000 respectively) this register is set to 0. Whether this actually means something of significance is unknown however it is rumoured that during service mode the USB is actually plugged in (perhaps connected to a testing PC ?).

Another large bunch of new NID’s

October 10th, 2008 silverspring

Syscon G-Sensor
As I mentioned in previous entries, support for an internal HDD+GSensor had been added to the kernel from 2.80. It seems SCE had wanted to keep it a secret since when I had revealed the NID’s referencing these devices, the API had promptly been removed the following firmware. Hence the HDD & GSensor NID’s only exist from 2.80-3.60. When they actually plan on releasing this HDD is anyone’s guess, though I had hoped it would have happened with the release of the PSP-3000. Well, maybe for PSP-4000…

From sceSyscon_driver:

  • 0x3357EE5C sceSysconIsFalling
  • 0x565EF519 sceSysconGetFallingDetectTime

This literally detects whether or not the PSP is falling down (the G-Sensor has an accelerometer built in) and if it is, shuts down the HDD to protect from damage.

Link to previous post about the GSensor and HDD: http://my.malloc.us/silverspring/2007/11/16/the-psp-slim-couldve-been-a-gamers-dream-handheld/

Lightweight Mutex
Lightweight mutexs have recently been added to the kernel (3.80+ firmwares) however the majority of the API was placed in the sceKernelLibrary of usersystemlib.prx instead of sceThreadManager even though sceKernelCreateLwMutex/sceKernelDeleteLwMutex were still in sceThreadManager.

From Kernel_Library:

  • 0xBEA46419 sceKernelLockLwMutex
  • 0x1FC64E09 sceKernelLockLwMutexCB
  • 0xDC692EE3 sceKernelTryLockLwMutex
  • 0x15B6446B sceKernelUnlockLwMutex
  • 0xC1734599 sceKernelReferLwMutexStatus

From ThreadManForUser:

  • 0x4C145944 sceKernelReferLwMutexStatusByID

Low-level Sound Library
From 1.00-2.60 a low-level sound library was available as the scePEQ_Library_driver (peq.prx).

From scePEQ_driver:

  • 0xF7EA0632 scePeqInit
  • 0x213DE849 scePeqEntry
  • 0xED13C3B5 scePeqProc

From 2.70+ this library was replaced with sceSAScore (sc_sascore.prx – SC being the shorthand for the main cpu as opposed to ME the Media Engine cpu).

From sceSasCore_driver:

  • 0xB0F9F98F sceSasCoreInit
  • 0xE143A1EA sceSasCoreExit

For the usermode library the usual naming convention changed (no wonder there were never any hits for these nids, they used a stupid underscore, and two of them!!)

From sceSasCore:

  • 0x019B25EB __sceSasSetADSR
  • 0x07F58C24 __sceSasGetAllEnvelopeHeights
  • 0x267A6DD2 __sceSasRevParam
  • 0x2C8E6AB3 __sceSasGetPauseFlag
  • 0x33D4AB37 __sceSasRevType
  • 0x42778A9F __sceSasInit
  • 0x440CA7D8 __sceSasSetVolume
  • 0x50A14DFC __sceSasCoreWithMix
  • 0x5F9529F6 __sceSasSetSL
  • 0x68A46B95 __sceSasGetEndFlag
  • 0x74AE582A __sceSasGetEnvelopeHeight
  • 0x76F01ACA __sceSasSetKeyOn
  • 0x787D04D5 __sceSasSetPause
  • 0×99944089 __sceSasSetVoice
  • 0x9EC3676A __sceSasSetADSRmode
  • 0xA0CF2FA4 __sceSasSetKeyOff
  • 0xA232CBE6 __sceSasSetTrianglarWave
  • 0xA3589D81 __sceSasCore
  • 0xAD84D37F __sceSasSetPitch
  • 0xB7660A23 __sceSasSetNoise
  • 0xBD11B7C2 __sceSasGetGrain
  • 0xCBCD4F79 __sceSasSetSimpleADSR
  • 0xD1E0A01E __sceSasSetGrain
  • 0xD5A229C9 __sceSasRevEVOL
  • 0xD5EBBBCD __sceSasSetSteepWave
  • 0xE175EF66 __sceSasGetOutputmode
  • 0xE855BF76 __sceSasSetOutputmode
  • 0xF983B186 __sceSasRevVON

Under the same prx another sound lib, the Positional 3D Audio Library, was added in 2.80+.

From sceP3da:

  • 0x374500A5 sceP3daBridgeInit
  • 0x43F756A2 sceP3daBridgeExit
  • 0x013016F3 sceP3daBridgeCore

User Log
Added from 2.80+, can only be used on devkits.

From UtilsForKernel:

  • 0x92282A47 sceKernelRegisterUserLogHandler
  • 0x87E81561 sceKernelPutUserLog

As people may know SCE added their own official UMD Emulator to load official PSP ISO’s bought from PSN Store (such as “Beats” and many others). The scePspNpDrm_Driver (npdrm.prx) is what protects these legit ISO’s. This prx was added in 3.00 way before the actual UMD Emulator (np9660.prx) was added in 3.50 which was even quite a while before it was actually officially enabled. It was unofficially enabled beforehand under M33 CFWs as the NP9660 No-UMD ISO Loader.

From scePspNpDrm_driver:

  • 0x17E3F4BB sceNpDrmVerifyAct
  • 0x37B9B10D sceNpDrmVerifyRif
  • 0x00AD67F8 sceNpDrmGetFixedKey
  • 0x5667B7B9 sceNpDrmGetContentKey
  • 0xD36B4E6D sceNpDrmGetModuleKey
  • 0x0F9547E6 sceNpDrmGetVersionKey (incorrectly listed as scePspNpDrmInitFromGameIdMs4 on the libdocs)
  • 0xA1336091 sceNpDrmSetLicenseeKey
  • 0x9B745542 sceNpDrmClearLicenseeKey
  • 0x275987D1 sceNpDrmRenameCheck
  • 0x08D98894 sceNpDrmEdataSetupKey
  • 0x219EF5CC sceNpDrmEdataGetDataSize

VSH System Config
The vshRegSysconf lib was previously under the sceVshCommonUtil_Module upto 1.50. From 2.00 the lib was moved to the the vsh_module.

From vshmain:

  • 0x03BB4503 vshRegSysconfGetCharacterSetOem
  • 0x67BFD9C0 vshRegSysconfSetCharacterSetOem
  • 0x0FE13026 vshRegSysconfGetCharacterSetAnsi
  • 0x032D663E vshRegSysconfSetCharacterSetAnsi
  • 0xF859FC3C vshRegSysconfGetThemeSystemColor
  • 0xEE3D8305 vshRegSysconfSetThemeSystemColor

Note: I have yet to add these new NID’s to the libdoc site. I will do so when I get some spare time.