| View previous topic :: View next topic |
| Author |
Message |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Wed Jun 10, 2009 6:40 am Post subject: 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 ? |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Wed Jun 10, 2009 7:07 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Wed Jun 10, 2009 7:23 am Post subject: |
|
|
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[i].sysconf_ver);
_sw(0x34420000 | ((int)ver_info & 0xFFFF), mod->text_addr + sysconfPatches[i].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 |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Wed Jun 10, 2009 7:25 am Post subject: |
|
|
What the fuk is "number form" _________________ If not actually, then potentially. |
|
| Back to top |
|
 |
cory1492
Joined: 10 Dec 2004 Posts: 216
|
Posted: Wed Jun 10, 2009 9:11 am Post subject: |
|
|
Do they even sell vhs with/without menus anymore?
Any particular reason why you didn't just keep asking in the same thread as before sauron_le_noir? |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Wed Jun 10, 2009 12:27 pm Post subject: |
|
|
| Art wrote: | | What the fuk is "number form" |
0x02070110
What ever you want to call it. Hex, unsigned int, I dont care. Im just in a rush because im busy |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Thu Jun 11, 2009 8:16 am Post subject: |
|
|
| no cory i just ask the question to maximize the chance to have a respons to my question see the reply on the other site ;):p:p:p:p |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Fri Jun 12, 2009 10:18 am Post subject: |
|
|
Here is a code to make the psp firmware a string from sceKernelDevkitVersion()
| Code: | 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;
} |
This was copy from the 3.XXOE Open Source. Example
| Code: |
#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;
}
|
|
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Fri Jun 12, 2009 10:21 am Post subject: |
|
|
| removed! |
|
| Back to top |
|
 |
Art
Joined: 09 Nov 2005 Posts: 647
|
Posted: Fri Jun 12, 2009 10:52 am Post subject: |
|
|
| Quote: |
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
|
_________________ If not actually, then potentially. |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Sat Jun 13, 2009 12:16 am Post subject: |
|
|
| Just get the address that has the firmwar version patch to show ether M33, GEM, TDP, or HEN, or whatever it may be. |
|
| Back to top |
|
 |
cory1492
Joined: 10 Dec 2004 Posts: 216
|
Posted: Sat Jun 13, 2009 2:33 pm Post subject: |
|
|
| Dariusc123456 wrote: | | Just get the address that has the firmwar version patch to show ether M33, GEM, TDP, or HEN, or whatever it may be. |
* while keeping in mind VSH uses unicode |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Sun Jun 14, 2009 5:47 am Post subject: |
|
|
that was the question darius a sample to retrieve the pointer of the vhs version menu. By the way i don't like function returning static variable there are not reentrant and i'm programming in c since 1988 ;)
thx corry i presume that the psp is using utf8 for the unicode encoding. |
|
| Back to top |
|
 |
|