Editing PSCode

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
[[Category:Software]]<noinclude>[[Category:Main]]</noinclude>
[[Category:Software]]<noinclude>[[Category:Main]]</noinclude>


The PSCode is a 8 bytes code that contains console specific information. It is derived from the [[ConsoleId]].
The PSCode is a 8 bytes code that contains console specific information like Region or Model Type.
It is derived from the [[ConsoleId]].
Knowing PSCode we are able to deduce the 9 first Bytes of [[ConsoleId]].
What information this stores is almost completely known (see [[ConsoleId#Structure]]).


Knowing PSCode we are able to deduce the 9 first bytes of [[ConsoleId]].
= Structure =


See [[ConsoleId#Structure]]) and [[https://github.com/CelesteBlue-dev/PS-ConsoleId-wiki PSConsoleId-wiki]].


= Structure =
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chassis Check&nbsp;&nbsp;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Chassis Revision
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&dArr;&nbsp;&nbsp;                     
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&dArr;&nbsp;&nbsp;&dArr;&nbsp;&nbsp;                     
  00000000  00 01 01 05 00 10 00 03
  00000000  00 01 01 05 00 10 00 03
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&uArr;&nbsp;&uArr;&nbsp;&nbsp;&nbsp;&uArr;&nbsp;&uArr;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&uArr;&nbsp;&uArr;&nbsp;&nbsp;&nbsp;&uArr;&nbsp;&uArr;
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Target ID&nbsp;&nbsp;&nbsp;SKU Model
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Target ID&nbsp;&nbsp;Vita Model Type
  (Internal: Product Code)&nbsp;(Internal: Product Sub Code)
  &nbsp;&nbsp;&nbsp;&nbsp;(Internal: Product Code)&nbsp;(Internal: Product Sub Code)
 
1st and 2nd bytes represent the Company Code
 
3th and 4th bytes represent the [[Product Code]]
 
5th and 6th bytes represent the [[Product Sub Code]]


7th and 8th bytes represent the [[Factory Code]]
5th and 6th bytes represent the Target ID (region code) TODO:list PSVita target id


= Usage in the OS =
7th and 8th bytes represent the [[SKU_Models|Vita SKU Model]]


== PSVita ==
9th byte: chassis check


It is get in userland by _vshSblAimgrGetPscode, _vshSblAimgrGetPscode2, and used by sceRegMgrSrvCnvRegionPsCode.
= Where is it used ? =


It is get in kernel by sceSblAimgrGetPscodeForDriver, sceSblAimgrGetPscode2ForDriver, and used by sceRegMgrSrvCnvRegionPsCodeForDriver.
It is get by GetPsCode or GetPsCode2.


It is used by non-secure kernel and userland to determine the model of the device:
It is only used by non-secure kernel to determine the model of the device:
- IsCEX, IsDEX, IsTool, IsTest
- IsCEX, IsDEX, IsTool, IsTest
- IsVita, IsDolce, IsGenuineVita, IsGenuineDolce
- IsVita, IsDolce, IsGenuineVita, IsGenuineDolce


but also in userland to detect the region by the [[TargetId]] that it embeds.
but also the region by the [[TargetId]] it embeds.
Please note that all contributions to Vita Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see Vita Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)