Re: GSOC qemu Boot Mac OS >= 8.5 on PowerPC system
Posted: Thu Feb 02, 2017 3:34 am
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.
All About Macintosh Emulation
https://www.emaculation.com/forum/
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.steventroughtonsmith wrote: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.darthnvader wrote:I made a little hack to the Qemu source code, so no adb kbd/m was in the device tree:
But, when I boot Server, it still registers an adb kbd/m
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.
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
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
Thanks, it was reading the install cd, got it going now.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)
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'
Code: Select all
qemu-system-ppc-scr-vga-sun-coc: Option '-device openpic' cannot be handled by this machine
All computers have Programmable Interrupt Controllers in them. It is probably an issue with OpenBIOS.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 addingcomes to "unable to find an interrupt controller node" and adding -device openpic results asCode: 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'
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?Code: Select all
qemu-system-ppc-scr-vga-sun-coc: Option '-device openpic' cannot be handled by this machine
And did real Power Macintosh have pic?
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.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).
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
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;
}
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;
}
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,
};
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,
};
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>
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
Yes, I have a PCI sound card and an HDMI sound "device" on my Nvidia card.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).
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
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>
alex195812 wrote:What openbios version do you use?Freezing in 9.2.1 looks like an older one.
Ok, I'll give that a try.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.
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
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
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