GSOC qemu Boot Mac OS >= 8.5 on PowerPC system

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

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 »

Yes,all of that(without qestion marks).You can also boot 10.5 in mac99 with -device usb-kbd -device usb-mouse.DP1 needs -usb -device usb-mouse,too.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

steventroughtonsmith wrote:
darthnvader wrote:I made a little hack to the Qemu source code, so no adb kbd/m was in the device tree:

Image

But, when I boot Server, it still registers an adb kbd/m

Image

So, either BootX, or the Kernel is hardcoded to create this in the device tree, so it may not be unreasonable to expect that these devices need to be @0,0, rather than @9.

I can't find anywhere in the Qemu source code that hardcodes these devices to be @9( kbd ) and @8( mouse ), but that doesn't mean it isn't there, I may have just not found it yet.
I am not the right person to be trying to explain this, but it looks like CUDA (timing perhaps?) is responsible for the keyboard/mouse not working. Figuring this out requires a deep dive into the roughly contemporary kernel source http://vpsland.superglobalmegacorp.com/ ... 0.3.tar.gz and knowledge of a lot of low level CUDA specifics and how to debug them in qemu. You'll want to be recompiling qemu and probably openbios with a bunch of extra logging added just to get a start at this.

mach remaps all the adb devices at boot, so the IDs shouldn't matter. From what I can see, adb absolutely is functioning to some extent, but the emulation may not be correct enough for this version of mach in Server 1.x to accept it.

Extra eyes would surely be appreciated, but know going in that this doesn't seem like it's a trivial fix. There's been an off-forum discussion going on about this for the last couple weeks as we try and upstream changes to openbios :smile:
Thanks Steven, I see your point, the Kernel code has adb functions spread out all over the place. I did see where it probes the ADB bus, so it shouldn't really matter the address OF hands to BootX, or the Kernel.

I was hoping this would be an easy fix, better minds than mine will likely be required to fix it, it's good to know that it is an ongoing topic with these who understand it better than I do :mrgreen:
User avatar
adespoton
Forum All-Star
Posts: 4227
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 »

Since various components are already polling USB via ADB, it seems like it would be more useful for qemu to provide a usb-adb shim than to try and fix things at a deeper level. Then you just need to know when to enable it and when to use standard USB. It could be a subset of the USB flag that builds up an additional ADB interface that gets notified alongside the USB interface.

I'm obviously not in the email discussion :)
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

Can someone help me out with DP2, I partitioned a raw disk image, with the Disk Utility from 10.0 install cd, and DP2 installs, but I can't boot it.

diskutil list:

Code: Select all

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +4.3 GB     disk3
   1:        Apple_partition_map                         32.3 KB    disk3s1
   2:             Apple_Driver43                         28.7 KB    disk3s2
   3:             Apple_Driver43                         28.7 KB    disk3s3
   4:           Apple_Driver_ATA                         28.7 KB    disk3s4
   5:           Apple_Driver_ATA                         28.7 KB    disk3s5
   6:             Apple_FWDriver                         262.1 KB   disk3s6
   7:         Apple_Driver_IOKit                         262.1 KB   disk3s7
   8:              Apple_Patches                         262.1 KB   disk3s8
   9:                 Apple_Boot MOSX_Booter             8.4 MB     disk3s9
  10:               Apple_Loader                         524.3 KB   disk3s10
  11:                  Apple_HFS MacOSX                  4.3 GB     disk3s11

Code: Select all

/Users/jam2/Downloads/qemu-scr-sun-co10012017/qemu-system-ppc-scr-vga-sun-coc   -boot c -prom-env 'boot-args=-v rd=hd0' -prom-env 'boot-device=hd:9,\\:tbxi' -drive file=/Users/jam2/Downloads/qemu-scr-sun-co10012017/DP2.img,index=1,format=raw,media=disk -drive file=/Users/jam2/Downloads/Apple\ Mac\ OS\ X\ 10.0\ \(\'\'Kodiak\'\'\ 10.0\ Developer\ Preview\ 2\)/MacOSX_developer_preview_2.iso,index=0,format=raw,media=cdrom -bios /Users/jam2/Downloads/qemu-scr-sun-co10012017/openbios-qemu-wip-13082016.elf -g 1024x666x8 -M g3beige -cpu G3
It can't find tbxi on partition 9?

Image

Anyone know what I'm doing wrong?
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 »

After installation you should start with simple "boot" command in openbios.
And I think you should swap indices of drvives(hard disk must become 0)
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

alex195812 wrote:After installation you should start with simple "boot" command in openbios.
And I think you should swap indices of drvives(hard disk must become 0)
Thanks, it was reading the install cd, got it going now.

Can't find any way to change the screen resolution?
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 »

Without assigning -g on command line it boots to desktop and there you get working resolutions(as far as I remember).Though you can change them on command line,too,say -g 1024x768x32 or somehow.

As Server input problem seems too hard,I've returned to endeavours of booting Mac OS 8.6.As in mac99 it brings to "System bomb" with "bus error' it seems natural to try booting in g3beige.But direct attempt gives "This image is not for this platform",attempt to cheat on Mac OS ROM adding

Code: Select all

-prom-env 'boot-command=dev / " PowerMac3,1" encode-string " model" property " PowerMac3,1" encode-string " MacRISC" encode-string encode+ " MacRISC2" encode-string encode+ " Power Macintosh" encode-string encode+ " compatible" property'
comes to "unable to find an interrupt controller node" and adding -device openpic results as

Code: Select all

qemu-system-ppc-scr-vga-sun-coc: Option '-device openpic' cannot be handled by this machine
In device tree for g3beige (unlike mac99) there's no pic.Is this for real?How can we boot so many systems without an interrupt controller?Does anybody understand what's the matter?
And did real Power Macintosh have pic?
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:Without assigning -g on command line it boots to desktop and there you get working resolutions(as far as I remember).Though you can change them on command line,too,say -g 1024x768x32 or somehow.

As Server input problem seems too hard,I've returned to endeavours of booting Mac OS 8.6.As in mac99 it brings to "System bomb" with "bus error' it seems natural to try booting in g3beige.But direct attempt gives "This image is not for this platform",attempt to cheat on Mac OS ROM adding

Code: Select all

-prom-env 'boot-command=dev / " PowerMac3,1" encode-string " model" property " PowerMac3,1" encode-string " MacRISC" encode-string encode+ " MacRISC2" encode-string encode+ " Power Macintosh" encode-string encode+ " compatible" property'
comes to "unable to find an interrupt controller node" and adding -device openpic results as

Code: Select all

qemu-system-ppc-scr-vga-sun-coc: Option '-device openpic' cannot be handled by this machine
In device tree for g3beige (unlike mac99) there's no pic.Is this for real?How can we boot so many systems without an interrupt controller?Does anybody understand what's the matter?
And did real Power Macintosh have pic?
All computers have Programmable Interrupt Controllers in them. It is probably an issue with OpenBIOS.

I agree, I think we should try to make Mac OS 8.6 boot in QEMU. Last time I heard, the problem with it was a missing Run Time Abstraction Services node.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

alex195812 wrote:Oh,it's nice to have Windows builds,too!Thanx!Here is the source: https://drive.google.com/open?id=0B69bs ... HAwSkRGZ1U
The latest ProgrammingKid cocoa file(if needed): http://www.mediafire.com/file/247u52aky ... file_3.zip
Openbios binary(Old World vga,screamer,sungem and Steven's patch to support DP1/Server boot):
https://drive.google.com/open?id=0B69bs ... mdIa2t0Um8 Breaks OS 9.0/9.04 boot(no fix yet).
I downloaded your source and made a couple of changes, to try and support my sound card. It only works in 48000 Khz audio, and screamer was trying to change it to 44100 Khz, but I must have broken it, because, while the errors are gone, I have no sound device in the System Preferences in 10.2/3.

The error I was getting before the change:

Code: Select all

coreaudio: Could not initialize playback
coreaudio: Could not set samplerate 44100
coreaudio: Reason: kAudioDeviceUnsupportedFormatError
coreaudio: Could not initialize playback
coreaudio: Could not set samplerate 44100
coreaudio: Reason: kAudioDeviceUnsupportedFormatError
audio: Failed to create voice `screamer'
screamer: Could not open voice
the screamer.c I changed:

Code: Select all

static void screamer_reset(DeviceState *dev)
{
    ScreamerState *s = SCREAMER(dev);
    
    memset(s->regs, 0, sizeof(s->regs));
    memset(s->codec_ctrl_regs, 0, sizeof(s->codec_ctrl_regs));

    s->rate = 44100;
    s->bpos = 0;
    s->ppos = 0;

    screamer_update_settings(s);

    return;
}

static void screamer_realizefn(DeviceState *dev, Error **errp)
{
    return;
}

static void screamer_control_write(ScreamerState *s, uint32_t val)
{
    SCREAMER_DPRINTF("%s: val %" PRId32 "\n", __func__, val);
        
    /* Basic rate selection */
    switch ((val & 0x700) >> 8) {
    case 0x00:
        s->rate = 44100;
        break;
    case 0x1:
        s->rate = 29400;
        break;
    case 0x2:
        s->rate = 22050;
        break;
    case 0x3:
        s->rate = 17640;
        break;
    case 0x4:
        s->rate = 14700;
        break;
    case 0x5:
        s->rate = 11025;
        break;
    case 0x6:
        s->rate = 8820;
        break;
    case 0x7:
        s->rate = 7350;
        break;
    }


To:

Code: Select all

static void screamer_reset(DeviceState *dev)
{
    ScreamerState *s = SCREAMER(dev);
    
    memset(s->regs, 0, sizeof(s->regs));
    memset(s->codec_ctrl_regs, 0, sizeof(s->codec_ctrl_regs));

    s->rate = 48000;
    s->bpos = 0;
    s->ppos = 0;

    screamer_update_settings(s);

    return;
}

static void screamer_realizefn(DeviceState *dev, Error **errp)
{
    return;
}

static void screamer_control_write(ScreamerState *s, uint32_t val)
{
    SCREAMER_DPRINTF("%s: val %" PRId32 "\n", __func__, val);
        
    /* Basic rate selection */
    switch ((val & 0x700) >> 8) {
    case 0x00:
        s->rate = 48000;
        break;
    case 0x1:
        s->rate = 29400;
        break;
    case 0x2:
        s->rate = 22050;
        break;
    case 0x3:
        s->rate = 17640;
        break;
    case 0x4:
        s->rate = 14700;
        break;
    case 0x5:
        s->rate = 11025;
        break;
    case 0x6:
        s->rate = 8820;
        break;
    case 0x7:
        s->rate = 7350;
        break;
    }
And in the audio.c I changed:

Code: Select all

static struct {
    struct fixed_settings fixed_out;
    struct fixed_settings fixed_in;
    union {
        int hertz;
        int64_t ticks;
    } period;
    int try_poll_in;
    int try_poll_out;
} conf = {
    .fixed_out = { /* DAC fixed settings */
        .enabled = 1,
        .nb_voices = 1,
        .greedy = 1,
        .settings = {
            .freq = 44100,
            .nchannels = 2,
            .fmt = AUD_FMT_S16,
            .endianness =  AUDIO_HOST_ENDIANNESS,
        }
    },

    .fixed_in = { /* ADC fixed settings */
        .enabled = 1,
        .nb_voices = 1,
        .greedy = 1,
        .settings = {
            .freq = 44100,
            .nchannels = 2,
            .fmt = AUD_FMT_S16,
            .endianness = AUDIO_HOST_ENDIANNESS,
        }
    },

    .period = { .hertz = 100 },
    .try_poll_in = 1,
    .try_poll_out = 1,
};
To:

Code: Select all

static struct {
    struct fixed_settings fixed_out;
    struct fixed_settings fixed_in;
    union {
        int hertz;
        int64_t ticks;
    } period;
    int try_poll_in;
    int try_poll_out;
} conf = {
    .fixed_out = { /* DAC fixed settings */
        .enabled = 1,
        .nb_voices = 1,
        .greedy = 1,
        .settings = {
            .freq = 48000,
            .nchannels = 2,
            .fmt = AUD_FMT_S16,
            .endianness =  AUDIO_HOST_ENDIANNESS,
        }
    },

    .fixed_in = { /* ADC fixed settings */
        .enabled = 1,
        .nb_voices = 1,
        .greedy = 1,
        .settings = {
            .freq = 48000,
            .nchannels = 2,
            .fmt = AUD_FMT_S16,
            .endianness = AUDIO_HOST_ENDIANNESS,
        }
    },

    .period = { .hertz = 100 },
    .try_poll_in = 1,
    .try_poll_out = 1,
};
Can you offer any help on how to do this right?

Like I say, the errors are gone, but no output device.
User avatar
Cat_7
Expert User
Posts: 6145
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,

Check this commit:
https://github.com/mcayland/qemu/commit ... 289c9c3e28
particularly line 209 and on in screamer.c. That part was deleted due to speed issues with sound:
48000 made sound run too fast..... ;-)

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 »

Oh,it's higher than me at present :smile: .
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

Thanks, I have another sound device, that does support 44100 Khz, but it does't show up in the System Preference either?

It Supports
@44100 Khz
2 CH 16 bit Integer
2 Ch 20 bit Integer
2 Ch 24 Bit Integer


Any clue what I should set it to?

Do I need to pass any audio flags to Qemu to get an audio device?

I can't figure it out, I don't get any coreaudio errors, when I select my HDMI sound card, but it won't work.

I know it supports coreaudio:

Code: Select all

	<dict>
						<key>_name</key>
						<string>HDMI</string>
						<key>coreaudio_device_manufacturer</key>
						<string>Apple Inc.</string>
						<key>coreaudio_device_output</key>
						<integer>2</integer>
						<key>coreaudio_device_srate</key>
						<real>44100</real>
						<key>coreaudio_device_transport</key>
						<string>coreaudio_device_type_hdmi</string>
User avatar
Cat_7
Expert User
Posts: 6145
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, I seem to remember that not all versions of OSX show the audio device.

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 »

It needs some clarification.
1)You have 2 sound cards on host,yes?
2)You have 2 qemu builds,modified and unmodified.
3)You have 2 OS X--host and guest.
Well,no doubt that your host sound cards won't appear in guest System Prefefences under any circumstances.The emulated AWACS(screamer) should.To make qemu use another host sound card you have to choose appropriate value in host System Preferences>Sound>Output (and connect your speakers to that output) and then the whole host will use the other card(qemu,too).If a sound device doesn't show up in host System Preferences it's a problem with host drivers.
AFAIK,not all OS X guests support screamer.DPs do not, I seem.And screamer really works only in mac99(though it may appear in g3beige,too).
Last edited by alex195812 on Sat Feb 04, 2017 2:58 am, edited 2 times in total.
User avatar
Meow_2004
Granny Smith
Posts: 108
Joined: Thu Jan 05, 2017 6:24 pm

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

Post by Meow_2004 »

Hi, Is there any way to get Mac OS X 10.1? I get the error "No valid state has been set by load or init-program" Help!
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 »

Your command line,please?
User avatar
Meow_2004
Granny Smith
Posts: 108
Joined: Thu Jan 05, 2017 6:24 pm

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

Post by Meow_2004 »

Code: Select all

qemu-system-ppc.exe -bios openbios-ppc -L pc-bios -boot d -m 512 -M mac99 -prom-env "auto-boot?=false" -prom-env "boot-args=-v -g 800x600x32 -sdl -cpu G3 -device usb-mouse -drive file=10.1.iso,format=raw,media=cdrom -drive file=10.1.raw,format=raw,media=disk
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 »

With 10.1 you can use G4(it's better).And no need in usb-mouse.And no need to specify -g.
Looks OK.Next type boot in qemu window.
Last edited by alex195812 on Sat Feb 04, 2017 2:39 am, edited 1 time in total.
User avatar
Meow_2004
Granny Smith
Posts: 108
Joined: Thu Jan 05, 2017 6:24 pm

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

Post by Meow_2004 »

just boot? ok, i've been typing boot cd:9,\\:tbxi, and i'll change it to -cpu G4. Will test it tomorrow
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

alex195812 wrote:It needs some clarification.
1)You have 2 sound cards on host,yes?
2)You have 2 qemu builds,modified and unmodified.
3)You have 2 OS X--host and guest.
Well,no doubt that your host sound cards won't appear in guest System Prefefences under any circumstances.The emulated AWACS(screamer) should.To make qemu use another host sound card you have to choose appropriate value in host System Preferences>Sound>Output (and connect your speakers to that output) and then the whole host will use the other card(qemu,too).If a sound device doesn't show up in host System Preferences it's a problem with host drivers.
AFAIK,not all OS X guests support screamer.DPs do not, I seem.And screamer really works only in mac99(though it may appear in g3beige,too).
Yes, I have a PCI sound card and an HDMI sound "device" on my Nvidia card.

Yes, I tried both my modified qemu, and the unmodified qemu.

Yes I'm running Sierra as my host.

I'm not having trouble with sound on the host, both audio devices work fine, and report they are supported by coreaudio.

I tested in 9.2.1, 10.2.0, and 10.3.9, in 9.2.1 the sound control panel would freeze when I opened it. In both 10.2/3, there was just no output device in the System Preference.

I tried removing the PCI sound card from the computer, but the HDMI sound still didn't work.

No great issue, I just thought I'd try and get sound to work, because every time I boot qemu-system-ppc-scr-vga-sun-coc, it complains that coreaudio can't change the sampling rate to 44100.

The output of system_profiler SPAudioDataType, run from the command line:

Code: Select all

 Devices:

        iSight:

          Default Input Device: Yes
          Input Channels: 1
          Manufacturer: Apple, Inc.
          Current SampleRate: 48000
          Transport: FireWire

        HDMI:

          Manufacturer: Apple Inc.
          Output Channels: 2
          Current SampleRate: 44100
          Transport: HDMI

        kX SB0240 10k2 [ef00]:

          Default Output Device: Yes
          Default System Output Device: Yes
          Manufacturer: Eugene Gavrilov, kX Project
          Output Channels: 8
          Current SampleRate: 48000
          Transport: PCI
And system_profiler SPAudioDataType -xml :

Code: Select all

<key>_name</key>
						<string>iSight</string>
						<key>coreaudio_default_audio_input_device</key>
						<string>spaudio_yes</string>
						<key>coreaudio_device_input</key>
						<integer>1</integer>
						<key>coreaudio_device_manufacturer</key>
						<string>Apple, Inc.</string>
						<key>coreaudio_device_srate</key>
						<real>48000</real>
						<key>coreaudio_device_transport</key>
						<string>coreaudio_device_type_firewire</string>
					</dict>
					<dict>
						<key>_name</key>
						<string>HDMI</string>
						<key>coreaudio_device_manufacturer</key>
						<string>Apple Inc.</string>
						<key>coreaudio_device_output</key>
						<integer>2</integer>
						<key>coreaudio_device_srate</key>
						<real>44100</real>
						<key>coreaudio_device_transport</key>
						<string>coreaudio_device_type_hdmi</string>
					</dict>
					<dict>
						<key>_name</key>
						<string>kX SB0240 10k2 [ef00]</string>
						<key>_properties</key>
						<string>coreaudio_default_audio_system_device</string>
						<key>coreaudio_default_audio_output_device</key>
						<string>spaudio_yes</string>
						<key>coreaudio_default_audio_system_device</key>
						<string>spaudio_yes</string>
						<key>coreaudio_device_manufacturer</key>
						<string>Eugene Gavrilov, kX Project</string>
						<key>coreaudio_device_output</key>
						<integer>8</integer>
						<key>coreaudio_device_srate</key>
						<real>48000</real>
						<key>coreaudio_device_transport</key>
						<string>coreaudio_device_type_pci</string>
Odd, that the HDMI doesn't work, but I just like to hear the systems sound, not that I'm going to try and do audio production in Qemu.
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 »

What openbios version do you use?Freezing in 9.2.1 looks like an older one.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

alex195812 wrote:What openbios version do you use?Freezing in 9.2.1 looks like an older one.

/qemu-scr-sun-co10012017/openbios-qemu-wip-13082016.elf
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 should have guessed!This version doesn't support screamer.It is provided for its ability to boot OS 9.0 mostly.You should use openbios-qemu-scr-sunM.elf.
Generally,screamer should appear no matter does qemu like your soundcard or not.In a bad case there'll be no real sound.
darthnvader
Mac Mechanic
Posts: 178
Joined: Sun Feb 07, 2016 4:40 pm

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

Post by darthnvader »

alex195812 wrote:I should have guessed!This version doesn't support screamer.It is provided for its ability to boot OS 9.0 mostly.You should use openbios-qemu-scr-sunM.elf.
Generally,screamer should appear no matter does qemu like your soundcard or not.In a bad case there'll be no real sound.
Ok, I'll give that a try.

BTW do any Xcode gurus know how to disable -fapple-kext?

The only documentation I could find said that setting:

GCC_ENABLE_KERNEL_DEVELOPMENT = NO

Should disable -fapple-kext, but it doesn't seem to work?

EDIT: Thanks, alex, that got sound working, however it's garbed, and playing a mp3 in iTunes seems to use all the resources of the guest system. It becomes unresponsive, but the playback does continue.

I tried with my HDMI sound device:

Code: Select all

qemu-system-ppc-scr-vga-sun-coc  -prom-env 'boot-args=-v' -hda  /Users/jam2/Documents/MacHDX.img    -bios  /Users/jam2/Downloads/qemu-scr-sun-co10012017/openbios-qemu-scr-sunM.elf -M mac99 -cpu G4 -m 1024 


In OS X 10.2.0, and I also tried the modified qemu, with my PCI sound card:

Code: Select all

qemu-system-ppc -prom-env 'boot-args=-v' -hda  /Users/jam2/Documents/MacHDX.img    -bios  /Users/jam2/Downloads/qemu-scr-sun-co10012017/openbios-qemu-scr-sunM.elf -M mac99 -m 1024 -cpu G4
Really, the same result with both, sound garbled. I haven't tested with 10.3.9, yet.

I opened the MIDI Setup app, on the guest OS and gleaned that the Build-in sound was set to 441000 sampling rate and 2 CH 16 bit integer. So I set my host OS sound to that, and shutdown qemu, and ran it again, but had the same result, with the HDMI.

I'm working on building the sound drive kext and setup apps for my PCI kx device, it says it supports 441000 sampling rate, in the source code, but it doesn't show up in the MIDI setup, of the host. The only option I get it 48000 8 CH 32 bit integer. The setup app that comes with the driver source doesn't launch, so I'm working on trying to build it, but I'm having the -fapple-kext flag passed to clang, by Xcode, and can't figure out how to disable that.

I'm using a rebuilt binary of the kx.kext. for my PCI sound card now, if I can rebuild it, maybe I can have 44100 and be able to select 16 bit integer.

EDID2: Launching qemu seems to set my HDMI device to 44100 sampling rate and 2 CH 24 bit integer on the host, even tho the guest reports 16 bit integer.

I'm not sure that matters?
User avatar
Meow_2004
Granny Smith
Posts: 108
Joined: Thu Jan 05, 2017 6:24 pm

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

Post by Meow_2004 »

DP4: I get up to Starting ATS Server or something like that, and it closes out on me :(

Code: Select all

qemu-system-ppc.exe -bios openbios-ppc -L pc-bios -boot d -m 256 -M mac99 -prom-env "auto-boot?=false" -prom-env "boot-args=-v" -g 800x600x32 -cpu G3 -drive file=MacOSX_developer_preview_4.iso,format=raw,media=disk -drive file=DP4.raw,format=raw,media=disk
Post Reply