GithubHelp home page GithubHelp logo

v86's Introduction

Live demo.

How does it work?

v86 emulates an x86-compatible CPU and hardware. Here's a list of emulated hardware:

  • An x86 compatible CPU. The instruction set is around Pentium 1 level. Some features are missing, more specifically:
    • Task gates, far calls in protected mode
    • 16 bit protected mode features and Virtual 8086 mode
    • Single stepping
    • MMX, SSE
    • A bunch of FPU instructions, FPU exceptions
    • Some other exceptions
  • A floating point unit (FPU). Calculations are done with JavaScript's double precision numbers (64 bit), so they are not as precise as calculations on a real FPU (80 bit).
  • An ISA bus.
  • A floppy disk controller (8272A).
  • A DMA (direct memory access) controller, currently only used by the FDC.
  • An 8042 Keyboard Controller, PS2. With mouse support.
  • An 8254 Programmable Interval Timer (PIT).
  • An 8259 Programmable Interrupt Controller (PIC).
  • A CMOS Real Time Clock (RTC).
  • A VGA controller with SVGA support and Bochs VBE Extensions. This includes support for large resolutions.
  • A PCI bus. This one is mostly incomplete and not used by every device.
  • An AT disk controller with some ATAPI and some SCSI commands. This is quite incomplete and possibly buggy, too.

How to build, run and embed?

  • In order to build the cpu.js file, you need make and cpp (the C preprocessor). Run: make src/cpu.js.
  • If you want a compressed and fast (ie, with debug code removed) version, you need Closure Compiler. Set the path to compiler.jar in the Makefile and run make v86_all.js.
  • For more details on how to customize the behaviour and interface, see docs/adapters.md.

Why?

Similiar projects have been done before, but I decided to work on this as a fun project and learn something about the x86 architecture. It has grown pretty advanced and I just got Linux and KolibriOS working recently and there might be some actual uses.

If you build something interesting, let me know. However, keep in mind that the project is not very stable at the moment.

How can I contribute?

  • Someone who could work on hardware devices, such as a modem or the AT controller. I'll write an overview for that at a later point, if people are interested.
  • Donate. Since Bitcoin is the new cool thing, here's my address: 14KBXSoewGzbQY8VoznJ5MZXGxoia8RxC9

License

Simplified BSD License, see LICENSE, unless otherwise noted.

Credits

More questions?

Shoot me an email to [email protected]. Please don't tell about bugs via mail, create a bug report on github instead.

Author

Fabian Hemmer (http://copy.sh/, [email protected])

v86's People

Contributors

copy avatar subzey avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.