Login  •  Register


The time is now: Tue Dec 18, 2018 9:02 pm

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 13 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Wed Aug 22, 2018 12:09 pm 
Offline
Student Driver

Joined: Mon Jun 16, 2014 12:52 pm
Posts: 19
After managing to get sound running well in 9.1, but noticing that NetBoot's version of 9.2.2 seemed faster and benchmarked better, and learning that 9.2.2 contains less/no 68k-native code (for less emulation), I figured I would try the upgrade out.

For the most part, it seemed to work fine, but it had the unfortunate side effect of breaking sound. There was still audio feedback, but it was unrecognizably choppy and cut in and out. I could narrow it down to the differences between versions of OS 9 since I was using config files that were identical past what hard drive they booted from, and the system folders was just an updated version of the other one.

Anyway, I reduced 9.1 to bare-bones configuration and found that "out of the box" with everything shut off, it has choppy sound too -- but with its audio extensions and QuickTime and its sound extensions enabled, it worked fine.

So I figured I'd try 9.2.2 with the same extensions (in their updated versions). Nothing doing.

After tinkering around with different extension configurations and failing to get anything done, I decided to take things up to the next level, and started to replace extensions and/or control panels with older versions. After this didn't work, I kept on until virtually every system component that I could fathom had or could have anything even remotely to do with sound or its playback -- everything that seems like it would make it 9.2, including the ROM, Finder, System suitcase, System Resources, Classic, Extensions, Internet Extensions, and Control Panels -- had been replaced with the 9.1 version, or removed altogether where it didn't exist before.

And after all that it *still* didn't work!

Finally I gave up, copied the contents of the working pure 9.1 system folder back onto the main previously 9.2.2 system folder. Sound works great.

Suffice it to say there's definitely a gremlin in the works somewhere, maybe hiding out in the Desktop Pictures! :wink:


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 22, 2018 2:09 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4446
Location: Sittard, The Netherlands
Did you have Quicktime 6 and iTunes 2 installed in 9.2?

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 22, 2018 9:55 pm 
Offline
Student Driver

Joined: Mon Jun 16, 2014 12:52 pm
Posts: 19
I didn't at that time, just the stock stuff that came with 9.2.1/9.2.2, so QuickTime 5. However, I've installed both on another 9.2.2 system folder.

Sound in general does seem to work better with that setup. It's still a bit out of sorts for Star Patrol, though, which is a shame since that's currently my favorite Classic Mac OS game. I'm curious if this is a problem that actual machines from that time period had. I have both a G4, and a PowerBook that I recently got from the shed and hope to find a working power adapter for, so I'll probably try it out on one or both of those and see if that is expected behavior. If it is, then I can't fault Qemu emulation for something that the system software broke in real usage cases.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 22, 2018 10:26 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2300
Location: Emaculation.com
This is a Qemu issue; the game works fine on my G4 running 9.2.2.

There's still a few bugs being worked out in the Qemu audio processing, but we've come a long way in the past 3 years.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Sep 30, 2018 4:43 am 
Offline
Space Cadet
User avatar

Joined: Sun Sep 30, 2018 4:38 am
Posts: 5
I have been trying to get this all running on Linux Mint 19 (on a Ryzen CPU). The repository QEMU is new enough to support running Mac OS, and I have Mac OS 9.2.2 up, but I am having an issue with silent audio output. I found my way to this thread in my quest to get it all worked out, but so far no luck. I'm going to include a screenshot to show you how my virtual system is configured.

Am I just going to have to wait for some kind of bug fix? I've got QuickTime 6 and iTunes installed, and it looks from the Sound control panel as if it should all be working (as it did before I installed QT and iTunes), but also as before, I just don't hear the audio. It acts like it is playing the sound. The alerts don't blink the menu bar when the volume isn't muted, for instance.

Almost forgot. My QEMU syntax is as follows:
/usr/bin/qemu-system-ppc \
-monitor stdio \
-M mac99 \
-machine accel=tcg \
-m 1024 \
-cdrom /dev/cdrom \
-hda /home/.../QEMU-MacOS9.vmdk \
-boot once=c,menu=on \
-net none \
-rtc base=localtime \
-name "Power Mac G4" \
-L pc-bios \
-cpu G4 \
-prom-env 'auto-boot?=true' \
-prom-env "vga-ndrv?=true" \
-netdev user,id=mynet0 \
-device sungem,netdev=mynet0 \
-g 1024x768x32 \
-sdl

Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Sep 30, 2018 7:22 am 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4446
Location: Sittard, The Netherlands
Hi, welcome!

Qemu doesn't support sound by default. We provide some experimental builds with sound support, but not for Linux as there are so many different distributions.
So you will need to compile your own version to get sound. If you can, I can provide you with some assistance to get a build running.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Sep 30, 2018 8:55 pm 
Offline
Space Cadet
User avatar

Joined: Sun Sep 30, 2018 4:38 am
Posts: 5
Greetings Cat! Thank you for your response. I could give that a whirl. I could also wait a while for a fix to make its way into the official QEMU builds, if that is in the works. Are there any plans to submit such code to the project? My distro is Ubuntu-based (Bionic, to be specific), so any change that affects Ubuntu should find its way to my Mint system as well.

If you want to help me build this thing, though, I have compiled code on Linux systems in the past, so I at least know the basics, i.e. how to install and use GCC, make, etc. In fact, I should be all set with that stuff now. Might be fun to give it a try!


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Sep 30, 2018 9:38 pm 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4446
Location: Sittard, The Netherlands
Ok,

We will use the terminal to build qemu. Some of the info below comes from this page:
https://wiki.qemu.org/Hosts/Linux

Start with making sure some requisite software is installed. Use the terminal:
Code:
sudo apt-get install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev


Then download the required source code to some convenient folder. In the terminal:
Code:
git clone -b screamer https://github.com/mcayland/qemu qemu-screamer
cd qemu-screamer


In the following step, you might see some errors related to missing packages. If so, use apt-get to install them. This can take several iterations before all required packages are installed.
I'm not sure which audio system your distribution uses, but for now I assume it uses pulse-audio.

Code:
./configure --target-list="ppc-softmmu" --enable-gtk --with-gtkabi=3.0 --enable-sdl --with-sdlabi=2.0 --audio-drv-list="pa"


next, build the code and strip the executable of debug info:

Code:
make
cd ppc-softmmu
strip qemu-system-ppc


Copy qemu-screamer/ppc-softmmu/qemu-system-ppc to e.g., a folder in your home folder. Also copy the whole qemu-screamer/pc-bios folder into that folder.

Create a script to start qemu in the folder to which you copied the qemu files. Make sure to change the name of the hard disk image. You can use the image of 9.22 you already have installed.

Code:
export QEMU_AUDIO_DRV=pa

./qemu-system-ppc -L pc-bios -boot c -M mac99,via=pmu -prom-env "boot-args=-v" -prom-env "vga-ndrv?=true" -m 256 -netdev user,id=network01 -device sungem,netdev=network01 -drive file=/9.2.img,format=raw,media=disk 


See how far you get.
Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Sep 30, 2018 10:40 pm 
Offline
Space Cadet
User avatar

Joined: Sun Sep 30, 2018 4:38 am
Posts: 5
I had to install some additional software to get through the configure process, namely:
sudo apt-get install libgtk-3-dev
sudo apt-get install libsdl2-dev

Following that, the build was a success! I copied the executable and the BIOS folder to a different directory and ran it with otherwise the same syntax. The result is it runs and, interestingly, shows a "SPATIALIZER AUDIO LABORATORIES" logo in the Sound control panel. It also shows a lot of resolution options in the Monitors control panel, something I don't think the system's QEMU build did, and indeed I had to use it because the system changed to a lower resolution as it booted.

However, the sound is still silent on the output, unfortunately. I think I also just caused a soft lock by changing the main volume. The cursor still moves, but I can't click now.

I force-quit the control panel and reopened it. Still no sound out. I've just noticed that there is a built-in microphone input option now as well, whereas the repo QEMU had only shown Internal CD as an option.

System shutdown from the menu works as always. I am retrying it with 256 MB of RAM instead of 1 GB. Aha! Now I do have sound output. Interesting! It is buggy, but in the same way as the output I get when emulating the Soundblaster 16 in an x86 VM - sound plays with a corrupted static and echo to it. I guess that is a Linux-specific QEMU bug that no one is able or willing to fix, as I have been experiencing that for a long time. I've got iTunes playing a song now. With any luck, the glitch will work itself out over time the way it does on x86 SB16 emulation. I'll see.

Edit to add: Playing through the song twice has not helped. Still sounds bad.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Oct 01, 2018 5:35 am 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4446
Location: Sittard, The Netherlands
Hi,

I got best results with both Quicktime 6 and iTunes 2 installed.

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Oct 01, 2018 6:17 am 
Offline
Space Cadet
User avatar

Joined: Sun Sep 30, 2018 4:38 am
Posts: 5
Cat_7 wrote:
Hi,

I got best results with both Quicktime 6 and iTunes 2 installed.

Best,
Cat_7


Well, that is what I have, unless you mean my versions are too new. My screenshot shows that I have QuickTime 6.0.3 and iTunes 2.0.4. But again, QEMU seems to have a nasty audio latency issue on Linux hosts, and that seems to be the culprit. I wonder whether that will ever get fixed! Open source software can be frustratingly slow to improve at times.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Oct 01, 2018 9:12 am 
Offline
Expert User
User avatar

Joined: Fri Feb 13, 2004 8:59 am
Posts: 4446
Location: Sittard, The Netherlands
On an older 3.5 Ghz i7 with OSX/Windows/Linux I can play songs without a hitch, provided I run 9.1 or 9.2. Sound in OSX is not usable.

What is you command line? Do you use -device usb-mouse -device usb-kbd?
And the machine type? -mac99,via=pmu?

Best,
Cat_7


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Mon Oct 01, 2018 5:06 pm 
Offline
Space Cadet
User avatar

Joined: Sun Sep 30, 2018 4:38 am
Posts: 5
Cat_7 wrote:
On an older 3.5 Ghz i7 with OSX/Windows/Linux I can play songs without a hitch, provided I run 9.1 or 9.2. Sound in OSX is not usable.

What is you command line? Do you use -device usb-mouse -device usb-kbd?
And the machine type? -mac99,via=pmu?

Best,
Cat_7


I was just using -mac99 and not specifying USB devices. Trying that, it is behaving the same way. ... Or was at first, but now it has eventually cleared up after just over two minutes of playback. It does sound pretty good now, but with a little bit of static still making its way in. I happen to have a VirtualBox VM open simultaneously with it, though, and that shares the sound system. Maybe that also has an influence on this. I had Firefox open with a paused YouTube video up the last time around.

But, once again, that's more on QEMU in general on a Linux host than on the Mac-specific stuff, I'm quite sure. Maybe you'll notice the same issue if you have another sound playback application open, such as a media player or a VM. Want to try and see what you get? I always get at least temporary sound corruption with QEMU on a Linux system and SoundBlaster emulation, or now, Mac sound emulation.


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 13 posts ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group