nepx/halfix logo

nepx/halfix

Free

x86 PC emulator that runs both natively and in the browser, via WebAssembly

FreeFree tier
Type
Open Source

About nepx/halfix

Halfix is a portable x86 PC emulator written in C99 that runs both natively and in the browser via WebAssembly. It emulates a full x86-32 system with FPU, MMX, SSE, SSE2, and PAE support, configurable RAM from 1 MB to 3584 MB, and a variety of devices including Intel 8259 PIC, 8254 PIT, 8237 DMA, 8042 PS/2 controller, i440FX chipset, generic VGA with Bochs VBE extensions, IDE controller (hard drive and CD-ROM), floppy drive controller, and a dummy PC speaker. It is designed to run legacy operating systems and is compatible with a wide range of software, including all versions of DOS, most versions of Windows (excluding Windows 8), OS/2 Warp, ReactOS, several Linux distributions, and more. The emulator can also be used for testing and developing operating systems, running old programs safely, simulating other x86-based systems, and benchmarking web browser performance. Building requires node.js, a C99 compiler, zlib, and Emscripten for browser targets. The project is open-source and hosted on GitHub.

Key Features

Written in C99 and portable across platforms
Runs natively and in the browser via Emscripten and WebAssembly
Emulates x86-32 CPU with FPU, MMX, SSE, SSE2, and PAE
Configurable RAM from 1 MB to 3584 MB
Emulates Intel 8259 PIC, 8254 PIT, 8237 DMA, 8042 PS/2 controller
Includes i440FX chipset (PMC, ISA-to-PCI, IDE controller, ACPI)
Generic VGA graphics with Bochs VBE extensions
IDE controller for hard drive and CD-ROM support
Floppy drive controller (incomplete but functional)
Self-virtualization capability (run Halfix inside Halfix)

Pros & Cons

Pros
  • Portable and written in standard C99
  • Runs directly in a web browser without installation via WebAssembly
  • Supports a very broad range of legacy operating systems
  • Highly configurable hardware emulation (RAM, devices)
  • Open-source and completely free to use
Cons
  • No sound emulation beyond a dummy PC speaker
  • i440FX chipset emulation not fully working yet
  • Self-virtualization is extremely slow
  • Floppy drive controller is incomplete
  • Cannot run Windows 8
  • Requires compilation and dependencies (node.js, zlib, Emscripten) for building

Best For

Testing and developing operating systemsRunning old programs or operating systems that no longer work on modern hardwareSimulating other x86-based systems (CPU component can be isolated)Testing web browser performance using the WebAssembly build

FAQ

What operating systems does Halfix support?
Halfix boots a wide range of operating systems, including all versions of DOS, most versions of Windows (excluding Windows 8), OS/2 Warp 3 and 4.5, ReactOS, and various Linux distributions such as Ubuntu, Damn Small Linux, and Red Star OS 2.
Can Halfix be used in a web browser?
Yes, Halfix can be compiled to WebAssembly using Emscripten and run in a web browser. The repository includes an index.html and runtime.js for browser deployment.
Is Halfix free and open-source?
Yes, Halfix is free and open-source, hosted on GitHub under the MIT License (or similar open-source license).