Home | Forums | What's new | Resources | |
Ports/Ghidra |
iamsiincere - Jul 10, 2024 |
derek (ateam) | Jul 10, 2024 | |||
Ghidra is a disassembler. In other words, it provides the raw machine code (i.e., assembly instructions) given a supplied binary. If you open a binary in a hex editor, you will see a series of bytes, none of which mean much to anyone (aside from things like embedded text or pointers). A disassembler like Ghidra (or even IDA Pro) will read said binary data and present the actual human-readable machine instructions so that somebody familiar with assembly languages can understand it. Keep in mind there are no variable names, no function names, nor anything else that even the source code of a game written in assembly would have. Instead, it's up to you to ID and label everything, usually accompanied by a debugger in an emulator running said game. Ghidra also does great things to help organize and otherwise make easier the job of a reverse-engineer. Using a disassembler to view the assembly code for a given game can only assist one in porting said game to another platform if one plans to rewrite the entire game from scratch while using the assembly (and potentially Ghidra's pseudo C code) as a way to ensure logic and such are accurate (think of things like how enemies might spawn in a game, and where). In such a case, you're still writing essentially a brand-new game from scratch, specially designed to cater to the target hardware. For some recent examples of this, you can look at the modern Rainbow Cotton release, which is a ground-up remake, but where the developer, Andreas Scholl..., used the original Dreamcast game's assembly, combined with a debugger, to fine-tune many gameplay elements in his own code. Long story short, Ghidra can be one tool of many involved in porting a game, but it's certainly not magic. |
iamsiincere | Jul 10, 2024 | |||||
Thank you very much. Are there any others you suggest I learn about for that purpose (of porting)? |