uOFW
Reverse engineered PSP kernel 6.60.
Loading...
Searching...
No Matches
openpsid_kernel.h
1/* Copyright (C) The uOFW team
2 See the file COPYING for copying permission.
3*/
4
5#ifndef OPENPSID_KERNEL_H
6#define OPENPSID_KERNEL_H
7
8#include "common_header.h"
9
10/* Values (PSP product code/sub code, SceConsoleId, ScePsCode) taken from: https://github.com/CelesteBlue-dev/PS-ConsoleId-wiki/blob/master/PS-ConsoleId-wiki.txt */
11
12#define SCE_PSP_PRODUCT_CODE_TEST_PROTOTYPE_TEST_UNIT 0x00 /* Prototype / Test unit - also known as "Kicho & Dencho" */
13#define SCE_PSP_PRODUCT_CODE_TOOL_DEVKIT_TOOL_UNIT 0x01 /* Devkit / Development Tool - DEM-1000 & test unit DTP-T1000 */
14#define SCE_PSP_PRODUCT_CODE_DEX_TEST_KIT 0x02 /* TestKit / Testing Kit - Testing Tool DTP-H1500 */
15#define SCE_PSP_PRODUCT_CODE_CEX_JAPAN 0x03 /* Retail Japan */
16#define SCE_PSP_PRODUCT_CODE_CEX_NORTH_AMERICA 0x04 /* Retail North America */
17#define SCE_PSP_PRODUCT_CODE_CEX_EUROPE_MIDDLE_EAST_AFRICA 0x05 /* Retail Europe/Middle East/Africa */
18#define SCE_PSP_PRODUCT_CODE_CEX_KOREA 0x06 /* Retail South Korea */
19#define SCE_PSP_PRODUCT_CODE_CEX_UNITED_KINGDOM 0x07 /* Retail Great Britain/United Kingdom */
20#define SCE_PSP_PRODUCT_CODE_CEX_MEXICO_LATIN_AMERICA 0x08 /* Retail Mexico/Latin America */
21#define SCE_PSP_PRODUCT_CODE_CEX_AUSTRALIA_NEW_ZEALAND 0x09 /* Retail Australia/New Zealand */
22#define SCE_PSP_PRODUCT_CODE_CEX_HONGKONG_SINGAPORE 0x0A /* Retail Hong Kong/Singapore */
23#define SCE_PSP_PRODUCT_CODE_CEX_TAIWAN 0x0B /* Retail Taiwan */
24#define SCE_PSP_PRODUCT_CODE_CEX_RUSSIA 0x0C /* Retail Russia */
25#define SCE_PSP_PRODUCT_CODE_CEX_CHINA 0x0D /* Retail China */
26
27#define SCE_PSP_PRODUCT_SUB_CODE_TA_079_TA_081 0x01 /* PSP-10XX 01g */
28#define SCE_PSP_PRODUCT_SUB_CODE_TA_082_TA_086 0x02 /* PSP-10XX 01g */
29#define SCE_PSP_PRODUCT_SUB_CODE_TA_085_TA_088 0x03 /* PSP-20XX 02g */
30#define SCE_PSP_PRODUCT_SUB_CODE_TA_090_TA_092 0x04 /* PSP-30XX 03g */
31#define SCE_PSP_PRODUCT_SUB_CODE_TA_091 0x05 /* PSP-N10XX 05g */
32#define SCE_PSP_PRODUCT_SUB_CODE_TA_093 0x06 /* PSP-30XX 04g */
33#define SCE_PSP_PRODUCT_SUB_CODE_TA_094 0x07 /* PSP-N10XX 05g - prototype only */
34#define SCE_PSP_PRODUCT_SUB_CODE_TA_095 0x08 /* PSP-30XX 07g & 09g */
35#define SCE_PSP_PRODUCT_SUB_CODE_TA_096_TA_097 0x09 /* PSP-E10XX 11g */
36
37/*
38 * Specifies if the PSP's factory code is set to diagnosis (i.e. Japan Diagnosis Center 1).
39 * In this case, the PsFlags can be obtained by using the CHKREG module.
40 */
41#define SCE_PSP_FACTORY_CODE_DIAG 35
42
52typedef struct {
53 /* Unknown. On retail set to 0. */
54 u16 unk0; // 0
55 /* Company code. Set to 1. */
56 u16 companyCode; // 2
57 /* Product code. One of SCE_PSP_PRODUCT_CODE_*. */
58 u16 productCode; // 4
59 /* Product sub code. One of SCE_PSP_PRODUCT_SUB_CODE_*. */
60 u16 productSubCode; // 6
61 /* Upper two bit of PsFlags. */
62 u8 psFlagsMajor : 2; // 8
63 /* Factory code. */
64 u8 factoryCode : 6; // 8
65 u8 serialNoMajor : 2; // 9
66 /* Lower six bit of the PsFlags. Contain the QA flag, if set. */
67 u8 psFlagsMinor : 6; // 9
68 u16 searialNoMinor; // 10
69 u32 randomStamp; // 12
70} SceConsoleId; // size = 16
71
72#endif // OPENPSID_KERNEL_H
Definition openpsid_kernel.h:52