How do emulators/ports work?


f3tus

Still Fresh
Joined
May 9, 2003
Messages
9
I was wondering how people go about porting software to other platforms. As I understand you either have the source code and you make modifications for it to run on the other os/hardware or you rewrite your own engine to interpret the existing data files (in the case of the Exult remake of ultima vii).

I have know clue how people go about writing emulators.

I have some limited knowledge of c++. Inspired by the SCUMM port I'd be interested in porting some other old pc games. Possible ports I could think of were Prince of Persia, Willy Beamish, and Dark Forces. I don't know if the source has been released for any of those, I suppose that would be the place to start? Does anyone have any details on how scumm was ported?

thanks,
f3tus
 
Find sources, spend days hacking them to even compile on the pc/gp32, then spend days more rewriting the graphics routines, then if you can be bothered the sound :) after all this look at it and wonder if its actually in good enough condition to release.

In the long run it is quite addictive, especially when you make a major break though (see something appear on the screen!) but can also drive you to a nervous breakdown WWOooooo!

I tend to go though stages of being really productive to months of doing nothing, i have a disturbing number of unfinished projects on my pc (most for the gp32) which i always swear to myself will be 'finished by friday'

-Craig

www.gbax.com
 
yea, i was wondering about sound. i was just trying to get kq5 to work again on my pc. had to get that vdmsound thing. i suppose you'd have to code in some hardcore sound blaster / mt32 emu.
 
craigix posted on May 9 2003 said:
Find sources, spend days hacking them to even compile on the pc/gp32, then spend days more rewriting the graphics routines, then if you can be bothered the sound :) after all this look at it and wonder if its actually in good enough condition to release.
And then spend days listening how people can't stop complaining at your work :lol:

Sad but true, most times.
 
Last edited by a moderator:
Well, hopefully not, at least not in the "I tink I iZ so 1337 4nd UR 3mu iz Kr4P c0z it D0N'7 p14y my gam3"

Although I'm guessing quite a bit of that is inevitable :(
 
f3tus posted on May 9 2003 said:
i suppose you'd have to code in some hardcore sound blaster / mt32 emu.
Nope, you convert the sound routines to the GP32 ones, usually.
 
Last edited by a moderator:
f3tus posted on May 9 2003 said:
Possible ports I could think of were Prince of Persia, Willy Beamish, and Dark Forces. I don't know if the source has been released for any of those, I suppose that would be the place to start? Does anyone have any details on how scumm was ported?
They reverse engineered SCUMM - the long way around!

There's an excellent version of Prince of Persia on the Atari ST, check that out. For the others I think the best thing would to write a DOS emulator, which would kill many birds with one stone. ;)

Porting (ie. recompiling the source of an app, possibly with changes) is vastly different than writing an emulator (to run software mens for other systems). And of course what Jeff has done with CaSTaway is to port an emulator - covering both bases!

:p
 
Last edited by a moderator:
sigh...

Ok

You go through the rom file in question and look for opcodes, similar (i think) to assembly instructions. You process them like a CPU would, only through C code, which is slower, basically you emulate their CPU and other chips.

Other people know more about it than I do :)
 
Back
Top