new ver of Fake86, my own 8086 PC emulator (v0.12.4.25)

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

new ver of Fake86, my own 8086 PC emulator (v0.12.4.25)

Post by miker00lz »

hi, i was wondering if anybody was interesting in giving the new version of my PC emulator Fake86 a try. i wanted to see if anybody ran into any sort of crippling issues that i don't know about before i actually make it an official release version and throw it up on my website for it.

a quick overview of what it is and is not. first it does not run 32-bit code or anything that needs protected mode. my CPU core is simply real-mode for the time being. it supports all of the 16-bit x86 opcodes up to the 80186/V20 instruction set. (it can't run windows 3.1, but it will run windows 3.0)

main emulation features besides the CPU core:
- Hercules/CGA/MCGA/VGA graphics emulation. the VGA support is actually not complete. it won't do 640x480 4-bit, but it does handle 320x200 8-bit unchained mode, which some games (like Wolf3D) require to run correctly.
- Intel 8253 programmable interrupt timer
- Intel 8259 interrupt controller
- Adlib FM synth emulation (a bit rough, but it's there and working)
- PC speaker (crappy)
- Disney Sound Source emulated (awesome for playing Wolf3D)
- Ethernet card emulation via winpcap (it doesn't emulate any existing real world card, i wrote a custom DOS packet driver for it)
- Uses raw hard disk and floppy images

i will also say in advance that the source code is not very well organized, i am going to re-organize it all sometime soon.

both of these downloads include a 30 MB pre-prepared hard drive image (drive0.raw) with DOS 6.22 and some old games/apps.

EDIT: i've updated these links with a new version that fixes a CPU bug that got introduced to 0.12.4.23.

win32 binaries: http://rubbermallet.org/fake86-0.12.4.25-win32.zip
NOTE: it must be run from the command line, you cant double-click it in explorer.

source code download for linux: http://rubbermallet.org/fake86-0.12.4.25.tar.gz

to compile in linux you need the libSDL 1.2 development files and runtime files installed. for debian users, simply use apt-get install libsdl1.2-dev libsdl1.2debian-all

i assume that works in ubuntu too.

compile like this:

Code: Select all

make
make install
it won't work if you just try to run it from the bin/fake86 after a make, you have to use make install so that it puts some data files in the correct places.

you can run it with the included hard drive image like this:

Code: Select all

fake86 -hd0 drive0.raw

a few screenshots:

Image
Wolfenstein 3D

Image
Prince of Persia

Image
Ultima VI: The False Prophet

Image
Mario Andretti's Racing Challenge
Last edited by miker00lz on Wed Apr 25, 2012 1:25 pm, edited 1 time in total.
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by Jezze »

Nice job!

Have you done any performance comparison to any other emulator?

Also, will you add protected mode in the future?
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

Jezze wrote:Nice job!

Have you done any performance comparison to any other emulator?

Also, will you add protected mode in the future?
thank you! i've been working on it for a year and a half so far. i'm actually in the middle of writing a new CPU core that supports 386 instructions and protected mode. :)

and i've done speed comparisons with DOSBox, and it's actually pretty close in performance. it generally runs at about 80-90% of what DOSBox can do speed-wise. i'm working on that, i'd like to get it at least as fast.

one idea i've got is to implement some kind of scheme that makes it delay flag result calculations until another instruction that needs to see the results is hit. hopefully that will give it a noticeable boost.
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

i was just thinking, should i have posted this in general ramblings? if that's a better spot, maybe this thread should be moved. sorry. this isn't really OS-dev related.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by VolTeK »

Its an announcement for an emulator to run operating systems for the 8086 ;)


I'm not sure, but if you have a debugger, id really like to use your emulator with my current project.
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

i dont have any real debugging features in it, but i really would like to add some. what kind of debug featues would you be looking for? just the standard stuff like memory hex viewing/editing, breakpoints, single-step? right now it doesn't even have a proper disassembly-to-text engine. that shouldn't be difficult to add though.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by VolTeK »

miker00lz wrote:i dont have any real debugging features in it, but i really would like to add some. what kind of debug featues would you be looking for? just the standard stuff like memory hex viewing/editing, breakpoints, single-step? right now it doesn't even have a proper disassembly-to-text engine. that shouldn't be difficult to add though.
Im a bochs debugger user, If you could get similar to work that would be more then awesome for me. Showing a dissassembly, being able to see raw hex values at certain addresses, showing registers, setting break points, breaking at errors and being able to single step all from a command line would be great. Surely many others would enjoy this feature as well.

If your willing to take that request into consideration, take your time :) Would like to make it an every day use when its done
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

yeah, i can definitely do that. it's something i've been meaning to add since i started writing the emulator, but i've been lazy about it.

so what's your current project that you wanted to use it on? (if you dont mind going into it)
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by VolTeK »

I'm currently writing another multitasking 8086 terminal, maybe with a little GUI this time, for a professor at the near by college. Not in college yet, but he's been talking very highly of my work which made me kinda happy.

If you could get a debugger working please announce it as id really like to use it
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

awesome. i've been working on a multitasking 8086 OS too, but i haven't done anything for a few months on it. co-operative or pre-emptive multitasking?
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by VolTeK »

Pre-emptive Multitasking, maybe we could help each other out some time?


Just realized Image
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

yeah, that would be cool. speaking of which, i just tried running the most recent floppy image of my OS in this new version of Fake86 and it says disk error. ****, i think i've recently introduced some kind of CPU bug into Fake86. it ran about a month ago, dammit.. glad i tried it. i need to figure out what i broke. the same image works in qemu.
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.23)

Post by miker00lz »

alright, i fixed the bug. i'm not even sure exactly what caused the problem, but i replaced cpu.c with a version that is a few days older that i had on my netbook's hard drive.

fixed version download links:

windows binaries: http://rubbermallet.org/fake86-0.12.4.25-win32.zip
source code to compile on linux: http://rubbermallet.org/fake86-0.12.4.25.tar.gz

i also updated the links in the first post.
0x3B0
Member
Member
Posts: 26
Joined: Fri Apr 27, 2012 6:28 am

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.25)

Post by 0x3B0 »

Why you don't give the source code for Visual C?
User avatar
miker00lz
Member
Member
Posts: 144
Joined: Wed Dec 08, 2010 3:16 am
Location: St. Louis, MO USA

Re: new ver of Fake86, my own 8086 PC emulator (v0.12.4.25)

Post by miker00lz »

0x3B0 wrote:Why you don't give the source code for Visual C?
back when i started writing this in 2010, i didn't have any experience with Visual C so i wrote it in the Dev-C++ IDE. you can still easily compile the files under windows. i plan to go through the code and clean everything up so that it looks nicer and is more organized/compatible, but for now there are some things in the code that Visual C will not like. for example, switch blocks with case lines that include ranges. (i.e. they use "...")

but anyway, you can compile on windows if you get MinGW, the libSDL dev files, and the winpcap dev files. the winpcap stuff is not even necessary as long as "#define ENABLE_NETWORKING" is commented out in global.h

i'm actually going to start working on cleaning the code up today, i've been putting it off long enough. i'll post it up probably by tomorrow.
Post Reply