Ports/Ghidra

Hello

Can someone point me to the right direction as far as understanding the process of porting games from one console to another using Ghidra?
I was told that that would be the best option when you don't have the original source code.

I'm also curious about porting games into Saturn that may require 1MB or 4MB RAM to run. How does that process work from the dev side to implementing the use of that?
I'm very much a novice, so I may have follow up questions depending on how intricate any explanations become but I'm open to understanding what might or might not be achievable.
 
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.
 
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.

Thank you very much. Are there any others you suggest I learn about for that purpose (of porting)?
 
Back
Top