matt-kempster/m2c

[Bug] Does Absolutely Nothing

NickDeBeenSAE opened this issue · 9 comments

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

What is the contents of USR_DATA?

Raw Binary, MIPS32 PowerPC code.

Its a PS3 (PlayStation 3) save file.

I am trying to modify it.

mkst commented

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.

Its Static Raw Binary actually.

Its assembly language is MIPS32.

PowerPC in this case.

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

Yeah, m2c requires textual assembly as input.

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.

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.

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