js86emu is an x86 architecture emulator written in Javascript. The goal of this project is to emulate multiple x86 chips along with auxilary hardware such as Harddisk controllers, BIOS and graphics.

A full web based GUI is planned. This includes an online disk library including storage and an online community for sharing and creation of disk images. The idea is that programs (games) will be installed on a disk image and then easily imported. This will ease the common frustrations involved with installation of PC based programs and games (himem.sys will already be configured in the disk image, just run the disk image).

This project started as result of my curiosity about how emulators work. One night I decided to do some research on emulators. I downloaded the DOSBox source code and started reading. I discoverd that the general ideas were not that complicated, the implementation could be complicated but mostly in a tedious way. I thought, "how hard could this be", and began my journey to discover the answer to that question.

I'd like to thank copy from Programming Puzzles & Code Golf for the awesome codegolf challenge. The codegolf challenge included a test program with associated assembly without which I would have never gotten even close to the current level of completion.

Current Progress

The 8086 processor has ~72 instruction represented by 252 numeric opcodes (this actually depends on how you count the group instructions).

Currently implememted features (version 0.2 WIP)

  • ~98 instructions decoded and mostly working
  • Functioning stack
  • Basic (non-segmented) memory
  • Pretty decent debugging (gotta have this)
  • Code Page 437 font set loads dynamically from a bitmap representation
  • Text mode (80x25) video (no interrupts yet)
  • Multiple binary programs for running
  • Barebones GUI (any designers out there?)

Roadmap

Bold versions are complete

  • ✓ 0.1 : Functional solution to the codegolf challenge. Online Demo
  • 0.2 : Full test coverage, full instruction coverage. Online Demo
  • 0.3 : BIOS support.
  • 0.4 : Bootable disk support, boot a few test disks.
  • 0.5 : Boot DOS.

Un-scheduled features

These are features that don't have a home on the roadmap.

  • Upload a custom binary to run
  • Configuration engine
  • Add memory break points
  • Update memory debug view to keep starting point of rows at a factor of 8 (currently the row begins at IP)