Introduction:



QEMU is a generic Open Source machine emulation and virtualization, for documentation and downloads see the QEMU project web site. The software can be used on Linux, OSX and Windows. I've not tried this under Windows, an installation on Linux and OSX systems is trivial, just install the package qemu with the package management used on the system. For OSX systems it is suggested to use brew for the installation.

This virtualization will only run COHERENT 4.2, the floppy disk and harddisk emulations are not accurate enough, to run releases before. Also I've not yet installed COHERENT from scratch under QEMU, I assume it's the same as an installation under Virtualbox. Instead I've converted the VMDK disk images produced with Virtualbox to an image format usable with QEMU. This can be done with the Virtualbox or QEMU tool:

VBoxManage clonemedium disk ~/VirtualBox\ VMs/COHERENT\ 4.2.10/disk1.vmdk ~/coherent/qemu-coherent-4.2.img --format RAW
qemu-img convert -f vmdk -O raw ~/VirtualBox\ VMs/COHERENT\ 4.2.10/disk1.vmdk ~/coherent/qemu-coherent-4.2.img


To run QEMU with this disk image I'm using the following shell script:

#!/bin/sh
exec qemu-system-i386 -cpu 486 -M isapc -vga std -drive format=raw,file=$HOME/coherent/qemu-coherent-4.2.img -m 16 &

COHERENT 4.2 boots very fast under QEMU 2.11.0, so the problems with the harddisk controller with previous releases were solved. But it still has a serious bug somewhere in the CPU/MMU emulation, as the following video shows.

Under COHERENT 4.2 the compiler is monolithic, all compiler phases are in a single binary communicating via a memory buffer with an intial size of 64KB. The buffer grows as needed, looks like the communication via the buffer isn't working correct. I've tried QEMU with other CPU's, but the problem is in all of them. The compiler errors are meaningless, just run make again and again until the binary is build. Not suggested to use it in this state for anything serious.

Also the virtual consoles are not working with release 2.11.0, switching between consoles screws up the console driver and the VGA emulation.
This is fixed with release 2.11.1, release notes say that the scancode tables were fixed, so loadable keyboard drivers also might work now.

The PS/2 mouse port emulation is not accurate, the system waits in the boot screen. With a mouse click into the console window the boot process continues because a mouse event is generated.

After installing some additional software I got aware that QEMU doesn't like disk image files with the extension .dsk, it wants .img instead. So if you want to install anything from disk images rename the files.