3.52 systimer.prx and prxtool

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

3.52 systimer.prx and prxtool

Post by ab5000 »

hi.
when i disassemble 3.52 systimer.prx with prxtool (built yesterday from svn) I don't got sceSTimerAlloc! Also, the .text section doesn't start with module_start or a function, but with pure mips code! in this module (and also in other modules) there is a strange function, which simply returns. the strange fact is that those functions contain data (also ascii strings) interpreted as MIPS assembly! like this:

Code: Select all

	0x00000A3C: 0x00000A08 '....' - Unknown    
	0x00000A40: 0x00000000 '....' - nop        
	0x00000A44: 0x65746E49 'Inte' - Unknown    
	0x00000A48: 0x70757272 'rrup' - Unknown    
	0x00000A4C: 0x6E614D74 'tMan' - Unknown    
	0x00000A50: 0x72656761 'ager' - Unknown    
	0x00000A54: 0x4B726F46 'ForK' - Unknown    
	0x00000A58: 0x656E7265 'erne' - Unknown    
	0x00000A5C: 0x0000006C 'l...' - Unknown    
	0x00000A60: 0x00000000 '....' - nop        
	0x00000A64: 0x53656373 'sceS' - beql       $k1, $a1, loc_00019834
	0x00000A68: 0x65707375 'uspe' - Unknown    
	0x00000A6C: 0x6F46646E 'ndFo' - vsge.s     S323, S103, S122
	0x00000A70: 0x72654B72 'rKer' - Unknown    
	0x00000A74: 0x006C656E 'nel.' - Unknown    
	0x00000A78: 0xD3744BE0 '.Kt.' - Unknown    
	0x00000A7C: 0x2F064FA6 '.O./' - sltiu      $a2, $t8, 20390
	0x00000A80: 0xF01D73A7 '.s..' - vmmul.p    E103, M432, M710
	0x00000A84: 0x11B97506 '.u..' - beq        $t5, $t9, loc_0001DEA0
can someone explain this to me?

thanks in advance.
J.F.
Posts: 2906
Joined: Sun Feb 22, 2004 11:41 am

Post by J.F. »

Most assembly code has embedded data of some sort in it. The smarter the disassembly program, the better it is at finding embedded data and NOT showing it as code. Prxtool is pretty simple, and just shows all the data as hex, ascii, and code, leaving you to sort out the real code from the data.

Disassembling code is more than running a tool and getting perfect code back. This is were you as the programmer use that thing called a brain to figure out what is going on.
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

prxtool wont display everything as disasm and hex. It only disassembles (unless you force it) the .text sections. Seems that prx has the module info/imports rammed into the .text section which is what causes the data to be disassembled.

As for missing sceSTimerAlloc, that is probably a bug in the annotation code. I probably never say an exported function at address 0 (it is the start of the code) so never saw the bug :) I doubt I can be arsed to fit it tbh :P
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

TyRaNiD wrote:prxtool wont display everything as disasm and hex. It only disassembles (unless you force it) the .text sections. Seems that prx has the module info/imports rammed into the .text section which is what causes the data to be disassembled.

As for missing sceSTimerAlloc, that is probably a bug in the annotation code. I probably never say an exported function at address 0 (it is the start of the code) so never saw the bug :) I doubt I can be arsed to fit it tbh :P
so, the pure mips code before the first exported funtion is the code of sceSTimerAlloc?
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

yah, if you do prxtool -f systimer.prx then the addresses of the functions is in the [], the alloc function is at address 0.
ab5000
Posts: 74
Joined: Tue May 06, 2008 2:37 am

Post by ab5000 »

TyRaNiD wrote:yah, if you do prxtool -f systimer.prx then the addresses of the functions is in the [], the alloc function is at address 0.
ok, perfect. thanks a lot!
Post Reply