Syndicate Wars - a reverse-engineering tale
Gynvael Coldwind (GynvaelColdwind) <gynvaelvexilliumorg> Monday, January 25 2010 17:20.35 CST


Syndicate Wars is a game published in 1996, created by Bullfrog. The game was written in C (Watcom) for the DOS4GW DOS extender. And of course it has stopped working natively (i.e. without emulators like DOSBox) when the modern operating systems, like GNU/Linux or Windows NT series, emerged.

A few years ago my friend, Unavowed, told me about proposition of a project to create a port of Sydicate Word for modern OS'es like the two previous one I've mentioned. The port was to be done by decompiling the original executable file, locating all the functions from the standard C library, locating the DOS4GW and I/O (sound, keyboard, gfx, mouse, etc) dependencies, replacing them with modern native libc function call and libSDL/OpenAL libraries (sometimes using simple wrappers, other times by creating converters), and finally, recompiling it all to form native executables for the modern systems.

Yesterday, we've finished this project, and we've published executables, not only for GNU/Linux and Windows, but also for Mac OSX :)

Project site (screens, downloads, even a video):
http://swars.vexillium.org/

As for the technical side of the project, I'll describe everything in the next post - it was the biggest reverse-engineering project I've took part in, and I hope you'll too find something interesting in the details for yourselves :)

GNU/Linux:


Mac OSX 10.5:


Windows Vista:


Comments
fungos Posted: Tuesday, January 26 2010 10:00.48 CST
Congrats. This is really an amazing and insane job. I'm waiting the next articles to have a better insight of your work. It is possible to find a way to do this by some automatic process? maybe with help of a changed DOSBOX emulator to map address (libc, DOS4GW) correctly and dump a marked binary or something like that? I know, its absurd, but I thought trying to do what you have done already an absurd.

GynvaelColdwind Posted: Wednesday, January 27 2010 07:42.18 CST
@qaysel
Thanks ;>

@fungos
Thanks ;>
You idea about using DOSBox to map addresses is great (especially when it comes to mapping non-clib interrupt usage). Hmm, this could also be done in BOCHS, or by tweaking the DOS4GW a little.
As for clib, signatures would do the job :)
I think that it is possible to automate most of process, however sound/gfx might still be a little complicated, since they might have some library layer on top of it.
Anyway, I think that automating this process is possible, and it would be a very interesting project :)

fungos Posted: Friday, January 29 2010 06:06.28 CST
@GynvaelColdwind nice you liked my idea. It would be very interesting and usefull project (mainly to port games to linux *native* in my opinion). But also to bring Syndicate (the first one!) from ashes. :D