Hacker News new | past | comments | ask | show | jobs | submit login
Faux86: A portable, open-source 8086 emulator for bare metal Raspberry Pi (2019) (github.com/jhhoward)
137 points by wicket on Feb 7, 2021 | hide | past | favorite | 32 comments



Judging from the Github issues it seems like it's very slow, doesn't run on RPi 4 and hasn't really gotten any attention for 16 months.

It's an interesting idea though; running a bare metal x86 emulator on e.g. a Raspberry Pi 400.


The slowness issue is interesting, as the codebase it's forked from mentions it runs fairly well:

"Even an old 400 MHz PowerPC G3 iMac running Linux is capable of more than 2 million instructions/sec"

That would be 12x as many MIPS as the original 8086, on a relatively old CPU.


Still slow. A G3 should be able to emulate a 386 under Bochs/Qemu with relative ease.


Well, yes, but the issue says "Mem counts up at booting takes 10 minutes" That would be quite a lot slower than an 8086.


if i understand the issue correctly this program needs to be installed secretly on every raspberry pi during the next upgrade, and made part of a git commit with no message.


I came across box86 yesterday during FOSDEM. It have not yet tried it, but is similar and actively maintained: https://github.com/ptitSeb/box86


It's seems to be very different.

box86 is user-space. Faux86 is bare metal. (minimum overhead iiuc).

box86 is fully x86 ISA compliant and OpenGL. Faux86 seems now as 8086/80186.


What about porting box86 to Symbian 9.x (S60v3/S60v5)?

Is it possible?


Not really, I would think. You'd lose most of the advantage. Box86's trick is to intercept x86 system and library calls, and invoke the native ARM equivalent.

Symbian, as a different underlying operating system, has no native ARM equivalents of the various x86 Linux system calls and common libraries. So you'd have to emulate those somehow, perhaps by translating them into Symbian-appropriate calls.

Speaking more generally, a JIT translator would otherwise be relatively easy to port as a straight C or C++ library.


> Symbian, as a different underlying operating system, has no native ARM equivalents of the various x86 Linux system calls and common libraries

Are you sure?[0]

As I know, Symbian has ARM & x86.[1]

Maybe not all x86 calls are accepted, but take a look on Symbian 9.x X-plore & ProfiMail apps sources, which are ARM & x86 compatible.[2,3]

P.S. Here is EKA2L1 — Symbian emulator.[4]

[0] https://www.betaarchive.com/forum/viewtopic.php?t=39211

[1] https://en.wikipedia.org/wiki/Symbian

[2] https://github.com/Symbian9/X-plore_free

[3] https://github.com/Symbian9/ProfiMail_free

[4] https://github.com/EKA2L1


Ah! I see what you mean there. An emulator that could take an x86 Symbian binary and translate the calls like this for ARM Symbian. Yes, that should probably be technically possible.


This is demonstrated in the second half of this video (around the 11:30 mark):

https://www.youtube.com/watch?v=bh4LhcbSmXQ&t=619s

This seems good enough for emulating early 8088 and maybe even 80286 PCs, so opens up a big catalog of early games.


Nice! Nothing like video. So it's able to emulate an 8-10 MHz 8086 PC.

> so opens up a big catalog of early games

That all depends on how well it emulates the various subsystems in the PC and the video/sound/etc extension cards.

It's based on this 2012 relase of: http://fake86.rubbermallet.org/ - it seems to have a starter level quality, sort of.


The timing will be off. It needs to emulate a 4.79 MHz 8088.


I still have an old 3.5 drive. Curious if such a drive could be connected to the pi and work with your 8086 emulator?


IDE-USB adaptors exist, but on bare metal (like this) drivers might be a problem. I expect it would work if you're running an emulator on top of something with the drivers (ex. Linux).


It states to support USB. Many (most?) FD USB drives works as a regular mass storage device


Does the Pi still have a composite video output? Some interesting things can be done with a precise CGA emulation on NTSC output.


The Rpi4 does still have composite out, but it's routed via the 4-pole audio jack. You'll want a 3.5mm 4 pole to 3 RCA cable.


RPi 4 and Compute Module 4 still have one (albeit disabled by default, one line in config.txt needs to be added to re-enable it).

Standalone RPi 400 (the one inside a keyboard) does not have any analog outputs.


Why is this interesting?

I ask with genuine curiosity. I don’t understand enough about computer architectures. Is it that you can run stuff compiled for 8086 on RPi?


Nostalgia. 80s PCs are quite expensive now. One very annoying thing with emulation running on a host os like Linux is that the boot phase typically takes a lot of time.

Another nice approach would be a boot speed-optimized buildroot image running PCem, along with some TV-like GUI for configuration. https://pcem-emulator.co.uk/

I think this PC emulator needs more attention. Its strategy of emulating the speed of a very slow CPU hits a good middle ground - you don't need cycle accurate emulators when emulating 80s/90s PCs, because they were all a bit different, but unlike DOSBox, there's an attempt to get the basics right given a specific target CPU.


This indeed enables us to run DOS on Raspberry Pi: https://xkcd.com/1508/


We're 10 years ahead of schedule!


That comic was released on April 6th 2015. So some forethought.


Woah, I didn't remember that XKCD called iOS and OSX combining.


Have they really though? iOS has always shared the same underpinnings as OSX. Although much hyped with Big Sur, iOS features have dribbled into OSX since at least Lion (more than 10 years ago). They’re still distinct operating systems (thankfully IMO) and rather than unify, iPadOS is a distinct entity.


People have been calling this since they acquired PA Semi, 11 or 12 years.


Well, he also called TinderOS, another thing that didn't happen.


2022 according to the timeline


Calling Fabrice Bellard!


He would indeed make something wonderful of this...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: