Skip to main content

Open Source Guru Fabrice Bellard Releases Javascript PC Emulator

Open-source coder Fabrice Bellard has released a PC emulator written in Javascript which can create a virtual computer inside any up-to-date web browser.

Bellard, who worked on the ffmpeg codec and QEMU machine emulator and virtualiser, decided that creating an emulation infrastructure in C was too easy - and began a project to create a full x86-compatible 32-bit CPU emulation in Javascript.

"I did it for fun," he told thinq_ "Just because newer Javascript engines are fast enough to do complicated things."

Bellard reckons some serious uses for the code include benchmarking of Javascript engines, client-side processing using x86 libraries, and even the ability to play old DOS games.

The program emulates a 8259 programmable interrupt controller, a 8254 programmable interrupt timer, a 16450 UART, and a 32-bit x86 CPU equivalent to a 486, but with one slight issue - it lacks a floating-point unit, a critical component of modern processors.

"The lack of FPU is not a problem when running Linux as the operating system," he explained, "because it contains a FPU emulator."