mirror of
https://github.com/joel16/PSP-Everest.git
synced 2024-11-26 21:10:39 +00:00
hardwareinfo: Display QA flag
This commit is contained in:
parent
460f2bf1d1
commit
3e5760c23b
@ -7,4 +7,5 @@ namespace HardwareInfo {
|
||||
char *GetUMDFirmware(void);
|
||||
char *GetMacAddress(void);
|
||||
const char *GetModel(void);
|
||||
const char *GetQAFlag(void);
|
||||
}
|
||||
|
@ -38,7 +38,8 @@ int pspNandGetPagesPerBlock(void);
|
||||
u8 *pspGetMACAddress(u8 *buf);
|
||||
int pspReadSerial(u16 *pdata);
|
||||
int pspWriteSerial(u16* serial);
|
||||
int pspChkregGetPsCode(ScePsCode *pPsCode);
|
||||
int pspChkregGetPsCode(ScePsCode *psCode);
|
||||
int pspChkregGetPsFlags(u8 *psFlags, s32 index);
|
||||
int pspSysconBatteryGetElec(int *elec);
|
||||
int pspSysconBatteryGetTotalElec(int *elec);
|
||||
int pspGetModel(void);
|
||||
|
@ -138,4 +138,15 @@ namespace HardwareInfo {
|
||||
const char *models[] = { "PSP Fat", "PSP Slim", "PSP Brite", "PSP Brite", "PSPgo", "-", "PSP Brite", "-", "PSP Brite", "-", "PSP Street" };
|
||||
return models[psp_model];
|
||||
}
|
||||
|
||||
const char *GetQAFlag(void) {
|
||||
u8 ps_flags = 0;
|
||||
int ret = pspChkregGetPsFlags(&ps_flags, 0);
|
||||
|
||||
if (ret < 0) {
|
||||
return "-";
|
||||
}
|
||||
|
||||
return ps_flags == 0x00000001? "0x00000001" : "0x00000002";
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ s32 tachyon = 0, baryon = 0, pommel = 0, polestar = 0;
|
||||
|
||||
namespace Menus {
|
||||
static constexpr u8 NUM_DEL_ITEMS_MAIN = 5;
|
||||
static constexpr u8 NUM_DEL_ITEMS_HARDWARE = 19;
|
||||
static constexpr u8 NUM_DEL_ITEMS_HARDWARE = 20;
|
||||
static constexpr u8 NUM_DEL_ITEMS_BATTERY = 14;
|
||||
static constexpr u8 NUM_DEL_ITEMS_SYSTEM = 7;
|
||||
static constexpr u8 NUM_DEL_ITEMS_CONSOLEID = 8;
|
||||
@ -113,6 +113,7 @@ namespace Menus {
|
||||
text_hardware[16] = GUI::Printf(250, 160, trans->hardware.initialfw, initial_fw);
|
||||
text_hardware[17] = GUI::Printf(250, 180, trans->hardware.umdfw, psp_model == 4 ? "-" : HardwareInfo::GetUMDFirmware());
|
||||
text_hardware[18] = GUI::Printf(250, 200, trans->hardware.nandsize, (pspNandGetPageSize() * pspNandGetPagesPerBlock() * pspNandGetTotalBlocks()) / 1024 / 1024);
|
||||
text_hardware[19] = GUI::Printf(250, 220, "QA Flag: %s", HardwareInfo::GetQAFlag());
|
||||
|
||||
GUI::SetBottomDialog(0, 1, Menus::HardwareInfoHandler, 1);
|
||||
GUI::SetFade();
|
||||
|
@ -124,6 +124,22 @@ namespace SystemInfo {
|
||||
return "ME";
|
||||
}
|
||||
}
|
||||
else if (devkit == 0x06060110) {
|
||||
if (static_cast<u32>(sctrlHENGetMinorVersion()) != 0x8002013A) {
|
||||
if (hen_version == 0x00001001) {
|
||||
return "PRO";
|
||||
}
|
||||
else if (hen_version == 0x00001002) {
|
||||
return "PRO-B";
|
||||
}
|
||||
else if (hen_version == 0x00001003) {
|
||||
return "PRO-C";
|
||||
}
|
||||
}
|
||||
else if (hen_version == 0x00001000) {
|
||||
return "ME";
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
@ -23,6 +23,7 @@ PSP_BEGIN_EXPORTS
|
||||
PSP_EXPORT_FUNC_HASH(pspWriteSerial)
|
||||
PSP_EXPORT_FUNC_HASH(pspReadSerial)
|
||||
PSP_EXPORT_FUNC_HASH(pspChkregGetPsCode)
|
||||
PSP_EXPORT_FUNC_HASH(pspChkregGetPsFlags)
|
||||
PSP_EXPORT_FUNC_HASH(pspSysconBatteryGetElec)
|
||||
PSP_EXPORT_FUNC_HASH(pspSysconBatteryGetTotalElec)
|
||||
PSP_EXPORT_FUNC_HASH(pspGetModel)
|
||||
|
@ -7,5 +7,6 @@
|
||||
STUB_END
|
||||
|
||||
STUB_START "sceChkreg_driver",0x00090000,0x00010005
|
||||
STUB_FUNC 0x59F8491D,sceChkreg_driver_59F8491D
|
||||
STUB_FUNC 0x59F8491D,sceChkregGetPsCode
|
||||
STUB_FUNC 0x6894A027,sceChkregGetPsFlags
|
||||
STUB_END
|
||||
|
@ -27,7 +27,8 @@ u32 sceSysconCmdExec(void *param, int unk);
|
||||
int sceSysconBatteryGetElec(int *elec);
|
||||
int sceSyscon_driver_4C539345(int *elec); // sceSysconBatteryGetTotalElec
|
||||
static int (*sceUtilsBufferCopyWithRange)(u8 *outbuff, int outsize, u8 *inbuff, int insize, int cmd);
|
||||
s32 sceChkreg_driver_59F8491D(ScePsCode *pPsCode);
|
||||
s32 sceChkregGetPsCode(ScePsCode *pPsCode);
|
||||
s32 sceChkregGetPsFlags(u8 *pPsFlags, s32 index);
|
||||
|
||||
static int _sceUtilsBufferCopyWithRange(u8 *outbuff, int outsize, u8 *inbuff, int insize, int cmd) {
|
||||
return (*sceUtilsBufferCopyWithRange)(outbuff, outsize, inbuff, insize, cmd);
|
||||
@ -295,9 +296,16 @@ int pspReadSerial(u16 *pdata) {
|
||||
return err;
|
||||
}
|
||||
|
||||
int pspChkregGetPsCode(ScePsCode *pPsCode) {
|
||||
int pspChkregGetPsCode(ScePsCode *psCode) {
|
||||
int k1 = pspSdkSetK1(0);
|
||||
int ret = sceChkreg_driver_59F8491D(pPsCode);
|
||||
int ret = sceChkregGetPsCode(psCode);
|
||||
pspSdkSetK1(k1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int pspChkregGetPsFlags(u8 *psFlags, s32 index) {
|
||||
int k1 = pspSdkSetK1(0);
|
||||
int ret = sceChkregGetPsFlags(psFlags, index);
|
||||
pspSdkSetK1(k1);
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user