Lua 5.3 didn't need an x86 emulator. But now, it has one regardless.
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
asie 1efd286db1 mark IVT locations as NOP or IRET depending on implementation presence 1 ano atrás
.gitignore add command line arguments, precompiled emu_core.lua 1 ano atrás
README.md point at some test suites 1 ano atrás
changelog.txt DAA fix, speed boosts 1 ano atrás
comms.lua bugfixes in timer emulation, still wonky 1 ano atrás
compile.sh minor tweaks 1 ano atrás
config_disks.lua add command line arguments, precompiled emu_core.lua 1 ano atrás
disks.lua add changelog, uncommon fd image size support 1 ano atrás
emu_core.lua mark IVT locations as NOP or IRET depending on implementation presence 1 ano atrás
emu_core_pre.lua mark IVT locations as NOP or IRET depending on implementation presence 1 ano atrás
kbdmaps.lua fix backspace and down arrow key in curses mode 1 ano atrás
keyboard.lua bugfixes in timer emulation, still wonky 1 ano atrás
lunatic86.lua mark 0.1.1 1 ano atrás
pic.lua first commit 1 ano atrás
pit.lua PIT emulation improvements, +5% speed bump 1 ano atrás
platform_curses.lua fix backspace and down arrow key in curses mode 1 ano atrás
platform_oc.lua fix OC bugs, mark off 0.1.1 1 ano atrás
sysconf.lua minor tweaks 1 ano atrás
table_cp437.lua first commit 1 ano atrás
table_ocpalette.lua fix OC bugs, mark off 0.1.1 1 ano atrás
timer.lua bugfixes in timer emulation, still wonky 1 ano atrás
video.lua bugfixes in timer emulation, still wonky 1 ano atrás

README.md

Lunatic86

Barely-IBM-compatible PC emulator written in Lua 5.3.

Compilation Instructions

  1. Run ./compile.sh on a (preferably?) Linux machine.
  2. Edit disks.lua to point to your disk images.
  3. Run platform_oc.lua in OpenComputers or Kallisti, or platform.lua with lcurses (text mode only).

What’s Emulated?

Probably decently

  • CPU: 8086-esque
  • Graphics: CGA (640x200x1, 320x200x2, text modes), 320x200x8 (Mode 13h)
    • With some partial I/O ports emulation!
  • BIOS: High-level emulation
    • Decent implementations of most expected interrupts

Pretend

  • Audio: PC Speaker (Computronics Beep Card)
  • Keyboard: PC XT-compatible
  • 8259 PIC
  • 8253 PIT

Not even tested

  • Graphics: Tandy-compatible

Not even implemented

  • BIOS: Serial/Printer Port interrupts, INT 15h
  • Pretty much anything not listed

Notes

  • platform.lua outputs debug text to stderr. Run with “2>/dev/null” to avoid.
  • The performance on my desktop (i7-4790K) seems to be:
    • about 3x PC XT in Lua 5.3,
    • about 0.6x PC XT in latest stable OpenComputers,
    • about 1x PC XT in latest stable OpenComputers + fixed machine.lua - you may override it server-side,
    • about 1.8x PC XT in latest stable OpenComputers + fixed machine.lua + natives recompiled to actually use -O2 and not debug mode,
    • about 2.5x PC XT in Kallisti with the timeout-checking code disabled altogether, and about 1.8x PC XT otherwise.
  • There’s a lot of bugs and hacks.

Known issues

Many. See the Wiki for the Compatibility List.

In particular, a “reduced memory usage” mode has to be introduced for OC users.

Licensing

TBD. For now, consider it “all rights reserved” - or just ask on IRC.

Acknowledgements

  • 8086tiny, for providing the initial motivation and being one of the emulators which proved helpful during development
  • Publicly available 8086 test suites used: