gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

OffTopic > Questions about porting games

#120274 - Joe_Sextus - Fri Mar 02, 2007 5:07 am

I've been throwing the idea around of porting descent to the DS for a few months now. I never really looked at the code until here recently, and I am still unsure how playable a port would be because of the the controls (like being able to rotate right and strafe left while firing primary and secondary weapons). But that's another topic.

Depending on what source tree is used, the source tree is from 4.5MB to 7.75MB in size. The three source trees I have (D1x, D1x-rebirth, and DesCEnt) use C or C++ and x86 assembly (not even sure how that works for desCEnt).

My question is with a source tree of this size and complexity, what is the best way to port this? Would it be better to start at main() and implement functions as need, start at the bottom and work my way backwards toward main, fix compile errors until it just works, or some other way I have thought of yet?

Thanks,
Joe

#120275 - sajiimori - Fri Mar 02, 2007 5:34 am

I'd say first set up a convenient build environment using your favorite IDE, then get the project to compile. Remove I/O functions and functions written in assembler and stub them out with empty C functions. Keep a list of everything you remove.

Where to go from there depends on your preference. I'd personally just start with getting the inintialization code to run, then the title screen, and so on. Working in that order will tend to visit both high-level and low-level code alike, so you'll get a chance to explore many facets of the codebase quickly.

It produces high morale because every bit of code that's executed is working correctly, up to the point that you've reached. There's a clear distinction between what's done and what isn't, rather than having a lot of things that are half-done or poorly done.