MCPcopy Index your code
hub / github.com/clienthax/Ps3GhidraScripts

github.com/clienthax/Ps3GhidraScripts @10.0.4-release

Chat with this repo
repository ↗ · DeepWiki ↗ · release 10.0.4-release ↗ · + Follow
73 symbols 171 edges 8 files 3 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Ps3GhidraScripts

A collection of scripts for parsing PS3 executables with Ghidra.

Relocations are not currently supported.

When loading a prx/elf into Ghidra be sure to select the following language (By default this is the one under the automatic selection when the recommended checkbox is disabled)

PowerISA-Altivec-64-32addr

Installation

Those scripts are meant to be used as a Ghidra extension.

Simply grab the .zip in release corresponding to your Ghidra version and install in Ghidra through "File=>Install Extension...".

Make sure the extension is active(there should be a checkmark on the left), scripts should then be accessible in CodeBrowser through "Window=>Script Manager".

Required change

To avoid issues with decompliation the following change is needed in Processors\PowerPC\data\languages\ppc_64_32.cspec

Add <register name="r2"/> to the <unaffected> list

Possible problems

Some cell specific instructions are currently not supported in ghidra, these are the vector store/get lvlx etc, these appear in games and may break decompilation currently.

AnalyzePs3Binary.java

The main script, this should be used BEFORE analysis is run on the program.

This will ask for the location of the nids.txt file.

It will then parse the infomation sections and define imports/exports and name the ones it can from the nids file, and then set the TOC.

After this you should run the auto analysis tool within ghidra, and then run the syscall define script.

DefinePs3Syscalls.java

Does what it says on the tin.

Resolves ps3 syscalls to the correct name and defines functions for them.

Should be ran after AnalyzePs3Binary and auto analysis have completed.

Core symbols most depended-on inside this repo

getSize
called by 12
ghidra_scripts/ElfSection.java
applyDataForce
called by 11
ghidra_scripts/Ps3ElfUtils.java
createImportStubs
called by 4
ghidra_scripts/AnalyzePs3Binary.java
createExportEnts
called by 4
ghidra_scripts/AnalyzePs3Binary.java
getSections
called by 4
ghidra_scripts/Ps3ElfUtils.java
getvAddr
called by 4
ghidra_scripts/ElfSection.java
createImportStubsFromMemoryBlock
called by 3
ghidra_scripts/AnalyzePs3Binary.java
applyStruct
called by 3
ghidra_scripts/Ps3ElfUtils.java

Shape

Method 66
Class 7

Languages

Java100%

Modules by API surface

ghidra_scripts/AnalyzePs3Binary.java25 symbols
ghidra_scripts/Ps3ElfUtils.java14 symbols
ghidra_scripts/Ps3DataStructureTypes.java13 symbols
ghidra_scripts/AssignPs3R2FromOpd.java7 symbols
ghidra_scripts/DefinePS3Syscalls.java6 symbols
ghidra_scripts/ElfSection.java5 symbols
ghidra_scripts/FnidUtils.java3 symbols

For agents

$ claude mcp add Ps3GhidraScripts \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page