forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PSP's FLIRT

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Griever



Joined: 20 Jun 2009
Posts: 6

PostPosted: Sat Jun 20, 2009 10:25 pm    Post subject: PSP's FLIRT Reply with quote

Speaking of executables disassembly, FLIRT technology helps a lot with, for example, PSX hacking/translation/development: you just do not need dig into the lowest procedures and code becomes more or less high-level, which is essential for code understanding. That became possible on PSX cause official PsyQ IDE used it's own c compiler with it's libraries. The only hard part here was to calculate proper checksums of each library procedure and voila - clear and understandable code from scratch.

And now for our favourite psp: I've disassembled few prx'es and eboots with tyranid's tool and with IDA - that's just a mess. I mean, pretty clear that code reads and writes somewhere, but what's the idea behind every subroutine - that's a true puzzle.

In our situation: when no debugging emulators are available, it's not possible to actually debug code and disassemblers becomes one and the only real tool to understand the code. Do psp has Sony's native IDE? (pretty sure it does, but does anybody have an idea of native library functions and their's checksums?)
Is there any way to make disassembled code more understandable, than FLIRT. Maybe I missed something in Tyranid's prxtool?
Back to top
View user's profile Send private message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Sun Jun 21, 2009 12:19 am    Post subject: Reply with quote

You might want to have a look at this: http://forums.ps2dev.org/viewtopic.php?t=11985
_________________
...sorry for my english...
Back to top
View user's profile Send private message
Griever



Joined: 20 Jun 2009
Posts: 6

PostPosted: Mon Jun 22, 2009 12:12 am    Post subject: Reply with quote

Nah, I think more like here - that's an interesting conception.
Back to top
View user's profile Send private message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Mon Jun 22, 2009 3:25 am    Post subject: Reply with quote

That's not a conception of dissassembly or anything,
it's a documentation of exports/imports and NIDs of firmware modules =)
_________________
...sorry for my english...
Back to top
View user's profile Send private message
Griever



Joined: 20 Jun 2009
Posts: 6

PostPosted: Mon Jun 22, 2009 5:41 pm    Post subject: Reply with quote

Yup, kinda unusual comparing to other platforms, but the final result looks like flirt stuff: libraries are all in different library prx'es and all xrefs to these library functions will be in IDA base after sertain exercises with tyranid's prxtool and NID tables.
Actual decompilation into c is not my point of interest: as far as I understood hnaves's decompiler (impressive thing indeed) does not reveal library names or something - just makes high level code out of low level for easier understanding of code flow, but not the program itself...
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Mon Jun 22, 2009 7:41 pm    Post subject: Reply with quote

what is interesting you is probably psplibdoc. It is a an XML file which contains NID and names of functions. PRXTOOLS can produce IDA map file and can resolve names and reference with psplibdoc.
Back to top
View user's profile Send private message
Griever



Joined: 20 Jun 2009
Posts: 6

PostPosted: Mon Jun 22, 2009 9:37 pm    Post subject: Reply with quote

That's what I meant by "certain exercises with tyranid's prxtool and NID tables". Thanks a lot.
I'm just surprised how much new code uses common psp eboot.bin... PSX's executables uses at least one library function in one inner procedure, so you can always aproximately tell what is this function about. Looks like that's not about PSP.
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Tue Jun 23, 2009 12:34 pm    Post subject: Reply with quote

hnaves's decompiler can use psplibdoc xml files directly too. Of course, psplibdoc doesn't work on firmware prx's where the NIDs have been randomized (or sodomized, whatever you call what they have been doing) - but that's pretty much the same case for prxtool too.

Code:
pspdecompiler.exe -n psplibdoc.xml -c your.prx

Will name functions just fine provided the xml has the right NIDs.

And of course, I could have missed the point of where this thread is going/has been, too.
Back to top
View user's profile Send private message
kralyk



Joined: 06 Apr 2008
Posts: 114
Location: Czech Republic, central EU

PostPosted: Wed Jun 24, 2009 12:37 am    Post subject: Reply with quote

Quote:
Of course, psplibdoc doesn't work on firmware prx's where the NIDs have been randomized (or sodomized, whatever you call what they have been doing)


Which is what firmware? 5.50?
_________________
...sorry for my english...
Back to top
View user's profile Send private message
cory1492



Joined: 10 Dec 2004
Posts: 216

PostPosted: Wed Jun 24, 2009 10:58 am    Post subject: Reply with quote

After 3.50 (if memory serves) they started randomizing certain kernel NIDs, identical user NID exports in the same prx don't change like this as games sort of... need them to work. m33 since then has had a resolver in it to use many/most old NIDs for toolchain/homebrew compatibility (though I'm not sure if the conversion has trickled down into later firmware libdoc's from silverspring, last I needed to check they hadn't.)
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group