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 

PRXTool HTML disassembly

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



Joined: 18 Jan 2004
Posts: 919

PostPosted: Mon Dec 11, 2006 1:24 am    Post subject: PRXTool HTML disassembly Reply with quote

I've just added HTML output mode to prxtool disassembly, it sets up all internal and external links to be anchors so you can jump around the disassembly (and if setup correctly you can even jump between modules).

You need to do a small bit of setup to get it to work correctly, especially the inter module jumps so here is a rough tutorial :)

To get it to work correctly you need to do a few things. First generate a new libdoc xml file for your firmware you are interested in using say:

prxtool -n psplibdoc.xml -x -s x ~/flash0_decypted/v3.02/kd/*.prx ~/flash0_decypted/v3.02/vsh/module/*.prx > 3.02.xml

This sets up the dependancy map. Now use this for your disassembly:

prxtool -n 3.02.xml --disasm --disopts wdx --xmldis --funcs functions.txt ~/flash0_decypted/v3.02/kd/*.prx ~/flash0_decypted/v3.02/vsh/module/*.prx

That should output a html file for each prx in your current directory. The only real problem with this is size, something like paf weighs in at around 50megs! Admittedly that isn't that different from a raw text dump but text editors generally can handle it better than webbrowser seem to. To access the inter module links you must first click on the link to the stub, then in the stubs header there should be an "Imported from xxxx.prx" line with the prx bit linked. Click this and it will take you to the linked module file if it exists.

Seems something like links is best to view (unless you have an absolute beast of a machine), still YMMV.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Mon Dec 11, 2006 6:51 pm    Post subject: Reply with quote

oh great it may help me a lot :)))

I was using PSPINSIDE and pspdev.ofcode.com to find out what I was interested for.

If I understand well, your tutorial gives the same result in less effort so I can concentrate on the parts i'm interested with ?
Back to top
View user's profile Send private message
FreePlay



Joined: 04 Jan 2006
Posts: 71
Location: Schenectady, New York, USA

PostPosted: Mon Dec 11, 2006 11:49 pm    Post subject: Reply with quote

Ooh, very nice :) Should be of great use to me as I re-teach myself MIPS and learn how to apply it here.
Back to top
View user's profile Send private message
adrahil



Joined: 16 Mar 2006
Posts: 277

PostPosted: Tue Dec 12, 2006 4:19 am    Post subject: Reply with quote

thanks Ty!!!!!
I LOVE YOU XDDDDDDDD
Back to top
View user's profile Send private message
zshadow



Joined: 26 Dec 2005
Posts: 42

PostPosted: Tue Dec 12, 2006 3:31 pm    Post subject: Reply with quote

nice work!

:)
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Wed Jan 03, 2007 11:28 am    Post subject: Reply with quote

oh well, there is a bemol :((((

Code:

   mtv
   viim.s
   vi2f.q
   vi2f.t
   vmmov.p


as you can see disassembly of vfpu instructions are very incomplete :(


Last edited by hlide on Sun Jan 07, 2007 11:58 am; edited 1 time in total
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Sat Jan 06, 2007 11:38 pm    Post subject: Reply with quote

i got the svn version but i'm really pissed off :
Quote:

hli@HLIWORLD /d/game console/psp/src/prxtool$ ./bootstrap
.
sed: -e expression #3, char 19: Unterminated `s' command
/usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AUTOOPTS
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
configure.ac: installing `./install-sh'
configure.ac: installing `./missing'
Makefile.am: installing `./depcomp'
configure.ac:8: error: possibly undefined macro: AC_PRXTOOL_VERSION
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.


I'm adding the missing decoding code for the non decoded vfpu instructions.
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 919

PostPosted: Sun Jan 07, 2007 12:22 am    Post subject: Reply with quote

As with alot of things related to autoconf/automake it is probably an issue with versions, I have 1.9.5 and 2.59 on my machine.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Sun Jan 07, 2007 2:50 am    Post subject: Reply with quote

well, i made a project under VS.Net 2003 and modify some files to make it compile. I'm adding missing VFPU insn decoding.

normally interesting changes are only done in disasm.C (renamed as disasm.cpp) so I expect to give you this file when finished so you can decide how to integrate them in the svn version.


Last edited by hlide on Sun Jan 07, 2007 2:58 am; edited 1 time in total
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 919

PostPosted: Sun Jan 07, 2007 2:53 am    Post subject: Reply with quote

Okay, tbh though I have never found the burning desire to finish the VFPU stuff, not many kernel modules actually use vfpu and when they do it is almost always just a saving context kinda thing. However it will be nice to have a finished disasm, you might also want to check that the existing stuff is actually correct as some of it was a quick hack :P
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Sun Jan 07, 2007 7:13 am    Post subject: Reply with quote

ok i think prxtool can decode all vfpu instructions.

http://hlide.free.fr/download/PSP/prxtool/disasm.cpp
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 919

PostPosted: Sun Jan 07, 2007 7:26 am    Post subject: Reply with quote

Great thx, i've committed it to subversion.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Sun Jan 07, 2007 7:41 am    Post subject: Reply with quote

TyRaNiD wrote:
Great thx, i've committed it to subversion.


huh... without testing it !?

i hope it can still compile under linux and cygwin.

otherwise, i realise the XML part is not finished and i don't know exactly what we produce exactly as tag. I fear some regression !!!
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Sun Jan 07, 2007 7:48 am    Post subject: Reply with quote

oh well i'll try to fix the xml part and deliver a new version - the final one.
Back to top
View user's profile Send private message
hlide



Joined: 10 Sep 2006
Posts: 753

PostPosted: Sun Jan 07, 2007 8:48 am    Post subject: Reply with quote

ok i fix the xml part so the xml output should be okay too (at least i hope so because i didn't test it in xml output).

http://hlide.free.fr/download/PSP/prxtool/disasm.cpp
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