• Please review our updated Terms and Rules here

Hugely improved Fake86 8086 PC emu...

Mike Chambers

Veteran Member
Joined
Sep 2, 2006
Messages
2,621
I didn't want to resurrect my massive, ancient thread about Fake86 for this. That thread's a mess. I've been quiet about it here for a long time, but I've been working very hard on it and it's really starting to mature, imo. Some of you were interested in it, so I thought I'd post about where it's at now. I've totally rewritten about 80% of it recently. Here's a little video montage, showing off the results a bit. The mouse cursor being displayed in the video when Fake86 has grabbed it's input is just a bug in my screen recorder utility, it's invisible when you're really using the emu.


EDIT: I just noticed that I accidentally put the Wolf 3D and Ultima 6 clips in there twice. Oops!

Major features:
- Full support for 8086 and 80186 instruction set.
- Sound Blaster Pro support.
- Adlib FM music card support.
- Intel 8253 programmable interval timer for system timer and PC speaker channels.
- Intel 8259 prioritizing interrupt controller.
- Intel 8237 DMA controller to support SB Pro DMA playback functionality.
- Disney Sound Source support.
- Standard Microsoft-compatible serial mouse emulated on COM1.
- Ethernet connectivity supported with a special DOS packet driver.
- Hercules, CGA, MCGA, and partial VGA support.
- Fairly fast CPU emulation, even running it on an old 400 MHz Pentium 2 it can emulate an average of 2 million instructions/second.

If anybody wants to check it out, here are download links including source code.

Source to compile on Linux, OS X, or Windows: http://rubbermallet.org/fake86-0.12.9.12.tar.gz

Pre-compiled for Windows: http://rubbermallet.org/fake86-0.12.9.12-win32.zip

20 MB sample hard drive image with a lot of goodies on it: http://rubbermallet.org/fake86_sample_hard_drive.zip

One of the things you'll find on that drive is an MTCP folder which of course is Mike Brutman's sweet TCP/IP utility suite for DOS. If you have winpcap/libpcap installed, you can get online with them inside Fake86.


Let me know if you run into any problems, please! :)

Maybe this thread would be better in Vintage Software, but it's not meant to run on vintage machines so I wasn't sure.
 
Last edited:
Extremely impressive, Mike. I don't think I'd have the patience to write an entire emulator. Compatibility seems good so far, including audio.

You said you emulated the 808x and 80186 -- Are you taking the "emulate as fast as possible" route and not bothering with speed, throttling, cycle accuracy, etc. (this is the DOSBox approach) or are you going to try to target platforms (the PCem approach)?
 
Extremely impressive, Mike. I don't think I'd have the patience to write an entire emulator. Compatibility seems good so far, including audio.

You said you emulated the 808x and 80186 -- Are you taking the "emulate as fast as possible" route and not bothering with speed, throttling, cycle accuracy, etc. (this is the DOSBox approach) or are you going to try to target platforms (the PCem approach)?

Thanks, Trixter. I've got some severe ADHD. I don't have patience for most tasks, but when it comes to things that really get me interested I hyper-focus and I can just keep going all day no matter how many times I run into problems lol. I get tunnel vision on it and can't pay attention to anything else. :)

I actually did have some semi-accurate speed throttling before the rewrite, and I am going to write some new code again soon to include it in the new codebase. It doesn't do any cycle counting, so unless I add that later it is just going to be limited to throttling based on instructions emulated per second. I think I will add that, but in the short term even that sort of throttling works very well to run old games that don't have timing code.
 
Looks fantastic -- I've followed your progress before but sort of forgot about it when that thread went stale. Will be sure to try it again soon... hats off!
 
in the short term even that sort of throttling works very well to run old games that don't have timing code.

Correct. The only place this will bite you is any timing-specific "special effects" such as digitized sound through the speaker, palette changes, etc. where they didn't use the 8253 to time the effect. But that's very uncommon across the PC's game library, so you're safe for most cases.
 
Correct. The only place this will bite you is any timing-specific "special effects" such as digitized sound through the speaker, palette changes, etc. where they didn't use the 8253 to time the effect. But that's very uncommon across the PC's game library, so you're safe for most cases.

Yeah, I don't believe I've come across one yet that relies on perfect cycle timing. Do you know a title off the top of your head that does? It would be great for testing later.
 
Most games made before 1985 perform simple loops for delays. Ace of Aces, Robotron, and Star Wars immediately come to mind that are unplayable on anything other than a 4.77Mhz machine.

A few games rely on careful timing to get palette changes mid-screen to work, like California Games "more-color" mode. If you're not emulating video scanline-by-scanline though, then don't worry about that.
 
I apologize since I haven't made the time to check it out yet, but had an idea depending on level of difficulty. Is your program large and lots of files/dlls or a compiled exe? What would be pretty damn cool would be an isolated (32-bit) exe that one can run with a (pc) dsk image, or I suppose zip, or just an executable as an argument and it would load and run in the emulated environment.

The reason I point that out is there's a need for something nicer in 64-bit Windows (7 and perhaps Vista) since they officially stripped out the ability to run 16-bit code.
 
Most games made before 1985 perform simple loops for delays. Ace of Aces, Robotron, and Star Wars immediately come to mind that are unplayable on anything other than a 4.77Mhz machine.

A few games rely on careful timing to get palette changes mid-screen to work, like California Games "more-color" mode. If you're not emulating video scanline-by-scanline though, then don't worry about that.

Robotron is a good example, but the other two advertise IBM AT and Tandy 3000 support, so are they really unplayable on a faster machine?
 
I apologize since I haven't made the time to check it out yet, but had an idea depending on level of difficulty. Is your program large and lots of files/dlls or a compiled exe? What would be pretty damn cool would be an isolated (32-bit) exe that one can run with a (pc) dsk image, or I suppose zip, or just an executable as an argument and it would load and run in the emulated environment.

The reason I point that out is there's a need for something nicer in 64-bit Windows (7 and perhaps Vista) since they officially stripped out the ability to run 16-bit code.

On Windows, fake86.exe is about 180 KB. It needs SDL.dll (about 300 KB), and several ROM image files, which total 104 KB together. That's not a bad idea for people using 64-bit Windows, for 16-bit support but WINE on Windows like Deathshadow has pointed out is going to be the better choice. It would take quite a bit of work to add internal support for all of the Win16 API calls. That's a project all on it's own! Plus, Fake86 doesn't support 286 opcodes or protected more yet, and that would probably cause an issue with a lot of 16-bit Windows apps.



Also, it appears that I can't edit the original post anymore but there is a new updated version. I set up a Sourceforge page for this as well, it's all on there.

https://sourceforge.net/projects/fake86/
 
@Mike - do you have any pre-build binaries available for MacOS? I'm struggling to get Fake86 build. Sourceforge also seems to have vanished.
 
Back
Top