Advertising (This ad goes away for registered users. You can Login or Register)

sceKernelDevkitVersion() issues

Forum rules
Forum rule Nº 15 is strictly enforced in this subforum.
dj51_Shura
Posts: 36
Joined: Thu Jun 16, 2011 7:35 pm
Location: Granada, Spain
Contact:

sceKernelDevkitVersion() issues

Post by dj51_Shura » Wed Jul 13, 2011 4:16 pm

Hello! I'm bored so I started to work with this function. But, I have a question.

This function returns the hexadecimal final part of the encrypted index.dat of flash, but, how can I work with the long received?

It's like this: 0x01050200 (for firmware 1.52)

My idea is to have a collection of all (^^) the hexadecimal values, can obtain it (info from ps2dev.org):

Code: Select all

release:[color=#0000FF]1.52[/color]: 
build:555,0,3,1,0:root@psp-vsh 
system:23740@release_152,[color=#FF0000]0x01050200[/color]: 
vsh:p4421@release_152,v13394@release_152,20050525: 
Dump all (>.<) PSP firmwares and read each value? Oh my god... xD... anybody haves a 'collection', or an URL or...

It's so much work...

Thanks!
Advertising
PSP 6.20 PRO-B7 and TN HEN E Fix firmware

http://www.mhypnok.blogspot.com

Davee
Guru
Posts: 278
Joined: Mon Jan 10, 2011 1:24 am

Re: sceKernelDevkitVersion() issues

Post by Davee » Wed Jul 13, 2011 5:52 pm

#define GET_FIRMWARE(x) ((((x >> 24) & 0xF) << 8) | (((x >> 16) & 0xF) << 4) | (((x >> 8) & 0xF) << 0))

get_firmware:
/* extract stuff */
ext $t0, $a0, 24, 4
ext $t1, $a0, 16, 4
ext $v0, $a0, 8, 4

/* yay insert stuff */
ins $v0, $t0, 8, 4
ins $v0, $t1, 4, 4

switch (get_firmware(sceKernelDevkitVersion()))
{
case 0x150:
case 0x151:
case 0x152:
case 0x200:
case 0x201:
case 0x250:
case 0x260:
//etc
}
Advertising
Follow me on twitter: @DaveeFTW

dj51_Shura
Posts: 36
Joined: Thu Jun 16, 2011 7:35 pm
Location: Granada, Spain
Contact:

Re: sceKernelDevkitVersion() issues

Post by dj51_Shura » Wed Jul 13, 2011 7:29 pm

How ... ? :shock:

I don't understand, but with the switch sentence I can make a function that returns... yeah...

Thanks Davee. And thanks for the downgrader ;-)
PSP 6.20 PRO-B7 and TN HEN E Fix firmware

http://www.mhypnok.blogspot.com

User avatar
m0skit0
Guru
Posts: 3817
Joined: Mon Sep 27, 2010 6:01 pm

Re: sceKernelDevkitVersion() issues

Post by m0skit0 » Wed Jul 13, 2011 7:44 pm

dj51_Shura wrote:I don't understand
Get a good C book and read again. A good MIPS assembly reference will do good as well. Also a decent handling of hexadecimal numbers would be nice as well.
I wanna lots of mov al,0xb
Image
"just not into this RA stuffz"

dj51_Shura
Posts: 36
Joined: Thu Jun 16, 2011 7:35 pm
Location: Granada, Spain
Contact:

Re: sceKernelDevkitVersion() issues

Post by dj51_Shura » Wed Jul 13, 2011 7:52 pm

m0skit0 wrote:
Get a good C book and read again. A good MIPS assembly reference will do good as well. Also a decent handling of hexadecimal numbers would be nice as well.
Yes, I should do it. Thanks for the references (saint Google will make the rest xD).

Best regards!!!
PSP 6.20 PRO-B7 and TN HEN E Fix firmware

http://www.mhypnok.blogspot.com

Terbaddo
Posts: 116
Joined: Mon Feb 14, 2011 3:29 pm
Location: Paris, France
Contact:

Re: sceKernelDevkitVersion() issues

Post by Terbaddo » Thu Jul 14, 2011 9:36 pm

@Davee get_firmware(sceKernelDevkitVersion()) =/= GET_FIRMWARE(sceKernelDevkitVersion()) ;)
That is not Unix. That is OSX a proprietary branch of BSD.
MixShark NGPToolChain Dev Repository Homebrew World

Punker69
Posts: 920
Joined: Sat Oct 02, 2010 2:25 am
Location: http://punker69.blogspot.com/
Contact:

Re: sceKernelDevkitVersion() issues

Post by Punker69 » Thu Jul 14, 2011 11:51 pm

Code: Select all

if(sceKernelDevkitVersion() == 0x03090010) {
                     pspDebugScreenSetTextColor(0x000000CC);
                     Printf("Your Version is 3.90");
                     pspDebugScreenSetTextColor(0x0000FFCC);
                     Printf("\nKernel Version :");
                     pspDebugScreenSetTextColor(0x000000CC);
                     Printf("0x03090010");
    pspDebugScreenSetTextColor(0x000000CC);
                     Printf("\n"); }
    else if(sceKernelDevkitVersion() == 0x04000110) {
etc......................
Here's my example :))
Mobile App Developer =)
Image

Davee
Guru
Posts: 278
Joined: Mon Jan 10, 2011 1:24 am

Re: sceKernelDevkitVersion() issues

Post by Davee » Fri Jul 15, 2011 12:30 am

Terbaddo wrote:@Davee get_firmware(sceKernelDevkitVersion()) =/= GET_FIRMWARE(sceKernelDevkitVersion()) ;)
"=/=" ?
Follow me on twitter: @DaveeFTW

TiPi
Retired Mod
Posts: 740
Joined: Tue Sep 28, 2010 5:32 am
Contact:

Re: sceKernelDevkitVersion() issues

Post by TiPi » Fri Jul 15, 2011 12:38 am

Davee wrote:
Terbaddo wrote:@Davee get_firmware(sceKernelDevkitVersion()) =/= GET_FIRMWARE(sceKernelDevkitVersion()) ;)
"=/=" ?
=/= == != ;)
Problems or questions? Feel free to contact me.
-My Blog-

Davee
Guru
Posts: 278
Joined: Mon Jan 10, 2011 1:24 am

Re: sceKernelDevkitVersion() issues

Post by Davee » Fri Jul 15, 2011 1:00 am

Ah of course! Lazy way of this '≠'.

Well, just a quick test through the emu gets this:

0x00000000: 0x3C040505 '...<' - lui $a0, 1285 (0x00000505)
0x00000004: 0x34840010 '..ä4' - ori $a0, $a0, 16 (0x00000010)
0x00000008: 0x7C881E00 '..ê|' - ext $t0, $a0, 24, 4
0x0000000C: 0x7C891C00 '..ë|' - ext $t1, $a0, 16, 4
0x00000010: 0x7C821A00 '..é|' - ext $v0, $a0, 8, 4
0x00000014: 0x7D025A04 '.Z.}' - ins $v0, $t0, 8, 4
0x00000018: 0x7D223904 '.9"}' - ins $v0, $t1, 4, 4
0x0000001C: 0x03E00008 '..Ó.' - jr $ra
0x00000020: 0x00000000 '....' - nop
Emulation Terminated, result 0x00000550

So, err. Macro is wrong?

Just checked macro too now:
0x00000000: 0x7C821E00 '..é|' - ext $v0, $a0, 24, 4
0x00000004: 0x00041B02 '....' - srl $v1, $a0 (0x05050010), 12
0x00000008: 0x306300F0 '­.c0' - andi $v1, $zr, 240
0x0000000C: 0x00021200 '....' - sll $v0, $v0 (0x00000005), 8
0x00000010: 0x00431025 '%.C.' - or $v0, $v0 (0x00000500), $v1 (0x00000050)
0x00000014: 0x7C841A00 '..ä|' - ext $a0, $a0, 8, 4
0x00000018: 0x03E00008 '..Ó.' - jr $ra
0x0000001C: 0x00441025 '%.D.' - or $v0, $v0 (0x00000550), $a0 (0x00000000)
Emulation Terminated, result 0x00000550

Never knew PSPSDK GCC handled ext.
Follow me on twitter: @DaveeFTW

Post Reply

Return to “Programming and Security”