How to retrieve the firmware version string
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am
How to retrieve the firmware version string
I know 2 methods to retrieve the firmware version
1> read in flash0 flash0:/vsh/etc/version.txt
2> use isceKernelDevkitVersion(void);
but all this 2methode don't return me if it is a 5.3 5.3M33 5.3HEN etc ...
what i need is the string that appears in the vhs system information
is it in memory and if yes where ? and how to retrieve it ?
1> read in flash0 flash0:/vsh/etc/version.txt
2> use isceKernelDevkitVersion(void);
but all this 2methode don't return me if it is a 5.3 5.3M33 5.3HEN etc ...
what i need is the string that appears in the vhs system information
is it in memory and if yes where ? and how to retrieve it ?
-
- Posts: 388
- Joined: Tue Aug 12, 2008 12:46 am
The firmware is in a number form. So to get that number into a string, you have to get 3 parts from it. For example, the number may be 01050010 which could stand for 1.50. 01 05 00 are the main ones we are looking for. 05000000 could stand for 5.00. Take a look in the source code of the 3.xx to get a code to convert that firmware version into a string.
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am
i know that what i want is the string present in the vhs menu i try to understand the version and mac spool code of davee but i have some difficulties to understand what is is doing
_sw(0x3C020000 | ((int)ver_info >> 16), mod->text_addr + sysconfPatches.sysconf_ver);
_sw(0x34420000 | ((int)ver_info & 0xFFFF), mod->text_addr + sysconfPatches.sysconf_ver + 4);
_sw(val,adrs) store a word at adrs (thx to corry to explain me that)
mod->text_addr ???? he is using a plugins to perform this what is the equivalent
for a kernel prx ?
ver_info is a pointer to version string
so what is the base adresse for a kernel prx that i must use to read the string version
_sw(0x3C020000 | ((int)ver_info >> 16), mod->text_addr + sysconfPatches.sysconf_ver);
_sw(0x34420000 | ((int)ver_info & 0xFFFF), mod->text_addr + sysconfPatches.sysconf_ver + 4);
_sw(val,adrs) store a word at adrs (thx to corry to explain me that)
mod->text_addr ???? he is using a plugins to perform this what is the equivalent
for a kernel prx ?
ver_info is a pointer to version string
so what is the base adresse for a kernel prx that i must use to read the string version
Last edited by sauron_le_noir on Wed Jun 10, 2009 7:29 am, edited 2 times in total.
-
- Posts: 388
- Joined: Tue Aug 12, 2008 12:46 am
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am
-
- Posts: 388
- Joined: Tue Aug 12, 2008 12:46 am
Here is a code to make the psp firmware a string from sceKernelDevkitVersion()
This was copy from the 3.XXOE Open Source. Example
Code: Select all
char *getVersion(int x)
{
static char ver[5], hex[9];
sprintf(hex, "%08X", x);
ver[0]=hex[1];
ver[1]='.';
ver[2]=hex[3];
ver[3]=hex[5];
ver[4]='\0';
return ver;
}
Code: Select all
#include <stdio.h>
#include <pspkernel.h>
#include <pspdebug.h>
PSP_MODULE_INFO("fw-str", 0, 1, 1);
#define printf pspDebugScreenPrintf
char *getVersion(int x)
{
static char ver[5], hex[9];
sprintf(hex, "%08X", x);
ver[0]=hex[1];
ver[1]='.';
ver[2]=hex[3];
ver[3]=hex[5];
ver[4]='\0';
return ver;
}
int main(int argc, char *argv[]){
pspDebugScreenInit();
printf("PSP Current Firmware: %s\n", getVersion(sceKernelDevkitVersion()));
return 1;
}
-
- Posts: 388
- Joined: Tue Aug 12, 2008 12:46 am
-
- Posts: 203
- Joined: Sat Jul 05, 2008 8:03 am