Do you remember the simpler times when you had a DOS command line, a handful of commands, and you talked to the hardware through a few BIOS and DOS interrupts? Okay, maybe it was a little limited, but nostalgia doesn’t care. Now [mcuhacker] is working on bringing some of those memories back by getting a PC-XT emulator running on an ESP8266.
For the x86 CPU emulator, he ported Fake86 which is written in C, and created an Arduino IDE environment for it. The MS-DOS 3.3 bootdisk image is stored in flash and is accessed as the A: drive. There’s no keyboard yet but he has 640×200 CGA working with 80×25 characters on a 3.5″ TFT display with the help of a low pass filter circuit. In the video below he shows it booting to the point where it asks for the date.
Emulating other hardware on the ESP8266 seems to be a popular thing to do. Maybe you were an Apple user and would prefer 6502 emulation on the ESP8266 running as an Apple 1. We even have a Z80 emulation running CP/M in case that was more your preference.
Nice thing about emulating older hardware and software this way is when the resulting infections come one can easily blow everything away and start over.
Thing is… The infections would be emulated and not native… Therefore any spectre/meltdown could be seen and mitigated…
No such thing as Meltdown or Spectre on an 8088.
that’s what you’d think. If I can learn how to do ANY real programming beyond the start examples for python, and get a keyboard and screen for my Honeywell pc clone, ill start on that PoC
Non-speculative core.
Can’t break memory protection…
if there IS no memory protection
*taps forehead*
It’s not true emulation until he infects the machine with “Drip”.
Great work.
Disk Operating System without disk? :)
No keyboard and it does not give him the famous “No keyboard, press F1 to continue” error? :)
That is a bios message
Solid State “Disk”, even though the name is a misnomer.
We call them Solid State Drive at work (SSD).
No. The misnomer is calling DOS, Disk Operating System. It derives from QDOS… Named, I believe, by Mr Gates… Quick amd Dirty Operating Sytem. Therefore… ????
the speed at which it types the string … how much slower than the original hardware is that?
At a guess, maybe a factor of fifty times slower overall in terms of boot sequence time? There’s a mention (in his blog) that he’s doing the following:
“At the moment the code has no keyboard so to be able to get past BIOS boot the irq1 line is flooded with keyboard presses. This slows the emulation down.”
Hmmm…. I got used to full speed XT emulation on a 28Mhz ‘020 back in the day, so regard anything less on more recent hardware as frustrating. Maybe I should port UAE to it so I can use PCTask LOL
Shame that the fake86 project seems a bit dead – trying to install the amd64 deb package in Ubuntu 16.04 starts off a dependency war, and the forum that is linked on the project website no longer exists.
Would it be absurd to run the win32 version via wine?
Fake86 is my project. It’s on more of a hiatus than totally dead. The code is really poorly written. I started writing it when I was very new to C. I’m planning on just taking the CPU core code and rewriting everything around it, with more of a focus on coherent code, emulator accuracy and being more modular.
If you want to install it, I’d recommend doing a git clone of the latest code and compiling: https://sourceforge.net/p/fake86/code/ci/master/tree/
Even that is old, and the makefile no longer works as is, at least in Debian 8 or 9. If it doesn’t work for you, change this line:
LIBS=-lpthread
To this:
LIBS=-lpthread -lX11
I think it’s quite cool that the guy who wrote the software is posting in the comments and not being a braggart like I am and giving help to someone who asked.
Comments like these! Thanks @Mike Chambers.
Hi! Thanks for your input.
I totally understand how code can seemingly stagnate over time – I’m quite literally adding new features to an existing codebase that is around 20 years old right now with very little documentation and most of the people who supported it gone. I certainly was not having a go at you or the work you’ve put into Fake86. In fact, the opposite is true – I love me some x86 (just ask the multitude of 80s/90s x86 hardware I have at home), and any excuse to check out something x86 related gets my heart pumping.
And with that, I shall check out the git and compile :)
I love your code as you see.
I have DMA PCM audio running but would love some assistance making the PC detect a Soundblaster card.
Perhaps support for Covox or DSS could be built in before SB?
That would be easy.
Are you taking pull requests? Is this also available on Github? I like Sourceforge OK for hosting, but it hasn’t quite streamlined collaborative development like Github has.
Github is great, dont get me wrong.
But during high usage hours in the US it is painfully slow here in Sweden.
Cool project. Can it do anything truly useful ilke run tetris yet?
Doom?
Crysis?
Ever ran one of both on an XT? Try more like Commander Keen, Klax or Test Drive… 8-)
Shouldn’t MS-DOS just be allowed to die a peaceful death ?
Sometimes we just have to oull out G’pas muzzle loader, ya know?!?
No!
What, no teary-eyed nostalgia for DOS? :)
Never! You can pry DOS from our cold dead hands!
DOS still runs on my old computers sometimes. It is a go-to place to test stepper motors connected to the parallel port. And it still runs software for some old control systems I made.
I’d rather see Windows die :)
I’d rather see Windows die :)
Amen, brother!
No way is DOS dead, running on a couple of billion computers as CMD. ;)
This is great! I’m surprised the ESP8266 runs it that well.
I actually did a similar port of it recently to a Teensy 3.6 as well as an Atmel SAM4S dev kit. It’s cool to see microcontrollers do this stuff. :)
Is you code available?
Thanks Mike.
Now you see what I did with your code.
I’ll add a keyboard and CGA graphics and see if I cant get Alley Cat running.
OT but, if you haven’t played Alley Cat on the Atari 800, you are missing out on a superior experience. That game is loads of fun, looks and sounds great.
Oh, the painful (and fond) memories of 4-color lo-res CGA :)
Or Windows 3.0 but for that I need both the HDD and a mouse.
You will need to emulate at least a 286 for Windows 3.0 AFAIK. Windows 2.0 could work on an XT.
Windows 3.0 + CGA should run fine on an 8088 based XT or decent clone. IIRC there are some 186 opcodes in the color EGA/VGA drivers, so you might need an NEC V20 CPU or equivalent. Even then it would still run OK in real-mode.
Only when you install the subsequent multimedia extensions to Win 3.0 will you then run into the ‘286 CPU minimum’ barrier.
Mike’s 8086 actually emulates a 80186 CPU.
Besides win3.0 there are other GUI’s like Visi On, GEM and GEOS that might run.
Ah, wasn’t aware of the exact source of the limitation. Thanks for clearing that up!
Win3.0 will run on less than a 286. I ran it on a HP 200lx palmtop which has a 186 back in the day. It runs but slow as shit. I seem to remember running it on a Compaq portable, but it might have been a version of Windows older than 3.0
I’ve run 3.0 on an 8088 (Tandy 1000SX). You do need a 286 for 3.1 though.
Could swear I ran Win 3.1 with win /s on an XT but it might have had a V30 and I might not have ran enough to break it.
Ha cool project. Good luck :)
This is devilishly clever, especially the video and use of flash as RAM with the paging system. I wonder how it would do for performance ported to the ESP32-WROVER module, with its SPI RAM…
I’d be concerned about wearing your “ram” out and getting bad bits.
The MMU uses 4 4KB page buffers.
It seldom writes to the flash and most of the time caches reads only.
And the lowest 0x600 bytes of RAM is real noncached RAM.
So is the video memory and all memory used by the emulator.
please do this with http://kolibrios.org/en/
it takes only a few megabyte disk space and 8MB of RAM to run! x86!
can u get this to boot?????????????????????????????????????
Size: KolibriOS is very small – The kernel and most of the programs fit on a 1.44MB floppy disk!
Love the Project!
Please add VGA Support:
https://blog.hackster.io/fabgl-turns-your-esp32-into-a-vga-gaming-platform-c7c1f2fe0d19
Do I need to break out by copy of Windows 1.1 and DOS Word then?