matt-kempster / m2c

A MIPS and PowerPC decompiler.
GNU General Public License v3.0
386 stars 46 forks source link

[Bug] Does Absolutely Nothing #262

Closed NickDeBeenSAE closed 10 months ago

NickDeBeenSAE commented 10 months ago

As the title suggests, the file does absolutely nothing.

I used the following command, which produced no file, therefore no output:

python3 m2c.py -t ppc-mwcc-c /home/nickdebeen/Desktop/USR_DATA > USR_DATA_Converted.c

mkst commented 10 months ago

What is the contents of USR_DATA?

NickDeBeenSAE commented 10 months ago

Raw Binary, MIPS32 PowerPC code.

Its a PS3 (PlayStation 3) save file.

I am trying to modify it.

mkst commented 10 months ago

That is not how this tool works. You need to feed assembly code (i.e. something like objdump -d output).

And a save file is likely to be some bespoke data structure, not code.

NickDeBeenSAE commented 10 months ago

Its Static Raw Binary actually.

Its assembly language is MIPS32.

PowerPC in this case.

ethteck commented 10 months ago

You're mistaken. Save files don't have machine code (assembly) in them. It's just data like mkst said

simonlindholm commented 10 months ago

Yeah, m2c requires textual assembly as input.

NickDeBeenSAE commented 10 months ago

You're mistaken. Save files don't have machine code (assembly) in them. It's just data like mkst said

I am not mistaken because Ghidra for the win.

I set its disassembly language to be MIPS32 and there you go, it shows disassembled MIPS32 machine code.

NickDeBeenSAE commented 10 months ago

Yeah, m2c requires textual assembly as input.

There is text in the file.

Its Raw Binary data and m2c failed to produce an output in C.

NickDeBeenSAE commented 10 months ago

I can prove both of my replies in 2 separate screenshots.