This is a quick-and-dirty port of Ken's adlib emulator into gcc. It should work on both 32-bit and 64-bit platforms. It should also be compatible with MSVC and Watcom, though I don't have access to those compilers so I haven't tested it yet. I have a few programs that use this, I'll clean them up and upload them soon.
As you can see I basically modified it 'just to work' which means a lot of the optimization is gone. Ken, I hope you're not mad! :p
Here it is: http://pastebin.com/UaU6cXXQ
AcetoliNe at
Re: Port of Ken's Adlib emulator to gcc
Just to clarify, the existing LAB3D/SDL version of adlibemu uses longs; this version uses stdint.h data types.
Awesoken at
I should probably mention on my website that there are improved versions of ADLIBEMU floating around the net. Adplug uses an old version of adlibemu - very close to my original. DOSBox uses a heavily modified version of adlibemu - I hardly even recognize the code anymore : ) Both should be platform independent.
AcetoliNe at
I admittedly did not know DOSBox uses your emulator and I find the fact intriguing. However DOSBox' source is in (cue ominous music) C++ which is a big turn-off for me :p
The version included in LAB3D/SDL is closest to what I was looking for; a single C source file that is suitable for small projects. However it wasn't truly 64-bit compatible hence the creation of this version.