1440p in OS 9.2.2

About Qemu-system-ppc, 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

Post Reply
koonat
Space Cadet
Posts: 3
Joined: Sat Sep 26, 2020 4:56 am

1440p in OS 9.2.2

Post by koonat »

EDIT: I got my desired resolution by just passing -g 2560x1440x32 on the commandline... I tried that when I initially installed and it only seemed to have set the dimensions of the qemu window and not the actual guest desktop, so I didn't think it would work... sigh. Regardless, it still would be interesting to know where the resolution values are sourced from and defined. Now at this point I suppose the only thing at all troubling compared to sheepshaver is the mouse smoothness, but I'll keep plonkin' around.


So I just decided to switch over to qemu from SheepShaver under linux (which worked great, really, but I wanted to try 9.2.2).

I started by running qemu 5.1.50 from my distro (gentoo) and using -device VGA,edid=on gave me a nice list of resolutions, but not 1440p. (And naturally I didn't have sound)

So I ran $ git clone -b screamer https://www.github.com/mcayland/qemu

And tried to configure it with --target-list="ppc-softmmu" --enable-sdl --with-sdlabi=2.0 --audio-drv-list="pa"

But the configure script has no option of "--with-sdlabi=2.0" (anymore?) so I'm not sure if that's the problem or what, but now, in my monitor control panel the only resolution available to me is 800x600.

Is there something tweakable somewhere? Is it possible to enable 1440p in general - and any suggestions as to how to get back what resolutions options I DID have before switching to this screamer branch? (By the way, with the screamer branch my sound seems to work OK, but it just says it's using 'built in' and I see no trace of "spacialize --(forget the rest)". Just looks the same as when it didn't work.

Mad respect to the people who got everything this far, by the way. Awesome work.
User avatar
Cat_7
Expert User
Posts: 6179
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: 1440p in OS 9.2.2

Post by Cat_7 »

Hi,

Yes, the initial resolution only applies to the openbios window. The guest then takes over.

If you only have 800x600 available that means the vga driver was not loaded. This driver (qemu_vga.ndrv) is in the pc-bios folder in your screamer source tree.
You can copy the folder over to your Qemu folder and use the command line argument -L "path to pc-bios folder" to point to it.
Loading of the driver is controlled with the command line argument -prom-env "vga-ndrv?=true" (or false).

The driver provides a maximum resolution of 2560x1080. It would have to be edited or recompiled with new options to provide the resolution you prefer. I seem to remember the source code for the driver should be compiled with MPW on Mac OS 9.2 ;-) See here: https://github.com/ozbenh/QemuMacDrivers

Please note that for sound to work you need the openbios-ppc from the pc-bios folder in the screamer source tree. This file is found automatically when you use the -L argument as said above.
The spatializer stuff only confirms you are using the correct openbios-ppc file to support sound. it should show up under the built-in option on the output tab of the sound control panel.

I believe support for SDL 1.2 has been depricated, so the --with-sdlabi argument is no longer needed or supported.

Best,
Cat_7
koonat
Space Cadet
Posts: 3
Joined: Sat Sep 26, 2020 4:56 am

Re: 1440p in OS 9.2.2

Post by koonat »

So after experimenting just a bit, I can definitely confirm that the following gives me a fully usable desktop at 1440p (identified as "VGA Display" in the monitor control panel):

Code: Select all

./qemu-system-ppc -L ./pc-bios -boot c -M mac99,via=pmu -m 512 -prom-env "auto-boot?=true" -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -drive file=macos92.img,format=raw,media=disk -device VGA,edid=on  -device usb-mouse -g 2560x1440x32
Doing nothing else but removing the -g flag puts me back at 800x600 (as the only option) also identifying as "VGA Display".

If there is some issue with the contents of my pc-bios directory I'm not sure... I'm pointing to it explicitly in the command (it's in the same directory as my qemu-system-ppc binary). I have sound working - I don't see the spatializer icon stuff.
EDIT: I don't know why I didn't try this initally... I just tested -L "./nonsense-directory-name-that-doesnt-exist" - and the behavior is exactly the same... so, either it's finding the pc-bios on its own and completely ignoring the flag - or it's not finding the directory either way and getting 'some' pc-bios contents from somewhere I can't imagine.

With -g I have my resolution, even if it's not loading the driver. (Though I imagine if it weren't loading these openbios components I'd have thrown errors or at the very least not gotten even this much functionality) - but I suspect it is indeed not loading the VGA driver because this behavior is also identical when I set -prom-env "vga-ndrv?=false". My only concern about all this is perhaps I am throwing some large amount of performance out the window using some lesser video driver.

qemu is a vast behemoth of stuff I've never looked at before this evening, so I have much to learn, for sure.

It appears the only remaining problem I have is with my mouse. It seems to poll at an incredibly low rate - exacerbated by the acceleration inherit in os9. I've tried with and without the -device usb-mouse flag and with-and-without the via=pmu and do not notice any difference. I wonder if the problem is related to the video driver, though I'm uncertain of that as well because when I use the non-screamer build and have access to the list of supported resolutions (ending at 2560x1080 as you say) the mouse feels identical, and seeing that resolution makes me confident that at the very least in THAT instance it is loading the expected VGA driver.
User avatar
Cat_7
Expert User
Posts: 6179
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: 1440p in OS 9.2.2

Post by Cat_7 »

Hi,

You are piling several options on top of each other that slow down Qemu:
Not using the vga driver, enabling sound, running a high resolution.

Qemu aims to be fast, but not at the cost of accuracy. Therefore it runs most software without problems, but slowly when compared to SheepShaver. I guess (don't know) the lack of speed is also inherent in the program architecture as it could perhaps make more use of threading. There are several options for acceleration but these are not available when emulating ppc on intel with qemu-system-ppc.
You can regain some fpu speed (about 50% performance increase) by using a hard float patch, but that will make you loose some accuracy. I have that patch somewhere, let me know if you want it.

What this boils down to: I guess it will not get much better any time soon. Unless you buy a beast of a host machine...

Your command line can be simplified by removing the options that are set by default anyway or have no effect when booting Mac OS 9.x:
-prom-env "auto-boot?=true" -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -device usb-mouse

About the pc-bios folder: do you also have a qemu installation from your distro? Or did you do a make install after compiling? Does it work when just entering -L pc-bios (without the ./)
What is are the dates displayed in the openbios window when using the screamer build or the default qemu build?

Best,
Cat_7
koonat
Space Cadet
Posts: 3
Joined: Sat Sep 26, 2020 4:56 am

Re: 1440p in OS 9.2.2

Post by koonat »

Hi thanks for your answers, my experimentation here is probably not terribly note worthy but in case it interests anyone, here goes...

So, first of all, it appears that the -L flag is ignored if invalid and it will just use whichever 'pc-bios/' it finds in the path of the executable. (Confirmed by looking at build times in the >>OpenBIOS 1.1 line in the serial0 output of qemu).
  • Using my screamer built binary with -L pointing to the system's install location of the bios files (for me, /usr/share/qemu) boots up and appears to work fine, but naturally, no sound.
  • Using my system installed binary with -L pointing to the screamer build's pc-bios/ gets stuck during boot (which, is fine, makes sense) - but this does indeed confirm the -L behavior I was curious about.
  • In either case all video behavior appears to be identical regardless of the value of 'vga-ndrv?=true/false' - if there are any other video drivers that COULD be loaded I'm not sure how - or where they would be
In any case, regardless of any settings I've banged around in any which way, my mouse performance is identical. (Feels the same in 800x600@256 and 2560x1440@32k in either my system supplied qemu or the screamer branch and with any variety of flags applied whichever way. It's not unusable, it's just very inconsistent, it feels like the system applied mouse-acceleration is confused by the low polling rate from qemu - so depending on the DPI of my mouse (which is hardware configurable) it speeds up and slows down in almost inverse proportion to the speed at which I move it.

It's a shame because in any case my CPU is not terribly burdened, if it was pegged at 100% the entire time I'd have some faith that a more beastly host would solve the problem (I'm on an i7 9700k, which is pretty beastly as is, haha).

If there is any curiosity, my benchmark results from this Norton utilities system info deal of my qemu supplied from my distro and built from the screamer branch are as follows:
System Ratings - qemu OpenBIOS 1.1 - (system installed from distro): at 1024x768x32 (selected from the list of resolution in monitor control panel)
-- CPU overall rating: 3719
-- Video overall rating: 2713
-- FPU overall rating: 452
-- (No sound of course)

System Ratings - qemu OpenBIOS 1.1 - (built from screamer branch): With -g 1024x768x32
-- CPU overall rating: 3341
-- Video overall rating: 2842
-- FPU overall rating: 444
-- (Sound working)

System Ratings - qemu OpenBIOS 1.1 - (built from screamer branch): With -g 2560x1440x32
-- CPU overall rating: 3615
-- Video overall rating: 2516
-- FPU overall rating: 444
-- (Sound working)
The CPU overall rating is probably just fluctuating because I haven't exactly built some clean-room environment for the test, no surprise. The FPU rating being low across the board isn't a shock either, and the video rating difference is probably the most interesting, being higher in screamer than default as expected but surprisingly very minimally impacted by the DRAMATIC difference in resolution.

I have no particular goal with this emulation, I'm really just partying. I got 9.0.4 working with SheepShaver to such an extent that I was bored of it. (Even set up an ssl-bump squid proxy on my host to let me browse the web more effectively). I just wanted to see how much of an impact 9.2.2 had on stability with its MMU.

I would be very interested to check out this FPU patch, since I'm just here for a good time anyway, haha.
And thanks again for your input, I think everything helpful I've read on the topic of classic mac OS emulation has had your involvement!
Post Reply