Skip to content

Tag: halfix

Halfix PC Emulator

I recently stumbled upon a PC emulator, Halfix on Github. The list of compatible Operating Systems (OS/2!) was quite comprehensive, and the code looked quite simple (especially in comparison to something like QEMU). Best of all, it supports Emscripten as a target, allowing for embedding in the web-browser (like v86).

If you want to check it out, it's hosted on the Obsolete Madness Labs with an OS/2.0 image. I hope to add some more (and noticed the author of Halfifx is also preparing some demos, which will hopefully increase it's popularity).

Halfix running in Chrome

Building

Building under Linux is no drama, just make sure you have NodeJS, Zlib, SDL and Emscripten installed. You might also need to modify makefile.js to remove the warning as errors flag:

var flags = ["-Wall", "-Wextra", /*"-Werror",*/ "-g3", "-std=c99"];

Then it's just a matter of running the "makefile" to get a binary:

node makefile.js

Under Windows, it's a little harder due to a lack of gcc natively. This was my approach:

  1. Clone the Halfix code from Github.
  2. Adjust makefile.js as per above to remove the -Werror flag
  3. Install Choclatey then install mingw: choco install mingw
  4. Install Emscripten
  5. Download SDL 1.2 and zlib and extract to .\deps in the Halfix directory
  6. Build Halfix for Win32
node makefile.js win32

If all goes well you should see halfix.exe ready to run!

You can download a test build to play with at https://github.com/pgodwin/halfix/releases/download/test/halfix.win32.zip

Or run it in your browser at https://labs.obsoletemadness.com/.

Leave a Comment