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.
For the 1999 version, it required a new CL-GD5440 driver written in Javascript, along adjustments in the emulator core to handle the PCI access, and still be able to work with the 1997 ROMs.
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.
What do we have here? (1999)
The date is shown at the top-left corner of the screen (click it to change the date), there are four fixed icons: Volume (not working), Calculator, System Status, and change screen resolution (not working). On the top-right corner of the screen appears a button for displaying a fixed menu of programs. You can double-click title bars to minimize windows.
The only working programs are Ajedrez, Archivero, Fénix C, Circuito Impreso, Publivisión, and Bloques (X:/Entorno de desarrollo/Juegos/Bloques.c and just compile it from source using Fénix C)
In line 318 replace case 0x15: with case TECLA_ARRIBA: as it is designed to use the keypad 5 to rotate pieces. Not available in laptop keyboards.
You can also print source code to any of the supported printers, however, there is no way to get out the printed data. You need to configure the printing for Fénix C in Opciones-Impresión. I already put some free fonts (located in Sistema/Tipos de letra).
The source code for the C compiler and the assembler are in the Entorno de Desarrollo folder. If you want to recompile the C compiler or the assembler, you need extra memory, so you need to disable the web browser (select this when starting the emulator), and use the Promedio utility to see the free memory. It is pretty amazing to watch the 10,203 lines of source code being compiled and getting exactly the same binary.
Publivisión is almost the first working version from the last day of 1998, so it is filled with bugs, anyway you can create documents with it and print them. This early application already runs at 10,000 lines of source code.
Circuito Impreso is my PCB editor and it was the most polished application at the time. It is pretty easy to use, just experiment with left click (draw) and right click (select). The credits image was scanned from an AMD manual cover. There are a few bugs in the display driver when moving items, but I'll correct it later.
To run the web browser, open a file browser (Archivero), and click in Explorador de Internet. I also put the source code to my very first browser (more like a viewer), and I don’t know if it can be compiled, but probably it would need some changes. Because of security restrictions, my browser cannot connect to the Internet. If you want to experience it, please download the Windows or Mac version of the emulator.
Did you enjoy this article? Fuel my creativity with a coffee ☕. Or join the journey and become a monthly supporter, you’ll get high-quality content, and good karma! You can buy also my books in Lulu.com, my ebooks and games in my digital store.