Am29000 emulator in Javascript
This is a Javascript port of my
Am29000 emulator written originally in C for the article about
my windowed operating system from 1997. This is possible because Javascript is now mostly executed as a JIT (Just-In-Time) compiler, so it can approach speeds closer to the C language.
This is mostly a direct port from C, from my previous experience with my
transputer emulator I've used the
>>> 0 operator (logical right-shift) to keep 32-bit
unsigned integers along the emulation.
It also depends on the
Uint8Array, as it is way faster than a normal array and
saves memory, as there are several of these arrays (two floppy disk drives, and the video RAM). For the drive images, I figured a good trick to reduce the Javascript source code size using
Base64 in my bin2c.c utility to encode the 1.44MB of data for the floppy disk image, and
window.atob gets a decoded string that is copied directly to the drive's Uint8Array.
Finally, for the display it emulates a small subset of a Cirrus Logic GD-5429 video chip, and I display a 800x600 pixels screen with 64k colors by translating the complete screen in every frame from 64k colors to RGB 24-bit. It won't win a speed test.
You can give a look to the Javascript source code for this emulator at
https://github.com/nanochess/Am29000/tree/master/js
What do we have here?
You should wait some seconds for the initial windows to appear. It is because the operating system builds three font faces for the system at startup.
Move your cursor with the mouse or pad. Press click and keep pressed on the title bars to move windows. The gray button at the top-left will close the windows.
If you do right-click in the background of the “Arrancador” window, you’ll get different color schemes.
The “Arrancador” window is like a shortcut launcher for a chess game, the file viewer (you can drag&drop files between two file viewer windows), color editing, disk check, and utilities (you can drag&drop files to the trash, or drag a folder to create a new folder in the file viewer)
- Colores: A way to edit the operating system colors.
- Depurador. A bare bones debugger that can disassemble global memory and the current tasks.
- Editor. Text editor that can print documents (very glitchy)
- Promedio. Procesor usage and free memory.
- Tipografía: A way to test font faces and change used ones.
- CDROM: This enables a ISO-9660 file system, but there’s no CD support in the emulator.
- Terminal: A serial terminal, but there’s no serial port support.
- Circuito impreso: A demo of vectorial graphics.
- The folder Fondos contains background pictures, just click one to enable it.
- The folder Sistema/Protectores de pantalla contains a single screensaver called Acuario, but no time check to run it. The graphics are based on XFishtank.
My emulator in C is way faster than this demo, but if you have a speedy computer and a good browser, this Javascript version can be very interesting. Also the C version is able to generate files with printer data, and this isn't possible in Javascript.
Source code
If you enjoyed this article, please
invite me a coffee on ko-fi!.
Related links
Last modified: Aug/07/2026