GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

About QEMU, a PPC Mac emulator for Windows, macOS and Linux that can run Mac OS 9.0 up to Mac OS X 10.5

Moderators: Cat_7, Ronald P. Regensburg

User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Hi,

Two new Qemu builds are available, one for OSX (mountain lion and upwards) and one for Windows.
See here for OSX: http://www.emaculation.com/forum/viewto ... =34&t=8848
See here for Windows: http://www.emaculation.com/forum/viewto ... =34&t=9028

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 3111
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Thanks for the update!

So this build should handle OS 9.0.4 through 10.4.11 with video and networking, correct? So we only need the custom build for 10.5 now, unless we want screamer audio?
User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Yes, correct. But please note the issue with 9.0.4.

I have a feeling the screamer will also go into main code sometime in the near future ;-)

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 3111
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Hmm... I've forgotten: what's the flag for passing in custom vga values in this version? I've defaulted back to using my own build of qemu_vga.ndrv, but it would be easier to just pass the values in. Currently the OSes seem to default to 800x600 no matter what the initial default is set to with -g.
User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

Set loading the driver to false and set -g:
-prom-env "vga-ndrv?=false" -g 1280x1024x32

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 3111
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Right... of course :) Thanks :)

Also, 10.0 is booting fine with the new version; for some reason I'm having issues with 9.2.2 and 9.2.1; it's changed the hardware profile again, but when I attempt to boot off of a CD image, I get a boot error. Likely an issue on my side; I'll fiddle with it until I get it working.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Cat_7 wrote:Yes, correct. But please note the issue with 9.0.4.

I have a feeling the screamer will also go into main code sometime in the near future ;-)

Best,
Cat_7
Anything we could do to help?
User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

You cannot help me, you can help mcayland, he is doing all the heavy lifting ;-) I just compile and test what he whips up.

Current status: sound is available in 9.0 with sungem and vga driver, but sometimes doesn't boot all the way. 9.0 is sensitive to the order the usb devices (kbd and mouse) are presented.
9.1 sometimes bombs out with an error in the apple audio extension. 9.2 needed a new installation at my place. 10.0, 10.1 sound OK, but 10.2/10.3/10.4 still crackle.

So still some ironing out to do.

Best,
Cat_7
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

As I can suppose you've compiled and tested a newer mcayland version? Is it from screamer-ppc-next or screamer branch? Or do you mean the status for your experimental build from 2017-06-07?
About the 2017-16-09 OS X build.I found sungem not working with g3beige (cable not plugged,as it was before in custom versions).
Also incorrect mouse behavior after switching to fullscreen mode.No matter with usb or adb mouse (tested in Panther). I remember similar issues were fixed by ProgrammingKid's cocoa patch.Was it upsteamed? I think it would be reasonable.I'm sure that similar mouse/fullscreen issues exist in GTK/SDL UIs which should affect Linux/Windows versions...
User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

That status report was for screamer-ppc-next.

Best,
Cat_7
raidenii
Student Driver
Posts: 13
Joined: Tue Jun 24, 2014 2:06 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by raidenii »

Cat_7 wrote:Hi,

Two new Qemu builds are available, one for OSX (mountain lion and upwards) and one for Windows.
See here for OSX: http://www.emaculation.com/forum/viewto ... =34&t=8848
See here for Windows: http://www.emaculation.com/forum/viewto ... =34&t=9028

Best,
Cat_7
Thanks!
One question, can you please compile and pack the ppcw (console less version) instead of/together with ppc?
User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

I'll try to keep that in mind for the next version.

Best,
Cat_7
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

What are the system requirements for your Windows version of QEMU?
User avatar
Cat_7
Expert User
Posts: 5106
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Cat_7 »

I cross compile from Fedora 26 with the x86_64 compiler and include all dll's. Older versions run in windows 7, so I assume the newer ones will do too. But I haven't tried lately.

Best,
Cat_7
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

I've found some time to test some newer qemu versions,exactly official qemu 2.10.1 and 2 branches from mcayland GitHub repo: qemu-ppc-ozbenh-wip-rebase-1 and qemu-ppc-ozbenh-wip-current.The last 2 versions are rebasements of Ben Herrenschmidt WIP version we all know, to the newer qemu versions.The results are following.
1)All versions compile and work fine (current ozbenh versions needs to be git-cloned, not downloaded in zip for new modules used in qemu).
2)All versions have a regression in adb keyboard work in Mac OS 10.0 DP1.It works insanely in this OS.Crazy layout,completely unusable.I don't understand the reason, but the regression happened last summer, as Cat_7's build of 19.05 and earlier custom versions have adb keyboard working correct in 10.0 DP1.
3) As expected,Ben's rebased version provides all features as the original one (e.g Leopard working with mac99p etc).
4)User interface is rather glitching, especially when switching to full screen mode and back.Mouse/keyboard behavior changes unexpectedly.
I tried to compile with ProgrammingKid's cocoa.m file he provided earlier this year but came to:

Code: Select all

ui/cocoa.m:869:83: error: too few arguments to function call, expected 5, have 4
  ...qemu_input_queue_abs(dcl->con, INPUT_AXIS_X, p.x, screen.width);
     ~~~~~~~~~~~~~~~~~~~~                                          ^
/Volumes/DATA1600/Downloads/Development/qemu-ppc-ozbenh-wip-current/qemu/include/ui/input.h:64:1: note: 
      'qemu_input_queue_abs' declared here
void qemu_input_queue_abs(QemuConsole *src, InputAxis axis, int value,
^
ui/cocoa.m:870:100: error: too few arguments to function call, expected 5, have
      4
  ...qemu_input_queue_abs(dcl->con, INPUT_AXIS_Y, screen.height - p.y, screen.height);
 /Volumes/DATA1600/Downloads/Development/qemu-ppc-ozbenh-wip-current/qemu/include/ui/input.h:64:1: note: 
      'qemu_input_queue_abs' declared here
void qemu_input_queue_abs(QemuConsole *src, InputAxis axis, int value,
^


and then

Code: Select all

ui/cocoa.m:1067:34: error: too few arguments to function call, single argument
      'reason' was not specified
    qemu_system_shutdown_request();
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Volumes/DATA1600/Downloads/Development/qemu-ppc-ozbenh-wip-current/qemu/include/sysemu/sysemu.h:75:1: note: 
      'qemu_system_shutdown_request' declared here
void qemu_system_shutdown_request(ShutdownCause reason);
^

As I can see one function in sysemu.h and one in input.h have been redefined to use more arguments.As I cannot fix it myself and as this well-working interface is very desirable, will ProgramminKid update it for use in new qemu versions? I think it's not too hard for him :smile: ...
All the compiling/testing has been done in MacOS 10.13.
[edit]Comparing ProgrammingKid's cocoa.m with original cocoa.m files in qemu trees I have found the way to fix it.Have just compiled qemu-ppc-ozbenh-wip-current with ProgrammingKid's cocoa.m.Works very well and,suprise-- no problems with adb keyboard in 10.0DP1! ADB mouse,as it's been all along, not working, though. Have to use usb-mouse.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

alex195812 wrote: Comparing ProgrammingKid's cocoa.m with original cocoa.m files in qemu trees I have found the way to fix it.Have just compiled qemu-ppc-ozbenh-wip-current with ProgrammingKid's cocoa.m.Works very well and,suprise-- no problems with adb keyboard in 10.0DP1! ADB mouse,as it's been all along, not working, though. Have to use usb-mouse.
Hi alex195812, I just made this version of my super cocoa.m file. You can download it from here: http://www.mediafire.com/file/839kdrm20 ... file_4.zip

It should work with the newest versions of QEMU. Here are some of the changes made with this version:
- Increased the speed of pasting
- Pasting is now a lot more reliable thanks to another user's patch
- Fixed a bug with mounting image files using files that have spaces, newlines, single quotes, and double quotes in the file name.
- Made scrolling in the monitor work
- Control-Alt key combinations can now go to the guest. This makes sending Control-Alt-Delete work for Windows guests.
- Changed ungrab keys to Control-Alt-g

Enjoy :cool:
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

Thanks very much! Gonna try it soon. Suppose it's great as before or even better!

[edit]Have just tried to use your new cocoa.m. Sorrow, it seems worse than your older one. Namely, it has the same issue with keyboard layout as official qemu 2.10.1 and qemu-ppc-ozbenh-wip rebased versions (tried with 10.0DP1 with both adb and usb kbd). The layout is an absolute mess.I suppose your new work is based on a recent official qemu cocoa.m? But iit looks like last summer a bug appeared in qemu cocoa.m which brings this issue. Cat_7 build from 19.05 doesn't have this issue and newer qemu versions built with your older cocoa.m (edited a little) work just fine, too. That's why I think that something wrong was made with upstream cocoa.m last summer.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

The new cocoa.m file I uploaded is based off of the newer version of QEMU. I am sorry you are having problems with it. You say the layout is causing you problems. Are you saying when you push one key, you see the wrong letter appear? I use mainly Mac OS 10.4 and Mac OS 9.2 in QEMU and haven't noticed any keyboard problems. Could this problem be an issue with 10.0DP1?
alex195812
Mac Mechanic
Posts: 169
Joined: Mon Aug 29, 2016 3:44 am

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by alex195812 »

No, I don't think it's up to 10.DP1 as it works fine in older qemu versions (I definetely know about Cat_7's 19.05.2017 version out of latest) and it works fine with newer qemu versions compiled with your older cocoa.m.
The layout is just crazy.It's not that you see wrong characters, you just see rectangles instead.Only numerical symbols work properly.I tried qemu 2.10.1, qemu-ppc-ozbenh-wip-rebase-1, qemu-ppc-ozbenh-wip-current. All the same. Meanwhile, with your older cocoa.m everything's OK.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Hello everyone. A while ago I released a front-end for QEMU called MacQEMU. It was MacQEMU 2.0 beta 2. I have just finished MacQEMU 2.0 beta 3.

Here are the changes:
- Changed name of the front-end program to MacQEMU
- Updated included QEMU to version 2.10.1
- Compiled MacQEMU with py2app to be more like a proper Macintosh application
- Added file sharing feature
- Added root mode feature
- Added support for 256 colors in qemu-system-ppc using custom vga driver
- Changed QEMU mouse ungrab to Control-Option-g
- Changed icon of program
- Removed blank HD image file from download package

The system requirements are:
- Mac OS 10.6 or higher
- 64-bit x86 processor

The zip file can be downloaded from here:
http://www.mediafire.com/file/yuh4gb7j2 ... beta_3.zip

Please let me know what you think of it. Thank you.
User avatar
adespoton
Forum All-Star
Posts: 3111
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Looking good!

You may want to bring your window to the front at boot. I do that using:
osascript \
-e "on run(argv)" \
-e 'tell application "System Events" to set frontmost of process (argv as string) to true' \
-e "end" \

but then I'm doing that in a bash script; python likely has something more elegant.

I notice you don't have support for OS X x86... is it possible to add? Could be useful for 10.4-10.6.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

adespoton wrote:Looking good!
Thank you :)
adespoton wrote: You may want to bring your window to the front at boot. I do that using:
osascript \
-e "on run(argv)" \
-e 'tell application "System Events" to set frontmost of process (argv as string) to true' \
-e "end" \

but then I'm doing that in a bash script; python likely has something more elegant.
Python does have Toplevel.lift(). Oh you are talking about QEMU. Ok, I will see what I can do next time.
adespoton wrote: I notice you don't have support for OS X x86... is it possible to add? Could be useful for 10.4-10.6.
It is possible to add but not easy. Are you someone who still uses 32-bit x86? I thought everyone moved on to 64-bit x86.
Supporting Mac OS 10.4 would be really neat, but hard to do. It took me a couple of days to build QEMU 1.6.2 on Mac OS 10.4. It might take me a week to build QEMU 2.10.

Just the other day I was watching a video on the PowerMac G5 and was wondering how many people are still using it. It was a powerful system back in the day. Seeing QEMU run on it would be awesome to see. I just don't think many people would actually use it there.
User avatar
adespoton
Forum All-Star
Posts: 3111
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by adespoton »

Ah; I meant as a guest, not on host. I'm using 10.13.1 on my host, but VirtualBox support for 10.4 and 10.5 on modern hardware is really hit and miss, and setting up a new 10.6 client on vbox doesn't work, although running an existing VM still does. Parallels and VMWare only support 10.4 - 10.6 Server, and so far I've only got 10.6 Server to actually run; I get errors trying to get 10.4 and 10.5 Server installed on those two VMs too.

So I figure that emulating a bit more like pure QEMU does should theoretically allow us to spin up 32-bit x86 10.4 through 10.6 installers and images.
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

It's a great idea. It would be very helpful for people who want to build applications that support older versions of Mac OS X. I have heard there are patches that would make recent versions of Mac OS X run in QEMU. Here is the page: https://www.contrib.andrew.cmu.edu/~somlo/OSXKVM/. Haven't tried it out myself yet. I prefer VirtualBox for the x86 versions of Mac OS X.

I have began making guides on how to run certain operating systems in QEMU. Here is the list so far:
https://wiki.qemu.org/Documentation/Gue ... ingSystems
Programmingkid
Apple Corer
Posts: 243
Joined: Sun Jan 31, 2016 6:01 pm

Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

Post by Programmingkid »

Here are some photos of MacQEMU 2.0 beta 3:

The Setup Window:
Image

The File Sharing window:
This is where you can share a host folder as a USB flash drive on the guest, or enable network file sharing using AFP, FTP, or SMB:
Image

The Send Key window is where you can add keystroke menu items:
Image

This window displays the commands used to run QEMU - the text can be used directly in the terminal:
Image

The Preferences window is where you can add your own version of QEMU to use:
Image
Post Reply