beardypig / ghidra-emotionengine

Ghidra Processor for the Play Station 2's Emotion Engine MIPS based CPU
Apache License 2.0
198 stars 35 forks source link

Function IDs #51

Open TheStolenBattenberg opened 3 years ago

TheStolenBattenberg commented 3 years ago

Function analysis being on the TODO list would imply Function IDs/FID Databases don't work with this at the moment, correct?

astrelsky commented 3 years ago

Function analysis being on the TODO list would imply Function IDs/FID Databases don't work with this at the moment, correct?

They work afaik. You would need to create them yourself though since the libraries used are proprietary.

TheStolenBattenberg commented 3 years ago

An FID was created using source of some games/demos with complete (matching library ver) symbols still contained. I see this isn't actually a problem with this plugin though, Ghidra is just acting strange on my system and not showing the option under Analysis. Thanks.

VelocityRa commented 3 years ago

Function ID isn't great since it's not fuzzy at all. Rizzo is way better in my experience / for my uses.

I have made SDK signatures & used them in several projects but I can't just release those here, pretty sure that would be illegal 😅.

If that wasn't the case I would have gladly contributed them here already, but meh.

charlieamer commented 2 years ago

I am beginner at ghidra, can you just give me brief explanation of:

  1. what do i get with sdk signatures ? If I understand correctly, i will get signatures for functions such as strcat, strcpy, but will I also get signatures for functions regarding CD, sound for example ?
  2. if I find a ps2 sdk, how do I import those signatures into ghidra ? Do I compile for example a .a library that contains all functions from sdk, and just drag-drop that file into ghidra ?
VelocityRa commented 2 years ago
  1. Yes. You won't get everything for several reasons but you'll get some of them at least.
  2. If you want to do this yourself, the SDK will contain object files, that you will need to convert to signatures. I don't remember how I did it exactly but IIRC I found .o files (and extracted all .a files' .o files too) then made a bash script to invoke Ghidra's cmd interface to open each one in a database and run Rizzo's 'save' script that creates signatures. If you contact me on Discord (velocity hash 0042) I can help more.