*Qemu Windows Drivers
*Qemu Vga Virtio
*Install Qemu On Mac
*Qemu Display Driver
Blog 2020/5/7
With QEMU on mind with modern machines with this adapther+yours a Full AGP or PCIexpress (CoreImage) stuff + PCI stuff could be achieved. Can Mac OS 9 be QEMU pci passthrouh? Mac OS 9 with RAGE 128 is a best player than Mac OS X with Rage 128. Feb 17, 2020 Hi all, I’m trying to get Catalina going properly with the following setup: Gigabyte TRX40 Designare Threadripper 3960X 24-core 4x32GB = 128GB DDR4 Radeon VII 16GB Latest Manjaro on kernel 5.5 (no MCE bug) I’m currently at a stage that I can use 16 cores and 64GB RAM with decent albeit not native performance, and the GPU is recognized in macOS but as far as I can tell it’s functioning in.
Feb 16, 2016 balloon: 6288 boot: cdn bootdisk: virtio0 cores: 4 cpu: host hostpci0: 01:00,x-vga=on,pcie=1,driver=vfio keyboard: en-gb machine: q35 memory: 14288 name: Windows. Binary drivers are provided by some Linux distributions including WHQL Certified drivers. For example the binary drivers for Ubuntu can be found here. 64-bit versions of Windows Vista and newer (this currently includes Windows Server 2008, Windows 7, Windows 8, Windows Server 2008 R2 and Windows Server 2012) require the drivers to be digitally.
<- previous |index |next ->
Here are some notes on how I set up an installation of OS X Tiger (10.4)on an emulated PowerPC G4 using QEMU,on a modern x86_64 Mac.
This setup was performed using QEMU 5.0.0 (obtained via brew install qemu).
Note: at some point during this process -cdrom /dev/cdrom seems to have stopped working, but -cdrom /dev/disk2 works.Step 1: Initial installation
In this step we will format the disk and perform the initial OS X installation.
Download a copy of the2Z691-5305-A OS X Tiger installation DVDand burn it to a physical DVD.
Note: for some reason qemu does not seem to be able to boot .iso files of the OS X installation DVD (using -cdrom tiger.iso),but if you burn that .iso to a physical DVD and then use -cdrom /dev/disk2, it works.
Boot the DVD to verify it works:
If you see the grey Apple logo, the DVD is working correctly with QEMU:
Quit QEMU and create a 127GB QEMU disk:
Boot the install DVD with the disk attached and being the installation. QEMU will exit when the installer reboots.
When the installer reaches the disk selection screen, there will be no disks to choose from, because the disk has not been partitioned yet:
Start up Disk Utility:
'Erase' the disk to partition and format it:
Quit Disk Utility and the installer should now see the newly formatted partition:
The install will take quite some time (over an hour). When it completes, it will reboot, which will cause QEMU to exit (due to the -no-reboot flag).
At this point you may (physically) eject the installation DVD (from your host Mac).
Mark the disk as read-only to prevent any accidental writes to it (which would cause any snapshots based on this disk to become corrupt):Step 2: User account creation, system updates
In this step we will create a user account and install all of the system updates.
Create a snapshot of the disk (think of this as forking the hard drive):
The system updates can either be installed using the Software Update utility (iteratively repeated across many reboots),or you can download and install them manually.
The manual route is quicker because some of the updates are bundled, and you don't have to wait on Software Update to detect which updates have / haven't been installed yet.
To install the updates manually,download (on your host Mac) item #29 (Tiger_Updates.dmg_.zip)from the 'Mac OS X for PPC' pageof macintoshgarden.org.
Unzip that file and convert the dmg to a DVD image:
We can now use tiger-updates.cdr as a virtual DVD with QEMU.
Boot the G4 and create a user account:
Note: if you plan on using Software Update rather than tiger-updates.cdr, you man omit the -cdrom tiger-updates.cdr line from the above command.
Note: this boot may take several minutes to get started.
This install was set up with user macuser and password macuser:
This installation was set up with the Central timezone:
Disable the screen saver and power-saving features:
Open up System Preferences and:
*Display & Screen Saver -> Screensaver -> Start screen saver -> Never
*Energy Saver
*Put the computer to sleep when it is inactive for -> Never
*Put the display to sleep when the computer is inactive for -> Never
If you did not use Software Update, open up the Tiger_Updates 'DVD' and install all of the updates:
If you go with the updates DVD route, make sure you run Software Update at the end just to be sure you've covered everything.
Mark the snapshot read-only to prevent accidental writes to it:Step 3: Web browser, video player, text editor
In this step we will install TenFourFox, VLC and TextWrangler.
Create a snapshot of the disk:
TenFourFox is a fork of the Firefox web browser which is currently supported on Tiger/PPC.Their website links to the latest version,FPR22.
The latest version of VLCfor Tiger/PPC is 0.9.10,which is still available from their downloads page.
The latest version of TextWranglerfor Tiger/PPC is 3.1,available via Bare Bonesor macintoshgarden.org.
Strangely, no combination of using Disk Utility and hdiutil to create .dmg or .cdr images of TenFourFox.app seemed to work with Tiger:
Note: in retrospect, perhaps this was an APFS vs. HFS+ issue?
I resorted to burning TenFourFox, VLC, and TextWrangler to a physical DVD and passing it through to QEMU.
Note: even burning to a physical CD-ROM didn't work -- it had to be a DVD.
Drag the applications into /Applications.
Shutdown the G4 and mark the disk read-only:Step 4: Xcode, Tigerbrew
In this step we will set up a development environment for building modern Unix software.
Create a snapshot of the disk:
The latest version of Xcode Tools for Tiger/PPC is 2.5,which is still available via Apple (search for 'xcode 2.5' at https://developer.apple.com/download/more/, requires login),or via macintoshgarden.orgfrom their Xcode page.
Again, I had to burn this to a physical DVD in order to use it with QEMU.
Boot the G4 and install the Xcode Tools:
Tigerbrewis a fork of Homebrewfor PowerPC Macs running Tiger or Leopard.
Open up a terminal on the emulated G4 and use the following commands to install Tigerbrew:
Also, change Terminal.app to spawn a 'login' bash shell:
*Terminal -> Preferences -> Execute this command -> /bin/bash -l
Don't forget to mark the disk image read-only:Using these QEMU hard drive images
At this point we've created a series of four chained hard drive images:
We can squash these images into a single, combined, stand-alone hard drive image:
We can then boot using that combined image directly, without the use of any snapshots.This is analogous to having a real Mac with a physical hard drive:
Or, we could treat combined.qcow2 as a 'golden master'and create snapshots based off of it, perhaps to try out some experimental tigerbrew packages:
Perhaps in experiment-1.qcow2 we try out gcc-7, and in experiment-2.qcow2 we try out llvm, etc.Qemu Windows Drivers
Each of these snapshots can be used with the above command line as the -hda argument:
*qemu-system-ppc ... -hda experiment-2.qcow2
We could even create further branches off of e.g. experiment-2.qcow2:
Perhaps we decide that experiment-2B.qcow2 was the keeper and the rest can be gotten rid of?
combined.qcow2 now contains the changes from experiment-2.qcow2 and experiment-2B.qcow2.
Thus far we've been branching off of the 'tip',but we could just as easily branch off several points in the snapshot tree.For example, if we hadn't merged the images into combined.qcow2,we could make a 'daily driver' snapshot for web browsing based off of 3-browser.qcow2,and a 'dev box' for doing development work based off of 4-tigerbrew.qcow2:
Let's say we accidentally hosed our dev box with a careless rm -rf /. Starting over with a new dev box is trivial:Qemu Vga Virtio
Etc :)Resources:
This subproject is about emulating an ATI VGA graphics card. This is not an easy task due to the complexity of these GPUs and while the final goal may be to emulate most features of some real GPU it should be done step-by-step, starting from simple and adding more features incrementally, otherwise this would be too big a task. It should probably also be broken down into smaller areas such as 2D, video accel, 3D, etc. so this subproject is likely bigger than others and almost has its own subprojects. Where to start?
Two of the machines currently emulated by QEMU have an on-board or default ATI GPU:
*The PowerMac3,1 QEMU's mac99 is converging to came with a Rage 128 Pro card.
*The mips_fulong2e machine has an on-board Mobility 7000 aka. M6 chip.
The Rage 128 Pro is the last of the Rage GPUs while the Radeon Mobility 7000 is the simplest of the next generation Radeon GPUs (originally meant to be Rage 6, hence the M6 code name for the Mobility version). The 7000 (originally also called Radeon VE) and the M6 are built on the RV100 GPU which is a simplified version of the R100 Radeon chip lacking its more advanced features. These two chips, being almost direct descendents, are in practice very close so they can likely be emulated by mostly the same code only with some differences so they could be targeted together. MorphOS has driver for both but only supports 3D with the RV100, AmigaOS only supports RV100. MacOS (on mac99) and Linux also has drivers for both so these are a good first target (that may later be enhanced up to X1000/R520 which are the last Radeon chips after which the architecture has changed again).
To further trace back the genealogy of these chips, they are improved versions of the Rage 128 GL which itself stems from the Rage Pro. Therefore, information on these chips could also be useful to understand how these chips have evolved and what has changed between versions. Documentation of these GPUs are not freely available (ATI/AMD has only published info on chips newer than R300) so they cannot be collected here but careful readers should notice that they are not too hard to find.
So the plan is to start with Rage 128 Pro and RV100 and implement enough to get a Linux console on mac99 and mips_fulong2e then improve 2D acceleration to get X working, after that maybe add video overlay so MorphOS R128 driver can work and then implement 3D to reach RV100. From there it could be enhanced towards R520 which may seem very distant but mentioning it is no accident, it is what the Xenos GPU of the XBox 360 is based on and Xenia already has some emulation of, so it might be possible to take inspiration or even code from there to improve 3D emulation without doing it from scratch. Of course this is still a lot of work and likely I can't do it alone but that's why this project was created to bring together interested people who could together reach a goal that could not be reached individually. Current status and known issues
We only have basic functionality working and most of the features are still missing but simple drivers that only use frame buffer and some 2D acceleration should work such as MorphOS and console output with Linux on mac99 and Linux on x86 pc virtual machines and with the PMON2000 firmware on mips_fulong2e. This is now in upstream QEMU in the form of the experimental ati-vga device so no separate git branch here for this at the moment. Small fixes will be submitted to QEMU directly, but we may create a branch if someone takes up a larger project that needs it (such as video accel or 3D). Below is a summary of known (solved or have a work around) and unknown (outstanding) issues with links to tickets where they are tracked: Known issues
Besides garbage output due to bugs or missing 2D accel functions there are a few known problems with a workaround:
*The sam460ex firmware has the same problem with VGA BIOS that is mentioned at known issues with Pegasos2 so its BIOS emulator fails with QEMU's default vgabios. The same work around (or using a ROM from a real card) could be used but then mode switching fails and it cannot set right resolution.
*On mac99 OpenBIOS cannot run an x86 option ROM to initialise the card but it has its own driver which seems to work to boot at least Linux but MacOS does not find the card presumably because of missing info in device tree and driver that the Mac ROM of the real card would set up. OpenBIOS currently cannot run FCode ROMs so using card ROMs or their NDRVs is not easy. I've submitted patches to OpenBIOS to fix this but those are not yet in master. As a workaround an NDRV extracted from the card ROM can be passed in the QEMU command line setting it for the card ROM as -device ati-vga,romfile=aty.ndrv.bin -prom-env 'vga-ndrv?=false' where the prom-env part disables the built in QEMU NDRV so OpenBIOS will install the specified NDRV for the card not its own driver. It may also be possible to get a disk based driver to load by setting the name property of the /pci/ATY node in the OpenBIOS prompt (e.g. to ATY,Rage128Pd and disabling the vga-ndrv? loading but without additional patches this won't work yet. If MacOS boots with ATI drivers it seems to hang at the ATI Video Accelerator extension so that should be disabled to get it to boot but currently this does not have any advantage over normal frame buffer as acceleration is not yet implemented.
*Mouse pointer is not visible initially (seen on Mac OS X but may happen elsewhere) but works anyway and pointer appears after changes shape e.g. when entering a Terminal window. This is likely due to the default hardware cursor implementation missing a cursor image change. There's an alternative implementation which can be selected with the guest_hwcursor=true property, so -device ati-vga,guest_hwcursor=true that may work better as it renders hardware cursor image differently (reading the guest bitmap when drawing the cursor instead of when cursor shape changes which is what the default guest_hwcursor=false implementation does). Install Qemu On MacQemu Display DriverOutstanding issues
*Colors are wrong with Linux framebuffer (#39387)
*Mouse pointer jumps around with guest_hwcursor=false (#39388)
*Video overlay is not implemented (needed for MorphOS Rage128 driver at least)
*Microengine/CCE/PM4 needs to be implemented (#40018)