Using Fabrice Bellard's runcom to run COM files under Linux (Announce)
> (note that with "intel" they mean 32-bit x86 class, not CPU's made by Intel
> only)
The x86 market is like 80% Intel and 20% AMD with very few others (VIA).
> IIRC most 32-bit OSes have such calls for interfacing with the bios, e.g.
> FreeBSD x86 has (machine/x86.h):
Oops, I missed where you explicitly said FreeBSD here.
> But the main problem of this technology, like all hardware VM based
> solutions, is that won't work under 64-bit OSes?
V86 (1986) was dropped with AMD64 (2003) but more or less VT-X (2006, 2010) brought back real mode support, if only you buy a cpu with such support. I've run FreeDOS under VirtualBox (with its own fake BIOS, IIRC) atop Win7 64-bit host, it's much much faster than without.
> Hence, investing in this
> kind of technology at this point doesn't really make sense, since for
> direct usage there are mature solutions like dosemu.
Mature, yes, works fairly well but is still dirt slow for emulating 16-bit stuff when under AMD64 (though 32-bit DJGPP stuff is native speed). But I don't know how much "JIT"'ing or VT-X or multi-core or threads they utilize (if any).
DOSBox is much easier to port and build due to SDL and C++, hence it's more widely available than DOSEMU (which doesn't support FreeBSD since a long time ago, AFAIK).
> To properly support running 16-bit code, in time you need to move to
> technology that can emulate or JIT 16-bit code on any CPU.
Java has a JIT yet things like JDOSBox and JPC are still fairly slow. Even QEMU and BOCHS, last I checked a few years ago, weren't great. And VirtualBox is a pain without VT-X. Sadly, all emulation is difficult to do with reasonable speed, and you often get 10x slowdown (or worse!).
Actually, I was reading Darek Mihocka's blog again recently. I know I've mentioned him here once or twice. Well, apparently he used to work for MS, Intel (even recently), etc. He is very savvy and has tons of experience in emulation, and he goes on and on about how this and that is difficult or messes things up (EFLAGS, too many branches). He has worked on tweaking BOCHS (C++) in recent years, so who knows, maybe it's reasonable speed now (though I doubt it, heh).
P.S. Read up on Loongson 3 (MIPS-based), it has some hardware helpers to speed up QEMU x86 emulation to within 70% (allegedly).
Complete thread:
- Using Fabrice Bellard's runcom to run COM files under Linux - Arjay, 21.03.2012, 01:17 (Announce)
![Open in board view [Board]](img/board_d.gif)
![Open in mix view [Mix]](img/mix_d.gif)
- Using Fabrice Bellard's runcom to run COM files under Linux - marcov, 21.03.2012, 13:43
- Using Fabrice Bellard's runcom to run COM files under Linux - Arjay, 21.03.2012, 19:53
- Using Fabrice Bellard's runcom to run COM files under Linux - Ibidem, 30.03.2012, 01:00
- Using Fabrice Bellard's runcom to run COM files under Linux - Rugxulo, 31.03.2012, 00:47
- Using Fabrice Bellard's runcom to run COM files under Linux - marcov, 31.03.2012, 09:15
- libx86 / Alpha - Rugxulo, 10.04.2012, 00:26
- Using Fabrice Bellard's runcom to run COM files under Linux - Ibidem, 30.03.2012, 01:00
- Using Fabrice Bellard's runcom to run COM files under Linux - Rugxulo, 19.04.2012, 05:40
- Using Fabrice Bellard's runcom to run COM files under Linux - Arjay, 21.03.2012, 19:53
- Emu8080-Stefan Tramm's Intel 8080 CPU Emulator running CP/M - Arjay, 16.04.2012, 21:14
- Emu8080-Stefan Tramm's Intel 8080 CPU Emulator running CP/M - Rugxulo, 17.04.2012, 00:03
- Emu8080-Stefan Tramm's Intel 8080 CPU Emulator running CP/M - Ibidem, 17.04.2012, 08:47
- Emu8080-Stefan Tramm's Intel 8080 CPU Emulator running CP/M - Rugxulo, 17.04.2012, 19:49
- Grant Searle's CP/M on breadboard - updated 21st April 2012 - Arjay, 22.04.2012, 18:57
- Grant Searle's CP/M on breadboard - updated 26th April 2012 - Arjay, 04.05.2012, 22:54
- Grant Searle's CP/M on breadboard - updated 26th April 2012 - Arjay, 02.08.2012, 00:37
- Grant Searle's CP/M on breadboard - updated 23th July 2013 - Arjay, 05.08.2013, 19:05
- Grant Searle's CP/M on breadboard - updated 26th April 2012 - Arjay, 02.08.2012, 00:37
- Grant Searle's CP/M on breadboard - updated 26th April 2012 - Arjay, 04.05.2012, 22:54
- Using Fabrice Bellard's runcom to run COM files under Linux - marcov, 21.03.2012, 13:43
Mix view