Documentation/Platforms/PowerPC: Difference between revisions

From QEMU
(Created page with 'Stay tuned...')
 
No edit summary
Line 1: Line 1:
Stay tuned...
<P><h1>PowerPC Macintosh Emulator</h1><BR>
<B>QEMU Installation Directions for Mac OS X<BR>
</B>System Requirements:<BR>
Mac OS 10.5 or higher<BR>
The clang compiler shipped with Xcode 4.2 or higher, or GCC 4.3 or higher<BR>
Additional Requirements (install in order):<BR>
1. libffi: <FONT COLOR="#0000EE"><U>https://sourceware.org/libffi/</U></FONT><BR>
2. gettext: <FONT COLOR="#0000EE"><U>http://www.gnu.org/software/gettext/</U></FONT><BR>
3. glib: <FONT COLOR="#0000EE"><U>http://ftp.gnome.org/pub/GNOME/sources/glib/</U></FONT><BR>
4. pkg-config: <FONT COLOR="#0000EE"><U>http://www.freedesktop.org/wiki/Software/pkg-config/</U></FONT><BR>
5. autoconf: <FONT COLOR="#0000EE"><U>http://www.gnu.org/software/autoconf/autoconf.html</U></FONT><BR>
6. automake: <FONT COLOR="#0000EE"><U>http://www.gnu.org/software/automake/</U></FONT><BR>
7. libtool: <FONT COLOR="#0000EE"><U>http://www.gnu.org/software/libtool/</U></FONT><BR>
8. pixman: <FONT COLOR="#0000EE"><U>http://www.pixman.org/</U></FONT><BR>
* You may find it easiest to get these from a third-party packager such as Homebrew, Macports, or Fink.<BR>
After downloading the QEMU source code, double-click it to expand it.<BR>
Then configure and make QEMU:<BR>
./configure  --disable-gtk --disable-sdl --target-list=ppc-softmmu<BR>
make<BR>
If you have a recent version of Mac OS X (OSX 10.7 or better with Xcode 4.2 or better) we recommend building QEMU with the default compiler provided by Apple, for your version of Mac OS X (which will be 'clang'). The configure script will automatically pick this.<BR>
Note: If after the configure step you see a message like this:<BR>
ERROR: Your compiler does not support the __thread specifier for<BR>
      Thread-Local Storage (TLS). Please upgrade to a version that does.<BR>
you may have to build your own version of gcc from source. Expect that to take several hours. More information can be found here: <FONT COLOR="#0000EE"><U>https://gcc.gnu.org/install/</U></FONT> <BR>
These are some of the third party binaries of gcc available for download:<BR>
&#149; Homebrew: <FONT COLOR="#0000EE"><U>http://brew.sh/</U></FONT><BR>
<FONT COLOR="#0000EE"> &#149; <U>https://www.litebeam.net/gcc/gcc_472.pkg</U></FONT><BR>
<FONT COLOR="#0000EE"> &#149; <U>http://www.macports.org/ports.php?by=name&amp;substr=gcc</U></FONT><BR>
You can have several versions of GCC on your system. To specify a certain version, use the &#150;cc and &#150;cxx options.<BR>
./configure --cxx=&lt;path of your c++ compiler&gt; --cc=&lt;path of your c compiler&gt; &lt;other options&gt;<B><BR>
</B><BR>
<BR>
<B>Guest Compatibility</B><BR>
<BR>
<U>Operating System</U> <U>Status</U><BR>
Mac OS 9.1  Does not boot<BR>
Mac OS 9.2  Boots - but several extensions need to be removed because of crashing<BR>
Mac OS 10.0 Does not successfully boot.<BR>
Mac OS 10.1 Untested<BR>
Mac OS 10.2 Successfully boots and installs<BR>
Mac OS 10.3 Can boot, unknown if it installs<BR>
Mac OS 10.4 Can boot, but doesn&#146;t install<BR>
Mac OS 10.5 Untested<BR>
Debian Linux 5 Boots and installs<BR>
Ubuntu Linux 5 Severe video corruption prevents using it<BR>
<BR>
<B>Guest Installation</B><BR>
<BR>
<B>Mac OS 10.2<BR>
</B>Booting from the installation media does work. The beigeg3 target works very well with this operating system.<B><BR>
<BR>
Mac OS 10.4<BR>
</B>Mac OS 10.4 installation CD does not support the beigeg3 target. It will boot up, but a error dialog will say this machine isn&#146;t supported.<BR>
<BR>
Booting from the mac99 target ends with the message &#147;Still waiting for root device&#148; being printed repeatedly. <B><BR>
</B><BR>
It is still possible to make Mac OS 10.4 work in QEMU. I installed Mac OS 10.4 onto a flash drive from a PowerPC Macintosh. Then using Disk Utility to make an image file of the flash drive made a bootable image file for QEMU. The format of the flash drive has to be Mac OS Extended Journaled (HFS+ journaled). If the image file is a .dmg file, replace the extension with .img to make it work in QEMU. <BR>
<BR>
If you wish to access the internet thru the Mac OS 10.4 guest, you can by adding this to QEMU command options: <BR>
<BR>
-net none -netdev user,id=mynet0 -device usb-net,netdev=mynet0<BR>
<BR>
<B>Mac OS 9<BR>
</B>As of December 2015, Mac OS 9.2.1 cannot boot successfully into QEMU. Part of the reason is due to issues with OpenBIOS. The other reasons may be related to PowerPC emulation issues. There are ready-made image files and other helpful hints <A HREF="http://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&sid=0ef8922b24a51d2a9d546300aea69c64&start=250"><FONT COLOR="#0000DD"><U>here</A></U></FONT>. Mac OS 9 is able to boot to the desktop if these extensions are removed: <BR>
<BR>
- Apple Audio Extension<BR>
- Apple Enet<BR>
- Multiprocessing folder<BR>
- Open Transport aslm modules<BR>
- Text Encoding Converter<BR>
<BR>
A custom version of OpenBIOS is need to boot Mac OS 9. Use it like this:-bios &lt;path&gt;/openbios-ppc<BR>
Turn off networking because it causes Mac OS 9 to crash: -net none<BR>
<BR>
This is the suggested options to use to run Mac OS 9:<BR>
./ppc-softmmu/qemu-system-ppc -bios &lt;path&gt;openbios-ppc -boot d -cdrom &lt;path&gt;os92_test.iso -M mac99 -m 512 -cpu G3 -net none<BR>
<BR>
Debugging tips<BR>
Macsbug can be used to tell you what exactly stopped booting. The link for it is below.<BR>
Mac OS 9.2 comes with a built-in debugger. To use it, set the OpenBIOS variable &#147;APPL,debug&#148;:<BR>
<BR>
In OpenBIOS type:<BR>
dev /<BR>
2000000 encode-int  * Note: the number can be replaced with the many options available<BR>
&#147; AAPL,debug&#148; property <BR>
then to boot from a cd type:<BR>
boot cd:,\\:tbxi<BR>
<BR>
To boot from a hard drive image:<BR>
boot hd:,\\:tbxi<BR>
<BR>
<B>Useful Links</B><FONT COLOR="#0000DD"><U><BR>
<A HREF="http://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&sid=67661b0a18610c86b115cdff98d68010">Google Summer of Code Discussion for Mac OS 9</A></U></FONT><BR>
<A HREF="http://www.macgui.com/downloads/?file_id=22125"><FONT COLOR="#0000DD"><U>Macsbug 6.6.3</A></U></FONT> - debugger for Mac OS 9<BR>
<A HREF="https://opensource.apple.com/static/iso/"><FONT COLOR="#0000DD"><U>Darwin OS installation iso file</A>s</U></FONT><BR>
<A HREF="http://sourceforge.net/projects/jqemu/"><FONT COLOR="#0000DD"><U>JQEMU</A></U></FONT> - graphical manager for QEMU (requires Java)<BR>
<BR>
<B>Pictures</B><BR>
Picture of mac os 10.2 and 10.6&#146;s About dialog<BR>
MacPong2001 <BR>
AppleWorks<BR>
Mac OS 9<BR>
Debian Linux<BR>
<BR>
<B>How do I help<BR>
</B>QEMU has many systems that can always be improved. Here is a brief list of possible areas you may want to work on:<BR>
- Documentation<BR>
- Testing<BR>
- Fixing operating system compatibility issues<BR>
- PowerPC emulation<BR>
- User interface<BR>
- OpenBIOS (firmware)<BR>
- Implement a sound card that is compatible with Mac OS 9 and Mac OS X. The usb-audio device is the closest to working on the Mac OS.<BR>
- Implement a 3D video card<BR>
- Implement a network interface card that is compatible with Mac OS 9 and Mac OS X. The rtl8139 is already implemented and might need a few tweaks to work in the Mac OS. <BR>
- Improve various hardware (via-cuda, ata controller, etc..)<BR>
<BR>
Knowledge in these areas could help:<BR>
PowerPC Assembly<BR>
68K Assembly<BR>
Embedded Programming<BR>
<BR>
<B>Contact</B><BR>
If there are any issues with this page, please <A HREF="http://something"><FONT COLOR="#0000DD"><U>contact me</A></U></FONT>. <BR>
<BR>
<BR>
Last Updated December 5, 2015</P>
</BODY>
</HTML>

Revision as of 21:12, 5 December 2015

PowerPC Macintosh Emulator


QEMU Installation Directions for Mac OS X
System Requirements:
Mac OS 10.5 or higher
The clang compiler shipped with Xcode 4.2 or higher, or GCC 4.3 or higher
Additional Requirements (install in order):
1. libffi: https://sourceware.org/libffi/
2. gettext: http://www.gnu.org/software/gettext/
3. glib: http://ftp.gnome.org/pub/GNOME/sources/glib/
4. pkg-config: http://www.freedesktop.org/wiki/Software/pkg-config/
5. autoconf: http://www.gnu.org/software/autoconf/autoconf.html
6. automake: http://www.gnu.org/software/automake/
7. libtool: http://www.gnu.org/software/libtool/
8. pixman: http://www.pixman.org/

  • You may find it easiest to get these from a third-party packager such as Homebrew, Macports, or Fink.

After downloading the QEMU source code, double-click it to expand it.
Then configure and make QEMU:
./configure --disable-gtk --disable-sdl --target-list=ppc-softmmu
make
If you have a recent version of Mac OS X (OSX 10.7 or better with Xcode 4.2 or better) we recommend building QEMU with the default compiler provided by Apple, for your version of Mac OS X (which will be 'clang'). The configure script will automatically pick this.
Note: If after the configure step you see a message like this:
ERROR: Your compiler does not support the __thread specifier for

      Thread-Local Storage (TLS). Please upgrade to a version that does.

you may have to build your own version of gcc from source. Expect that to take several hours. More information can be found here: https://gcc.gnu.org/install/
These are some of the third party binaries of gcc available for download:

&#149; Homebrew: http://brew.sh/

&#149; https://www.litebeam.net/gcc/gcc_472.pkg
&#149; http://www.macports.org/ports.php?by=name&substr=gcc
You can have several versions of GCC on your system. To specify a certain version, use the &#150;cc and &#150;cxx options.
./configure --cxx=<path of your c++ compiler> --cc=<path of your c compiler> <other options>


Guest Compatibility

Operating System Status
Mac OS 9.1 Does not boot
Mac OS 9.2 Boots - but several extensions need to be removed because of crashing
Mac OS 10.0 Does not successfully boot.
Mac OS 10.1 Untested
Mac OS 10.2 Successfully boots and installs
Mac OS 10.3 Can boot, unknown if it installs
Mac OS 10.4 Can boot, but doesn&#146;t install
Mac OS 10.5 Untested
Debian Linux 5 Boots and installs
Ubuntu Linux 5 Severe video corruption prevents using it

Guest Installation

Mac OS 10.2
Booting from the installation media does work. The beigeg3 target works very well with this operating system.

Mac OS 10.4
Mac OS 10.4 installation CD does not support the beigeg3 target. It will boot up, but a error dialog will say this machine isn&#146;t supported.

Booting from the mac99 target ends with the message &#147;Still waiting for root device&#148; being printed repeatedly.

It is still possible to make Mac OS 10.4 work in QEMU. I installed Mac OS 10.4 onto a flash drive from a PowerPC Macintosh. Then using Disk Utility to make an image file of the flash drive made a bootable image file for QEMU. The format of the flash drive has to be Mac OS Extended Journaled (HFS+ journaled). If the image file is a .dmg file, replace the extension with .img to make it work in QEMU.

If you wish to access the internet thru the Mac OS 10.4 guest, you can by adding this to QEMU command options:

-net none -netdev user,id=mynet0 -device usb-net,netdev=mynet0

Mac OS 9
As of December 2015, Mac OS 9.2.1 cannot boot successfully into QEMU. Part of the reason is due to issues with OpenBIOS. The other reasons may be related to PowerPC emulation issues. There are ready-made image files and other helpful hints <A HREF="http://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&sid=0ef8922b24a51d2a9d546300aea69c64&start=250">here</A>. Mac OS 9 is able to boot to the desktop if these extensions are removed:

- Apple Audio Extension
- Apple Enet
- Multiprocessing folder
- Open Transport aslm modules
- Text Encoding Converter

A custom version of OpenBIOS is need to boot Mac OS 9. Use it like this:-bios <path>/openbios-ppc
Turn off networking because it causes Mac OS 9 to crash: -net none

This is the suggested options to use to run Mac OS 9:
./ppc-softmmu/qemu-system-ppc -bios <path>openbios-ppc -boot d -cdrom <path>os92_test.iso -M mac99 -m 512 -cpu G3 -net none

Debugging tips
Macsbug can be used to tell you what exactly stopped booting. The link for it is below.
Mac OS 9.2 comes with a built-in debugger. To use it, set the OpenBIOS variable &#147;APPL,debug&#148;:

In OpenBIOS type:
dev /
2000000 encode-int * Note: the number can be replaced with the many options available
&#147; AAPL,debug&#148; property
then to boot from a cd type:
boot cd:,\\:tbxi

To boot from a hard drive image:
boot hd:,\\:tbxi

Useful Links
<A HREF="http://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&sid=67661b0a18610c86b115cdff98d68010">Google Summer of Code Discussion for Mac OS 9</A>

<A HREF="http://www.macgui.com/downloads/?file_id=22125">Macsbug 6.6.3</A> - debugger for Mac OS 9
<A HREF="https://opensource.apple.com/static/iso/">Darwin OS installation iso file</A>s
<A HREF="http://sourceforge.net/projects/jqemu/">JQEMU</A> - graphical manager for QEMU (requires Java)

Pictures
Picture of mac os 10.2 and 10.6&#146;s About dialog
MacPong2001
AppleWorks
Mac OS 9
Debian Linux

How do I help
QEMU has many systems that can always be improved. Here is a brief list of possible areas you may want to work on:
- Documentation
- Testing
- Fixing operating system compatibility issues
- PowerPC emulation
- User interface
- OpenBIOS (firmware)
- Implement a sound card that is compatible with Mac OS 9 and Mac OS X. The usb-audio device is the closest to working on the Mac OS.
- Implement a 3D video card
- Implement a network interface card that is compatible with Mac OS 9 and Mac OS X. The rtl8139 is already implemented and might need a few tweaks to work in the Mac OS.
- Improve various hardware (via-cuda, ata controller, etc..)

Knowledge in these areas could help:
PowerPC Assembly
68K Assembly
Embedded Programming

Contact
If there are any issues with this page, please <A HREF="http://something">contact me</A>.


Last Updated December 5, 2015

</BODY> </HTML>