GSoC 2015

Adding Support for Mac OS 9 to QEMU

Overview

As of version 2.2.1, QEMU does not support emulation of a machine running Mac OS 9. This GSoC project aims to implement support for OS 9.

Testing

See the testing page for information on viewing our progress.

Log

2015.08.18

It appears that OS 9 is attempting to write to the OHCI HcDoneHead register, which QEMU doesn't support. This doesn't seem like a common operation, and most documentation marks the register read-only.

We've also determined that it's possible to skip into Macsbug by holding the control key when the splash screen appears.

2015.08.17

The (hopefully) final changes to OpenBIOS have been sent out to the mailing list for review. They are:

2015.07.01

Alex has made significant progress on CUDA and ADB emulation. However, a fix to the ADB bus has broken OpenBIOS's keyboard detection.

2015.06.20

Six OpenBIOS patches have been committed to trunk — see OpenBIOS revisions 1341 through 1346.

2015.06.18

A number of outstanding OpenBIOS patches have been reworked and reviewed. They are now waiting to be committed to OpenBIOS trunk.

2015.05.10

The Adler-32 patch has been reviewed by both Mark Cave-Ayland and Andreas Färber.

2015.04.27

The project has been accepted into Google Summer of Code 2015!

2015.04.15

The OS gives several "fatal error" messages regarding a missing copyright string, missing CPU properties and an incorrect interrupts property.

2015.04.12

Mac OS 9 expects a node at '/rom' and fails if it is not present. However, the node can be faked, as the OS doesn't actually check any properties of the node.

2015.04.08

The out-of-memory error and Adler-32 patches have been submitted to the OpenBIOS mailing list for review.

2015.04.03

I've added the Adler-32 checksum (adapted from Adler's original zlib implementation), and the boot script accepts it. Thanks to Mark Cave-Ayland for pointing out a stack order error.

2015.04.02

The new solution is to begin parsing the boot info SGML before allocating memory, get the size of the boot script, and then allocate that memory. This solution fixes the out-of-memory error.

2015.03.29

A more thorough examination of the code calculating the size of the boot script shows that the file size is actually being calculated correctly, but OS 9 expects the host firmware to stop loading at the ASCII EOT (0x04) immediately following the script. The rest of the file appears to be null padding and machine code.

2015.03.28

The script fails because it expects the host firmware to implement a word adler32, which I can only assume is an Adler-32 checksum. It's not entirely clear how OS 9 expects it to be implemented, but it should be fairly close to the reference implementation (zlib).

2015.03.27

I've confirmed that OpenBIOS is able to find the boot script, and by calculating the script size with strlen() instead of the default method it successfully loads and begins execution (this is a temporary workaround). Unfortunately the script still leads to a "No valid state" error, which most likely means that the script fails to execute properly.

2015.03.26

The out-of-memory error occurs in bootinfo_init_program while trying to allocate memory to load the boot script. The script is only about 80 lines long, so it would appear that OpenBIOS is incorrectly calculating the size of the boot script.

2015.03.25

OpenBIOS fails to boot from the OS 9.2.2 install ISO. This appears to be the result of an out-of-memory error. The launch command given is

$ qemu-system-ppc -m 256 -cdrom os9.iso -boot d

References

Acknowledgments