matt-kempster / m2c

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

[Bug] Does Absolutely Nothing #262

Closed NickDeBeenSAE closed 1 year ago

NickDeBeenSAE commented 1 year 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 1 year ago

What is the contents of USR_DATA?

NickDeBeenSAE commented 1 year ago

Raw Binary, MIPS32 PowerPC code.

Its a PS3 (PlayStation 3) save file.

I am trying to modify it.

mkst commented 1 year 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 1 year ago

Its Static Raw Binary actually.

Its assembly language is MIPS32.

PowerPC in this case.

ethteck commented 1 year ago

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

simonlindholm commented 1 year ago

Yeah, m2c requires textual assembly as input.

NickDeBeenSAE commented 1 year 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 1 year 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 1 year ago

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