[HN Gopher] Faux86: A portable, open-source 8086 emulator for ba...
       ___________________________________________________________________
        
       Faux86: A portable, open-source 8086 emulator for bare metal
       Raspberry Pi (2019)
        
       Author : wicket
       Score  : 79 points
       Date   : 2021-02-07 19:32 UTC (3 hours ago)
        
 (HTM) web link (github.com)
 (TXT) w3m dump (github.com)
        
       | tpmx wrote:
       | 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.
        
         | tyingq wrote:
         | 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.
        
       | forbes wrote:
       | 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.
        
         | tpmx wrote:
         | 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.
        
       | [deleted]
        
       | Hnrobert42 wrote:
       | 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?
        
         | tpmx wrote:
         | 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.
        
       | anticensor wrote:
       | This indeed enables us to run DOS on Raspberry Pi:
       | https://xkcd.com/1508/
        
         | HeWhoLurksLate wrote:
         | Woah, I didn't remember that XKCD called iOS and OSX combining.
        
           | dialamac wrote:
           | 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.
        
           | sneak wrote:
           | Well, he also called TinderOS, another thing that didn't
           | happen.
        
           | deaddodo wrote:
           | People have been calling this since they acquired PA Semi, 11
           | or 12 years.
        
       | Gys wrote:
       | I came across box86 yesterday during FOSDEM. It have not yet
       | tried it, but is similar and actively maintained:
       | https://github.com/ptitSeb/box86
        
         | rock_artist wrote:
         | 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.
        
           | app4soft wrote:
           | What about porting _box86_ to _Symbian 9.x (S60v3 /S60v5)_?
           | 
           | Is it possible?
        
             | retrac wrote:
             | 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.
        
       | rbanffy wrote:
       | Does the Pi still have a composite video output? Some interesting
       | things can be done with a precise CGA emulation on NTSC output.
        
         | [deleted]
        
         | tyingq wrote:
         | 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.
        
         | terramex wrote:
         | 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.
        
       | tomcam wrote:
       | Calling Fabrice Bellard!
        
       | jzer0cool wrote:
       | 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?
        
         | yjftsjthsd-h wrote:
         | 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).
        
       ___________________________________________________________________
       (page generated 2021-02-07 23:00 UTC)