Detect if running on PSP-3000? (User Mode)
Detect if running on PSP-3000? (User Mode)
Is there a simple way to detect if running on a 3000? Is there a user mode way to do it because Sony mentioned new games having optimized textures for the 3000 LCD (if they can autodetect that is).
Otherwise any other method is fine.
EDIT: Never mind I forgot that sceKernelGetModel starts from 0. I thought it was returning the same for the 2000 and 3000. So kernel mode detection is no prob.
Otherwise any other method is fine.
EDIT: Never mind I forgot that sceKernelGetModel starts from 0. I thought it was returning the same for the 2000 and 3000. So kernel mode detection is no prob.
Last edited by Torch on Sat Jul 04, 2009 12:09 am, edited 4 times in total.
-
- Posts: 388
- Joined: Tue Aug 12, 2008 12:46 am
I believe Chilly Willy or Davee are the people to ask here :-)Torch wrote:Those are unprofessional methods. I want something clean.
The games cannot read flash0 to detect anything.
Perhaps pop J.F a PM if he hasn't spotted this thread yet.
Although I'm sure you could set both the PSP 1000 and 2000 as per normal but then you could have an else scenario.
Probably not the best solution but it most probably would work.
-
- Posts: 388
- Joined: Tue Aug 12, 2008 12:46 am
Could it be a default module that's loaded when umd, or Sony games are running that determine what model the psp is? In 5.00 umdman.prx, sceIdStorage_driver_6FE062D1 is being use. I dont know if thats any help to you or not.
When I get some more spare time, ill look into it.
When I get some more spare time, ill look into it.
PSHN - Playstation Hacking Network
PSX/PS1 - HACK - Game Shark
PS2 - HACK - Swap
PSP - HACK - Pandora
PS3 - ?
PSX/PS1 - HACK - Game Shark
PS2 - HACK - Swap
PSP - HACK - Pandora
PS3 - ?
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am
some month ago i have made a pspident clone here is the code of the prx kernel module and the user program
kinfo.c
pspinfo.c
interpretation of baryon,tachyon and pommel
PSP-100x
========
TA-079v1 Tachyon: 0x00140000, Baryon: 0x00030600, Pommel: 0x00000103
TA-079v2 Tachyon: 0x00200000, Baryon: 0x00030600, Pommel: 0x00000103
TA-079v3 Tachyon: 0x00200000, Baryon: 0x00040600, Pommel: 0x00000103
TA-081 Tachyon: 0x00300000, Baryon: 0x00040600, Pommel: 0x00000103/0x00000104
TA-082 Tachyon: 0x00400000, Baryon: 0x00114000, Pommel: 0x00000112
TA-086 Tachyon: 0x00400000, Baryon: 0x00121000, Pommel: 0x00000112
PSP-200x
========
TA-085 Tachyon: 0x00500000, Baryon: 0x0022B200, Pommel: 0x00000123
TA-085v2 Tachyon: 0x00500000, Baryon: 0x00234000, Pommel: 0x00000123
TA-088v1 Tachyon: 0x00500000, Baryon: 0x00243000, Pommel: 0x00000123
TA-088v2 Tachyon: 0x00500000, Baryon: 0x00243000, Pommel: 0x00000123
TA-088v3 Tachyon: 0x00600000, Baryon: 0x00243000, Pommel: 0x00000123
TA-090v1 Tachyon: 0x00500000, Baryon: 0x00263100, Pommel: 0x00000132
PSP-300x
========
TA-090v2 Tachyon: 0x00600000, Baryon: 0x00263100, Pommel: 0x00000132
so based of the tachyon baryon and pommel you can determine if you are running
with a psp 3000 and execute specific code for it
kinfo.c
Code: Select all
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspidstorage.h>
#include <pspsysreg.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
PSP_MODULE_INFO("kinfo", 0x1006, 2, 0);
//Get Fuse Id
u64 sceSysreg_driver_4F46EEDE();
int sceSyscon_driver_7EC5A957(u32 *baryon);
u32 sceSyscon_driver_E7E87741(u32 *pommel);
u32 sceSysreg_driver_E2A5D1EE(void);
int ReadKey(int key, char *buffer)
{
int err;
u32 k1;
k1 = pspSdkSetK1(0);
memset(buffer, 0, 512);
err = sceIdStorageReadLeaf(key, buffer);
pspSdkSetK1(k1);
return err;
}
int WriteKey(int key, char *buffer)
{
int err;
u32 k1;
k1 = pspSdkSetK1(0);
err = sceIdStorageWriteLeaf(key, buffer);
sceIdStorageFlush();
pspSdkSetK1(k1);
return err;
}
void GetMoboInfo(int* baryon, int* tachyon,int *pommel)
{
u32 by, ty, po;
int k;
k = pspSdkSetK1(0);
ty = sceSysreg_driver_E2A5D1EE();
sceSyscon_driver_E7E87741(&po);
sceSyscon_driver_7EC5A957(&by);
pspSdkSetK1(k);
(*baryon) = by;
(*tachyon) = ty;
(*pommel) = po;
}
u64 GetFuseId()
{
u64 fuseId = sceSysreg_driver_4F46EEDE();
return fuseId;
}
u32 pspGetKirkVersion(void)
{
int k1 = pspSdkSetK1(0);
int ver, i = 0, val = *(u32 *)0xBDE00004;
sceSysregKirkBusClockEnable();
do {
i++;
sceKernelDelayThread(1000);
ver = *(u32 *)0xBDE00004;
} while ((ver == val) && (i < 10));
pspSdkSetK1(k1);
return ver;
}
u32 pspGetSpockVersion(void)
{
int k1 = pspSdkSetK1(0);
int ver, i = 0, val = *(u32 *)0xBDF00004;
sceSysregAtaBusClockEnable();
do {
i++;
sceKernelDelayThread(1000);
ver = *(u32 *)0xBDF00004;
} while ((ver == val) && (i < 10));
pspSdkSetK1(k1);
return ver;
}
int module_start(SceSize args, void *argp)
{
return 0;
}
int module_stop()
{
return 0;
}
Code: Select all
#include <pspsdk.h>
#include <pspkernel.h>
#include <pspdebug.h>
#include <pspmoduleinfo.h>
#include <kubridge.h>
#include "kinfo.h"
// #include "kernel.h"
#define printf pspDebugScreenPrintf
/* Define the module info section */
PSP_MODULE_INFO("info", 0, 1, 0);
PSP_MAIN_THREAD_ATTR(PSP_THREAD_ATTR_USER);
PSP_HEAP_SIZE_KB(-64);
extern int ReadKey(int key, char *buffer);
extern int WriteKey(int key, char *buffer);
extern void GetMoboInfo(int* baryon, int* tachyon, int *pommel);
extern u64 GetFuseId();
int get_psp_info(int pbar,int ptac,int ppom)
{
int i = 0;
while (p_info[i].bar != 0)
{
if (p_info[i].bar == pbar && p_info[i].tac == ptac && p_info[i].pom == ppom)
return i;
i++;
}
return -1;
}
int main(int argc, char *argv[])
{
int i;
pspDebugScreenInit();
int r = kuKernelLoadModule("kinfo.prx",0,NULL);
if (r < 0)
{
printf( "Error 0x%08X loading/starting kinfo.prx.\n", r);
sceKernelDelayThread(7000000);
}
sceKernelStartModule(r, 0, NULL, 0, NULL);
printf("====================================================================");
printf("PSPINFO made by sauron_le_noir (based on samples made by jas0nuk)\n");
printf("====================================================================\n\n");
int bar,tac,pom,index;
GetMoboInfo(&bar,&tac,&pom);
printf("baryon : %x \n",bar);
printf("Tachyon : %x\n",tac);
printf("Pommel : %x\n",pom);
index = get_psp_info(bar,tac,pom);
if (index != -1)
{
printf("Type psp : %s\n",p_info[index].psp_type);
printf("Motherboard: %s\n",p_info[index].type_board);
}
else printf("unkown psp\n");
printf("Fuseid : %#llx\n",GetFuseId());
char wifi_module_mac[512];
ReadKey(0x44, wifi_module_mac);
printf("Mac : ");
for(i=0;i<6;i++)
printf("%02X:",wifi_module_mac[i]);
printf("\n");
unsigned char *kirk;
unsigned char *spock;
unsigned int kirk_int;
unsigned int spock_int;
kirk_int = pspGetKirkVersion();
spock_int = pspGetSpockVersion();
kirk = (unsigned char *)&kirk_int;
spock = (unsigned char *)&spock_int;
printf("Kirk : %c%c%c%c\n", kirk[3], kirk[2], kirk[1], kirk[0]);
printf("Spock : %c%c%c%c\n", spock[3], spock[2], spock[1], spock[0]);
printf("\n");
printf("Press X to quit\n\n");
printf("====================================================================");
SceCtrlData pad;
sceCtrlSetSamplingCycle(0);
sceCtrlSetSamplingMode(PSP_CTRL_MODE_ANALOG);
for(;;)
{
sceCtrlReadBufferPositive(&pad, 1);
if (pad.Buttons != 0)
{
if (pad.Buttons & PSP_CTRL_CROSS)
sceKernelExitGame();
}
}
return 0;
}
PSP-100x
========
TA-079v1 Tachyon: 0x00140000, Baryon: 0x00030600, Pommel: 0x00000103
TA-079v2 Tachyon: 0x00200000, Baryon: 0x00030600, Pommel: 0x00000103
TA-079v3 Tachyon: 0x00200000, Baryon: 0x00040600, Pommel: 0x00000103
TA-081 Tachyon: 0x00300000, Baryon: 0x00040600, Pommel: 0x00000103/0x00000104
TA-082 Tachyon: 0x00400000, Baryon: 0x00114000, Pommel: 0x00000112
TA-086 Tachyon: 0x00400000, Baryon: 0x00121000, Pommel: 0x00000112
PSP-200x
========
TA-085 Tachyon: 0x00500000, Baryon: 0x0022B200, Pommel: 0x00000123
TA-085v2 Tachyon: 0x00500000, Baryon: 0x00234000, Pommel: 0x00000123
TA-088v1 Tachyon: 0x00500000, Baryon: 0x00243000, Pommel: 0x00000123
TA-088v2 Tachyon: 0x00500000, Baryon: 0x00243000, Pommel: 0x00000123
TA-088v3 Tachyon: 0x00600000, Baryon: 0x00243000, Pommel: 0x00000123
TA-090v1 Tachyon: 0x00500000, Baryon: 0x00263100, Pommel: 0x00000132
PSP-300x
========
TA-090v2 Tachyon: 0x00600000, Baryon: 0x00263100, Pommel: 0x00000132
so based of the tachyon baryon and pommel you can determine if you are running
with a psp 3000 and execute specific code for it
I know, I wanted to know if it was possible without kubridge from purely user mode. Since they mentioned new games taking advantage of the 3000 wide color range. If it was automatically enabled then there should be a way. Otherwise it would just be a manual setting we need to change in the game.Davee wrote:kuKernelGetModel should work. It's something supported by all 3000.Torch wrote:Thats useful code, but I'm wondering if there is a pure user mode way to detect.
I just need basic phat/slim/3k detection. sceKernelGetModel works fine for kernel mode.
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am