PS3 [SOLVED] Best way to view file source code (selfs, sprx, eboots ect.)

Discussion in 'General PS3 Discussion' started by Cypher_CG89, Dec 31, 2018.

  1. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    I am looking for the best way to decrypt, de-compile and break down certain files into there source code. Mainly sprx, selfs, eboot.bins etc so I can edit them for some things I am working on.:D And also for deeper learning and understanding in the programming, what they do and how on the PS3.

    Also the best tools for the tasks, methods and any tutorials in doing so that may be out there as google isn't my friend when searching for these answers o_O:D
     
  2. 1,119
    1,117
    272
    littlebalup

    littlebalup Developer PSX-Place Supporter

    Joined:
    Oct 16, 2014
    Messages:
    1,119
    Likes Received:
    1,117
    Trophy Points:
    272
    Location:
    43°36'16.0"N 1°26'36.1"E
    Cypher_CG89 likes this.
  3. 7,843
    6,517
    647
    bguerville

    bguerville Moderator

    Joined:
    Feb 25, 2015
    Messages:
    7,843
    Likes Received:
    6,517
    Trophy Points:
    647
    Location:
    Earth
    I think you should check both the nopsn apps patching/debugging & webkit ROP tutorial threads that esc0rtd3w put together in this forum. Links to most of the tools you will need are provided there as well part of the info you are looking for.
    You could start there, check what you may still be missing or whatever, we would help you find it if we can. Just an idea..

    If ever you are new to PPC, you may want to read carefully the IBM 4-part PPC primer tutorial (IBM website, Google it). It is quite well explained & a good base to build practical knowledge on.
     
    Last edited: Dec 31, 2018
    Cypher_CG89 likes this.
  4. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    Thanks, will give these a good reading. Makes a difference from doing graphics all the time and learning something new, I have the jist of how the ps3s xml files work and what they are doing so time to move on to others things.
     
  5. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    The links for the IDA plugins zip are not working, mega has most likely removed them.

    Can you point me in the direction of where these are, I would assume they are on GitHub somewhere or tell me which one's I need and I will give ago at searching and finding them.

    EDIT: also the links for the Debugger flash files
     
    Last edited: Jan 2, 2019
  6. 7,843
    6,517
    647
    bguerville

    bguerville Moderator

    Joined:
    Feb 25, 2015
    Messages:
    7,843
    Likes Received:
    6,517
    Trophy Points:
    647
    Location:
    Earth
    Ida plugins can be obtained from kakaroto's ps3ida repo on github.
    On oct0xor github, you can also get deci3dbg to connect to ps3 if you prefer to use IDA rather than ProDG.
    IDA versions > 6.8 or 6.9 bring compatibility issues with older plugins, avoid those for running ps3 plugins in general.
    The debugger flash file archive isn't required at all.


    Some of the links provided here should still work.
    http://www.psdevwiki.com/ps3/IDA_pro_disassembler_and_debugger

    Same as before, if you have a problem getting something in particular, let us know.. ;)

    I will let esc0rtd3w know about the dead links.
     
    Last edited: Jan 2, 2019
    Cypher_CG89 likes this.
  7. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    Thanks @bguerville, got IDA sorted and all the plugins and scripts available running on IDA v6.1 Pro Advanced Edition.

    As the plugins don't work on the IDA versions you mentioned, I take it then they defo won't work on the latest version v7.0 Pro? ( I have this version also )

    escOtd3ws tuts are excellent to follow to get the basics of patching and debugging.

    Also can you point me in the right direction off some code to make and eboot for an installer that would install things to dev_flash? or even how to make an ISO for these things.

    As my main focus is graphics I have a lot of XMB mods i want to release to the scene in the next few months and don't really want to be releasing them in self install zip folders where dev_blind has to be enabled every time so its as noob friendly as possible and also looks good as an app on the xmb.

    Also do you know where I can find a coldboot animation xml, don't wan't nothing to fancy, just the orignial animation style but with custom logos as i don't think there is a tool out to extract the contents of a coldboot.raf, or i haven't found one anyways just tools to create static coldboots.
     
  8. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    @bguerville is there any kind of limitations to the size of the .elf file that IDA can analyse?

    Seems to repeatedly crash at certain points when asked to analyse MSG5 TPP eboot.elf exacted from the EBOOT.BIN. The eboot.bin itself is only 16MB but when extracted to eboot.elf, its uncompressed format size is 40MB+
     
  9. 7,515
    5,563
    872
    kozarovv

    kozarovv Super Moderator

    Joined:
    Nov 8, 2014
    Messages:
    7,515
    Likes Received:
    5,563
    Trophy Points:
    872
    Home Page:
    Here are some code examples for installers, second one will be better for your needs.

    https://github.com/aldostools/webMAN-MOD/blob/master/_Projects_/updater/source/main.c
    or
    https://github.com/XMB-Manager-Plus/xmb-manager-plus-installer

    About creating iso, just sign eboot as disc one, then use ps3tools to create iso.

    https://www.psdevwiki.com/ps3/CXML_Containers#CXML_decompiler
     
  10. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
  11. 7,843
    6,517
    647
    bguerville

    bguerville Moderator

    Joined:
    Feb 25, 2015
    Messages:
    7,843
    Likes Received:
    6,517
    Trophy Points:
    647
    Location:
    Earth
    The psdevwiki link is working fine at my end...
     
  12. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    God damn copy and paste feel like putting a hammer through this PC at times. Was meant to be the link in the dev wiki for the CXML decompiler.

    As for IDA i got it working, svchost was flooding my PC's RAM with and so was win update, trying to update windows when i have it disabled.
     
  13. 7,843
    6,517
    647
    bguerville

    bguerville Moderator

    Joined:
    Feb 25, 2015
    Messages:
    7,843
    Likes Received:
    6,517
    Trophy Points:
    647
    Location:
    Earth
    No size limitation that I am aware of..
    Having said that, in practice, I am not a game modder, I reverse ps3 system files mainly, which are always smaller than 40Mb uncompressed.
    @esc0rtd3w has reversed large eboots & other files for the nopsn research, he said he never had problems either..
     
  14. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    Was just svchost flooding my RAM with processes, I hate that in Windows 10. XP Pro was a way better OS than most of these new Windows.

    Anyways who said it was for modding the game.....o_O :rolleyes: lol I don't do things like that :-p :D...just the graphics...which is technically modding lol :cool:

    Anywhere else you know of that i can find the CXML Decompiler. Am looking through Ghithub but there or so many search results when you type in CXML lol.

    EDIT: Don't matter lol I'll just use the source code on the page to compile one lol.
     
    Last edited: Jan 29, 2019
  15. 5,018
    4,456
    472
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    5,018
    Likes Received:
    4,456
    Trophy Points:
    472
    Location:
    Babylon 20xxE series
    Btw, the "CXML decompiler" in .EXE format i think was created with one of that apps that converts python scripts to .exe

    But is a python script, you can copy all the code that appears in wiki under CXML decompiler v4 alpha, source code
    And save it in your PC as cxml_decompiler.py

    After that (and with python 2.7 installed in your PC) you can run it in command line
    If i remember right, if you run it without options it shows you the "help" info of how to use it
     
  16. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    I already have it saved like that for when I want to use it, but I have 3.7 python (would this cause issues?), some of the things I have were dependant on it. At the minute am having a good look through the source code for making an installer. Makes for an interesting read. Just trying to figure out how to add a bit on the terms for if someone decides to not accept them instead of it just returning to the XMB straight away, something alone the line's of "terms not accepted, the software will now quit to XMB, press ok to continue" but i think am getting the jist of it, some of it looks similar to BASIC.

    But am having fun looking through it and learning it, all be it slowly lol, though I still prefer graphics work lol, Going to make some epic graphics for this :D Maybe some 3D ones.
     
  17. 5,018
    4,456
    472
    sandungas

    sandungas Moderator Developer

    Joined:
    Dec 31, 2014
    Messages:
    5,018
    Likes Received:
    4,456
    Trophy Points:
    472
    Location:
    Babylon 20xxE series
    I always used it with python 2.x, so im not sure if it will return some error with python 3.x
    For verification purposes (incase it runs on 3.x) extract the contents of coldboot.raf and compare the .sxml with the .sxml posted in psdevwiki in the "talk" page of coldboot.raf it should be identical
    https://www.psdevwiki.com/ps3/Talk:Coldboot.raf#Coldboot.sxml
    Im mentioning this because the other cxml files are more simple, but coldboot.raf contains lot of floats, vectors, and other tricky stuff

    Btw, if you want to update a bit the python code, there is a thing that could make it a lot more "human friendly"
    Note the files are given a name when extracted that is the original offset inside the structure of the cxml, as example, in icontext.bin https://www.psdevwiki.com/ps3/Talk:Icontex.qrc
    Im going to use the last file for an example: icontex_0x0015BC30.bin
    By reading the file name you know the file is located at offset 0x0015BC30, but this is a "relative offset" (relative to the start of the file table), lets say... if the file table is located at 0xFF000000 then this file is located at "absolute offset" (relative to the start of the file) 0xFF15BC30
    In other words... you need to sum the "file table start offset" + the "file relative offset"

    But the problem is... the tool doesnt tells you where is located the filetable, so you cant make that calculations (at least not in a easy way) :D
    To make the calculation you need to open the original file in a hexeditor, look at the header, find the value where it tells where is located the filetable, etc... (and to make this you need to understand the internal structure of the file)
    It was made that way because we was reversing the structure of the cxml containers and it was needed to verify everything manually, the tool was made by flatz but at that time i had the structure almost reverved entirelly and documented in wiki with the help of cfwprophet, one day flatz appeared in IRC and published the script and we was like "F%$# yeah", after that it was needed to fix a couple of minor bugs and this is where the adventure with cxml files finished :D (the page in wiki is a battlefield btw)

    But now that we know the tool works fine... what the tool should do is to extract the files and rename them using the "ID" of the structure (this is the only real identifyer of the file, and is the only thing we can use to create a "filename")
    As example, for https://www.psdevwiki.com/ps3/Talk:Icons.qrc
    The first file should be named ICONS.mnu (you know this ones well heheh)
    And also, some of the ID's includes a "path" that is usually named a "manifest", it represents a hierarchy of folder->files, as example, the second file inside icons.qrc is: override/black/ICONS.mnu
    The "override" and "black" should be extracted as folders

    Is just a suggestion, i thought in it since time ago, but i never tryed to learn python :)
     
    Cypher_CG89 likes this.
  18. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    Got an issue with PSDK3v2..... I decided to remove my Official PS3 SDK v4.** as it was taking up far to much room on, at the moment, limited HDD space. I just left the "Official" tools installed as they are very handy to have. I decide that something lightweight was needed to replace it so I download and installed, and set up PSDK3v2. Its all setup and works for the most part except for the most of the make****.bats I got a missing dll error and they are for windows 10.

    Whats the best way to go about updating this. Is it just a case of installing the latest MSYS build for windows 10 to the MSYS dir in the WinGW dir of PSDK3v2?


    Edit: I got got it working, had to edit the .bats to change paths in them as a don't have this on the main C drive of my PC, but know its keep giving me a Build [2] error??? saying the directory don't exist. Seriously what the hell am I doing wrong?? give me graphics any day lol.
     
    Last edited: Feb 1, 2019
  19. 2,535
    1,180
    297
    Cypher_CG89

    Cypher_CG89 Senior Member

    Joined:
    Jul 30, 2018
    Messages:
    2,535
    Likes Received:
    1,180
    Trophy Points:
    297
    Gender:
    Male
    Occupation:
    Lead Graphic Artist/Dev, VENOM ELITE GAMING
    Location:
    North East, England, UK
    Got it all sorted, can compile apps, disassemble and debug them now to varying levels now depending on what it is.......

    Thanks for the help
     
    DeViL303 likes this.
Tags:

Share This Page