Skip to contentSkip to conversation

Implement the Screamer sound chip for the mac99 machine type

PATCH In review John Arbuckle 2 participants 6 messages Feb 18, 2020 – Feb 24, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 Implement the Screamer sound chip for the mac99 machine type

This patch enables the playback of audio on a Mac OS 9 or Mac OS X guest.

---
v4 changes:
- Switched to using HWADDR_PRIx in several debug statements.

v3 changes:
- Updated the location of patched code in hw/ppc/kconfig.
- Removed setting the props variable in screamer.c.
- Removed the screamer_properties variable in screamer.c.

v2 changes:
- Fixed a bug that prevented the sampling rate from being changed.

 hw/audio/Kconfig              |   3 +
 hw/audio/Makefile.objs        |   2 +
 hw/audio/screamer.c           | 985 ++++++++++++++++++++++++++++++++++++++++++
 hw/misc/macio/macio.c         |  35 +-
 hw/ppc/Kconfig                |   1 +
 hw/ppc/mac.h                  |   5 +
 include/hw/audio/screamer.h   |  42 ++
 include/hw/misc/macio/macio.h |   2 +
 8 files changed, 1074 insertions(+), 1 deletion(-)
 create mode 100644 hw/audio/screamer.c
 create mode 100644 include/hw/audio/screamer.h
hw/audio/Kconfig +3 -0
index e9c6fed826..196da6c3fe 100644
@@ -50,3 +50,6 @@ config CS4231
 
 config MARVELL_88W8618
     bool
+
+config SCREAMER
+    bool
hw/audio/Makefile.objs +2 -0
index 63db383709..55906886bc 100644
@@ -15,4 +15,6 @@ common-obj-$(CONFIG_CS4231) += cs4231.o
 common-obj-$(CONFIG_MARVELL_88W8618) += marvell_88w8618.o
 common-obj-$(CONFIG_MILKYMIST) += milkymist-ac97.o
 
+common-obj-$(CONFIG_SCREAMER) += screamer.o
+
 common-obj-y += soundhw.o
hw/audio/screamer.c new file +985 -0

985 lines not on this page · raw message

hw/misc/macio/macio.c +34 -1
index 79222192e8..3307fa3818 100644
@@ -37,6 +37,7 @@
 #include "hw/intc/heathrow_pic.h"
 #include "sysemu/sysemu.h"
 #include "trace.h"
+#include "include/hw/audio/screamer.h"
 
 /* Note: this code is strongly inspirated from the corresponding code
  * in PearPC */
@@ -109,7 +110,10 @@ static void macio_common_realize(PCIDevice *d, Error **errp)
     SysBusDevice *sysbus_dev;
     Error *err = NULL;
 
-    object_property_set_bool(OBJECT(&s->dbdma), true, "realized", &err);
+    const char *realized_property = "realized";
+    bool new_value = true;
+    object_property_set_bool(OBJECT(&s->dbdma), new_value, realized_property,
+                             &err);
     if (err) {
         error_propagate(errp, err);
         return;
@@ -117,6 +121,19 @@ static void macio_common_realize(PCIDevice *d, Error **errp)
     sysbus_dev = SYS_BUS_DEVICE(&s->dbdma);
     memory_region_add_subregion(&s->bar, 0x08000,
                                 sysbus_mmio_get_region(sysbus_dev, 0));
+    object_property_set_bool(OBJECT(&s->screamer), true, "realized", &err);
+    if (err) {
+        error_propagate(errp, err);
+        return;
+    }
+
+    /* Add the screamer sound chip */
+    sysbus_dev = SYS_BUS_DEVICE(&s->screamer);
+    const int offset = 0x14000; /* Offset from base address register (bar) */
+    const int region_number = 0; /* which memory region to use */
+    memory_region_add_subregion(&s->bar, offset,
+                                sysbus_mmio_get_region(sysbus_dev,
+                                                       region_number));
 
     qdev_prop_set_uint32(DEVICE(&s->escc), "disabled", 0);
     qdev_prop_set_uint32(DEVICE(&s->escc), "frequency", ESCC_CLOCK);
@@ -386,6 +403,19 @@ static void macio_newworld_realize(PCIDevice *d, Error **errp)
         memory_region_add_subregion(&s->bar, 0x16000,
                                     sysbus_mmio_get_region(sysbus_dev, 0));
     }
+
+    /* Screamer Sound Chip */
+    const int gpio_0 = 0;
+    const int gpio_1 = 1;
+    const int transmit_channel = 0x10;
+    const int receive_channel = 0x12;
+    sysbus_dev = SYS_BUS_DEVICE(&s->screamer);
+    sysbus_connect_irq(sysbus_dev, gpio_0, qdev_get_gpio_in(pic_dev,
+                                           NEWWORLD_SCREAMER_IRQ));
+    sysbus_connect_irq(sysbus_dev, gpio_1, qdev_get_gpio_in(pic_dev,
+                                           NEWWORLD_SCREAMER_DMA_IRQ));
+    screamer_register_dma_functions(SCREAMER(sysbus_dev), &s->dbdma,
+                                    transmit_channel, receive_channel);
 }
 
 static void macio_newworld_init(Object *obj)
@@ -420,6 +450,9 @@ static void macio_instance_init(Object *obj)
                          TYPE_MAC_DBDMA);
 
     macio_init_child_obj(s, "escc", &s->escc, sizeof(s->escc), TYPE_ESCC);
+
+    macio_init_child_obj(s, SOUND_CHIP_NAME, &s->screamer, sizeof(s->screamer),
+                         TYPE_SCREAMER);
 }
 
 static const VMStateDescription vmstate_macio_oldworld = {
hw/ppc/Kconfig +1 -0
index 354828bf13..4ffc3a1c16 100644
@@ -104,6 +104,7 @@ config MAC_NEWWORLD
     select MAC_PMU
     select UNIN_PCI
     select FW_CFG_PPC
+    select SCREAMER
 
 config E500
     bool
hw/ppc/mac.h +5 -0
index 6af87d1fa0..c65f2fd15f 100644
@@ -34,6 +34,8 @@
 #include "hw/misc/mos6522.h"
 #include "hw/pci/pci_host.h"
 #include "hw/pci-host/uninorth.h"
+#include "hw/ppc/mac_dbdma.h"
+#include "audio/audio.h"
 
 /* SMP is not enabled, for now */
 #define MAX_CPUS 1
@@ -68,6 +70,9 @@
 #define NEWWORLD_IDE1_DMA_IRQ  0x3
 #define NEWWORLD_EXTING_GPIO1  0x2f
 #define NEWWORLD_EXTING_GPIO9  0x37
+#define NEWWORLD_SCREAMER_IRQ  0x18
+#define NEWWORLD_SCREAMER_DMA_IRQ 0x9
+#define NEWWORLD_SCREAMER_RX_IRQ 0xa
 
 /* Core99 machine */
 #define TYPE_CORE99_MACHINE MACHINE_TYPE_NAME("mac99")
include/hw/audio/screamer.h new file +42 -0

42 lines not on this page · raw message

include/hw/misc/macio/macio.h +2 -0
index 070a694eb5..81ad552d61 100644
@@ -35,6 +35,7 @@
 #include "hw/ppc/mac.h"
 #include "hw/ppc/mac_dbdma.h"
 #include "hw/ppc/openpic.h"
+#include "hw/audio/screamer.h"
 
 /* MacIO virtual bus */
 #define TYPE_MACIO_BUS "macio-bus"
@@ -86,6 +87,7 @@ typedef struct MacIOState {
     PMUState pmu;
     DBDMAState dbdma;
     ESCCState escc;
+    ScreamerState screamer;
     uint64_t frequency;
 } MacIOState;
 
Signature · 1 line
2.14.3 (Apple Git-98)
#1 lore raw

Hi,

It might be worth mentioning that any testing of your screamer implementation with MacOS/OSX guests on the mac99 machine needs a custom-built openbios.

Where possible I'll compare your screamer with the current screamer implementation built from:
git clone -b screamer https://github.com/mcayland/qemu

All tests on OSX Sierra host with system sounds and MP3 playback through latest QuickTime and iTunes available for the guest. Host is Intel i7-4770K at 3.50Ghz. 32Gb memory. Audio device is an USB headset. Overall very subjective impression is that sound problems seem to arise quicker with strong changes in volume in the stream. Silence is produced perfectly...
I should note that I also tested earlier with a windows build and that I had to re-install Mac OS on three occasions to get sound going with your screamer. Whether that was caused by a faulty installation or your screamer is unclear to me.

There we go:

Mac OS 9.0.4: mac99,via=cuda
Apple audio extension often fails to load. (Not restricted to your screamer. This is a longstanding issue.) See at bottom for OSX crash report. Your screamer: shows only CD in Sound CP Input panel. Play sound through output device is selected.
Current screamer: shows CD + External Mic. Play sound through output device is selected.

Mac OS 9.1: mac99,via=cuda
Your screamer: No Input selection in the Sound CP.
Current screamer: Has External Mic (but no CD) in Sound CP. Play sound through output device is not selected.

Mac OS 9.2: mac99,via=pmu
Your screamer: mp3 through iTunes and QuickTime OK. System sounds OK. Current screamer: Has considerably more problems playing two streams simultaneously. (mp3 through both QuickTime and iTunes.)

Mac OS X 10.0: mac99,via=cuda
Your screamer: setting the sound balance from middle position to the left seems to control volume.
Current screamer: Serious number of drop-outs when playing MP3 through QuickTime. Not when using iTunes. Has issues when moving the sound balance.

Mac OS X 10.1: mac99,via=cuda
Off-topic: Interestingly, when booting with via=pmu, the same error occurs as reported above.
Your screamer: QuickTime: drop-outs. iTunes OK, even with playing system sounds through the stream. Balance has same problem as above. Current screamer: Serious drop-outs through both QuickTime and iTunes when playing MP3. Balance sync gets completely lost after moving slider. More lag in response to clicking system sounds.

Mac OSX 10.2: no test due to longstanding video issue with opening folders.

Mac OSX 10.3: mac99,via=pmu
Your screamer: drop-outs with QuickTime and iTunes. But not the clicks heard as mentioned below. Opening the Sound preferences when playing MP3 is OK. System sounds playing through the stream produce crackling sound. systems sounds stop playing after several clicks on different ones. I hear parts of earlier clicked sound when new one clicked.
Current screamer: intermittent clicks (0.5 seconds) when playing MP3 with QuickTime and iTunes. But QuickTime much better compared to 10.1. Currently playing mp3 gets completely distorted (doubled?) when opening Sound preferences.

Mac OSX 10.4: mac99,via=pmu
Off-topic: From 10.4 onward, Internet radio works in iTunes. Channel update is very slow in 10.4...
Your screamer: drop-outs with QuickTime. Sounds comparable to current screamer. Opening Sound preferences is OK, but can make stream spiral out of control with an echo. Seems to happen quicker when playing sound with strong stereo effects. But always quickly recovers, unlike current screamer. iTunes also produces drop-outs. Also with internet stream, but is almost listenable.
Current screamer: drop-outs with QuickTime. Sounds like stream is not always in correct order. Sound crackles. iTunes almost OK. I can hear one or two clicks after stopping audio. Opening Sound preferences makes stream spiral out of control with an echo.

Mac OSX 10.5: mac99,via=pmu
Your screamer: Drop-outs with QuickTime. A bit less-so with iTunes. Opening Sound preferences provides same experience as with 10.4. Internet stream almost listenable.
Current screamer: QuickTime produces drop-outs. Sound control panel spirals out of control. Small audio parts still played when stopping QuickTime. iTunes almost OK with MP3 playback, only small drop-outs. Same with Internet radio.

For good measure I also tested 10.5 with your screamer and the recent hardfloat patches which improve fpu performance from 9% to 11% of a real G4 1Ghz ;-)
I did not experience a considerable improvement in sound quality.

Best,
Howard

OSX host Crash report when audio extension fails:

Crashed Thread: 2

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY
Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x8:
-->

    __TEXT                 00000001087b0000-0000000108f7f000 [ 7996K]

r-x/rwx SM=COW /Users/USER/*

Thread 2 Crashed:

0   qemu-system-ppc-screamer       0x0000000108c5b9ed timer_del + 13
1   qemu-system-ppc-screamer       0x000000010898bc1f audio_reset_timer +
319
2   qemu-system-ppc-screamer       0x00000001089807b6 vm_state_notify + 262
3   qemu-system-ppc-screamer       0x0000000108800b5f do_vm_stop + 47
4   qemu-system-ppc-screamer       0x0000000108985277 qemu_main + 16775
5   qemu-system-ppc-screamer       0x0000000108b46e86 call_qemu_main + 38
6   qemu-system-ppc-screamer       0x0000000108c6071e qemu_thread_start +
126
7   libsystem_pthread.dylib       0x00007fffb627093b _pthread_body + 180
8   libsystem_pthread.dylib       0x00007fffb6270887 _pthread_start + 286
9   libsystem_pthread.dylib       0x00007fffb627008d thread_start + 13
#2 lore raw
Quoted 76 lines · Howard Spoelstra

Hi,

It might be worth mentioning that any testing of your screamer implementation with MacOS/OSX guests on the mac99 machine needs a custom-built openbios.

Where possible I'll compare your screamer with the current screamer implementation built from:
git clone -b screamer https://github.com/mcayland/qemu

All tests on OSX Sierra host with system sounds and MP3 playback through latest QuickTime and iTunes available for the guest. Host is Intel i7-4770K at 3.50Ghz. 32Gb memory. Audio device is an USB headset. Overall very subjective impression is that sound problems seem to arise quicker with strong changes in volume in the stream. Silence is produced perfectly...
I should note that I also tested earlier with a windows build and that I had to re-install Mac OS on three occasions to get sound going with your screamer. Whether that was caused by a faulty installation or your screamer is unclear to me.

There we go:

Mac OS 9.0.4: mac99,via=cuda
Apple audio extension often fails to load. (Not restricted to your screamer. This is a longstanding issue.) See at bottom for OSX crash report. Your screamer: shows only CD in Sound CP Input panel. Play sound through output device is selected.
Current screamer: shows CD + External Mic. Play sound through output device is selected.

Mac OS 9.1: mac99,via=cuda
Your screamer: No Input selection in the Sound CP.
Current screamer: Has External Mic (but no CD) in Sound CP. Play sound through output device is not selected.

Mac OS 9.2: mac99,via=pmu
Your screamer: mp3 through iTunes and QuickTime OK. System sounds OK.
Current screamer: Has considerably more problems playing two streams simultaneously. (mp3 through both QuickTime and iTunes.)

Mac OS X 10.0: mac99,via=cuda
Your screamer: setting the sound balance from middle position to the left seems to control volume.
Current screamer: Serious number of drop-outs when playing MP3 through QuickTime. Not when using iTunes. Has issues when moving the sound balance.

Mac OS X 10.1: mac99,via=cuda
Off-topic: Interestingly, when booting with via=pmu, the same error occurs as reported above.
Your screamer: QuickTime: drop-outs. iTunes OK, even with playing system sounds through the stream. Balance has same problem as above.
Current screamer: Serious drop-outs through both QuickTime and iTunes when playing MP3. Balance sync gets completely lost after moving slider. More lag in response to clicking system sounds.

Mac OSX 10.2: no test due to longstanding video issue with opening folders.

Mac OSX 10.3: mac99,via=pmu
Your screamer: drop-outs with QuickTime and iTunes. But not the clicks heard as mentioned below. Opening the Sound preferences when playing MP3 is OK. System sounds playing through the stream produce crackling sound. systems sounds stop playing after several clicks on different ones. I hear parts of earlier clicked sound when new one clicked. Current screamer: intermittent clicks (0.5 seconds) when playing MP3 with QuickTime and iTunes. But QuickTime much better compared to 10.1. Currently playing mp3 gets completely distorted (doubled?) when opening Sound preferences.

Mac OSX 10.4: mac99,via=pmu
Off-topic: From 10.4 onward, Internet radio works in iTunes. Channel update is very slow in 10.4...
Your screamer: drop-outs with QuickTime. Sounds comparable to current screamer. Opening Sound preferences is OK, but can make stream spiral out of control with an echo. Seems to happen quicker when playing sound with strong stereo effects. But always quickly recovers, unlike current screamer. iTunes also produces drop-outs. Also with internet stream, but is almost listenable. Current screamer: drop-outs with QuickTime. Sounds like stream is not always in correct order. Sound crackles. iTunes almost OK. I can hear one or two clicks after stopping audio. Opening Sound preferences makes stream spiral out of control with an echo.

Mac OSX 10.5: mac99,via=pmu
Your screamer: Drop-outs with QuickTime. A bit less-so with iTunes. Opening Sound preferences provides same experience as with 10.4. Internet stream almost listenable.
Current screamer: QuickTime produces drop-outs. Sound control panel spirals out of control. Small audio parts still played when stopping QuickTime. iTunes almost OK with MP3 playback, only small drop-outs. Same with Internet radio.

For good measure I also tested 10.5 with your screamer and the recent hardfloat patches which improve fpu performance from 9% to 11% of a real G4 1Ghz ;-) I did not experience a considerable improvement in sound quality.

Best,
Howard

OSX host Crash report when audio extension fails:

Crashed Thread: 2

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY
Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x8:
-->

    __TEXT                 00000001087b0000-0000000108f7f000 [ 7996K] r-x/rwx SM=COW  /Users/USER/*

Thread 2 Crashed:

Quoted 11 lines
0   qemu-system-ppc-screamer      	0x0000000108c5b9ed timer_del + 13
1   qemu-system-ppc-screamer      	0x000000010898bc1f audio_reset_timer + 319
2   qemu-system-ppc-screamer      	0x00000001089807b6 vm_state_notify + 262
3   qemu-system-ppc-screamer      	0x0000000108800b5f do_vm_stop + 47
4   qemu-system-ppc-screamer      	0x0000000108985277 qemu_main + 16775
5   qemu-system-ppc-screamer      	0x0000000108b46e86 call_qemu_main + 38
6   qemu-system-ppc-screamer      	0x0000000108c6071e qemu_thread_start + 126
7   libsystem_pthread.dylib       0x00007fffb627093b _pthread_body + 180
8   libsystem_pthread.dylib       0x00007fffb6270887 _pthread_start + 286
9   libsystem_pthread.dylib       0x00007fffb627008d thread_start + 13

Thank you for such a detailed testing of my screamer patch. Your tests show it is an improvement over the older screamer implementation :)

I'm hoping the maintainer will review my patch soon. I haven't heard a thing from him since late December. I thinking either he does not have the time to review my patch or he does not want to see his patch be replaced with mine.

For the binaries of QEMU you provide on emaculation.net, would you say it is time to replace the old screamer builds with this patch?

#3 lore raw
Quoted 143 lines · Programmingkid
Quoted 2 lines

On Feb 21, 2020, at 4:13 AM, Howard Spoelstra <[email protected]>

Quoted 4 lines · wrote:

Hi,

It might be worth mentioning that any testing of your screamer

implementation with MacOS/OSX guests on the mac99 machine needs a custom-built openbios.

Quoted 2 lines

Where possible I'll compare your screamer with the current screamer

implementation built from:

Quoted 3 lines

git clone -b screamer https://github.com/mcayland/qemu

All tests on OSX Sierra host with system sounds and MP3 playback through

latest QuickTime and iTunes available for the guest. Host is Intel i7-4770K at 3.50Ghz. 32Gb memory. Audio device is an USB headset.

Quoted 1 line

Overall very subjective impression is that sound problems seem to arise

quicker with strong changes in volume in the stream. Silence is produced perfectly...

Quoted 1 line

I should note that I also tested earlier with a windows build and that I

had to re-install Mac OS on three occasions to get sound going with your screamer. Whether that was caused by a faulty installation or your screamer is unclear to me.

Quoted 5 lines

There we go:

Mac OS 9.0.4: mac99,via=cuda
Apple audio extension often fails to load. (Not restricted to your

screamer. This is a longstanding issue.) See at bottom for OSX crash report.

Quoted 1 line

Your screamer: shows only CD in Sound CP Input panel. Play sound through

output device is selected.

Quoted 1 line

Current screamer: shows CD + External Mic. Play sound through output

device is selected.

Quoted 4 lines

Mac OS 9.1: mac99,via=cuda
Your screamer: No Input selection in the Sound CP.
Current screamer: Has External Mic (but no CD) in Sound CP. Play sound

through output device is not selected.

Quoted 4 lines

Mac OS 9.2: mac99,via=pmu
Your screamer: mp3 through iTunes and QuickTime OK. System sounds OK. Current screamer: Has considerably more problems playing two streams

simultaneously. (mp3 through both QuickTime and iTunes.)

Quoted 3 lines

Mac OS X 10.0: mac99,via=cuda
Your screamer: setting the sound balance from middle position to the

left seems to control volume.

Quoted 1 line

Current screamer: Serious number of drop-outs when playing MP3 through

QuickTime. Not when using iTunes. Has issues when moving the sound balance.

Quoted 3 lines

Mac OS X 10.1: mac99,via=cuda
Off-topic: Interestingly, when booting with via=pmu, the same error

occurs as reported above.

Quoted 1 line

Your screamer: QuickTime: drop-outs. iTunes OK, even with playing system

sounds through the stream. Balance has same problem as above.

Quoted 1 line

Current screamer: Serious drop-outs through both QuickTime and iTunes

when playing MP3. Balance sync gets completely lost after moving slider. More lag in response to clicking system sounds.

Quoted 2 lines

Mac OSX 10.2: no test due to longstanding video issue with opening

folders.

Quoted 3 lines

Mac OSX 10.3: mac99,via=pmu
Your screamer: drop-outs with QuickTime and iTunes. But not the clicks

heard as mentioned below. Opening the Sound preferences when playing MP3 is OK. System sounds playing through the stream produce crackling sound. systems sounds stop playing after several clicks on different ones. I hear parts of earlier clicked sound when new one clicked.

Quoted 1 line

Current screamer: intermittent clicks (0.5 seconds) when playing MP3

with QuickTime and iTunes. But QuickTime much better compared to 10.1. Currently playing mp3 gets completely distorted (doubled?) when opening Sound preferences.

Quoted 3 lines

Mac OSX 10.4: mac99,via=pmu
Off-topic: From 10.4 onward, Internet radio works in iTunes. Channel

update is very slow in 10.4...

Quoted 1 line

Your screamer: drop-outs with QuickTime. Sounds comparable to current

screamer. Opening Sound preferences is OK, but can make stream spiral out of control with an echo. Seems to happen quicker when playing sound with strong stereo effects. But always quickly recovers, unlike current screamer. iTunes also produces drop-outs. Also with internet stream, but is almost listenable.

Quoted 1 line

Current screamer: drop-outs with QuickTime. Sounds like stream is not

always in correct order. Sound crackles. iTunes almost OK. I can hear one or two clicks after stopping audio. Opening Sound preferences makes stream spiral out of control with an echo.

Quoted 3 lines

Mac OSX 10.5: mac99,via=pmu
Your screamer: Drop-outs with QuickTime. A bit less-so with iTunes.

Opening Sound preferences provides same experience as with 10.4. Internet stream almost listenable.

Quoted 1 line

Current screamer: QuickTime produces drop-outs. Sound control panel

spirals out of control. Small audio parts still played when stopping QuickTime. iTunes almost OK with MP3 playback, only small drop-outs. Same with Internet radio.

Quoted 2 lines

For good measure I also tested 10.5 with your screamer and the recent

hardfloat patches which improve fpu performance from 9% to 11% of a real G4 1Ghz ;-)

Quoted 13 lines

I did not experience a considerable improvement in sound quality.

Best,
Howard

OSX host Crash report when audio extension fails:

Crashed Thread: 2

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000008
Exception Note:        EXC_CORPSE_NOTIFY
Quoted 7 lines
Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0x8:
-->

    __TEXT                 00000001087b0000-0000000108f7f000 [ 7996K]

r-x/rwx SM=COW /Users/USER/*

Quoted 4 lines

Thread 2 Crashed:

0   qemu-system-ppc-screamer          0x0000000108c5b9ed timer_del + 13
1   qemu-system-ppc-screamer          0x000000010898bc1f

audio_reset_timer + 319

Quoted 1 line

2 qemu-system-ppc-screamer 0x00000001089807b6 vm_state_notify

+ 262

Quoted 2 lines
3   qemu-system-ppc-screamer          0x0000000108800b5f do_vm_stop + 47
4   qemu-system-ppc-screamer          0x0000000108985277 qemu_main +

16775

Quoted 1 line

5 qemu-system-ppc-screamer 0x0000000108b46e86 call_qemu_main

+ 38

Quoted 1 line

6 qemu-system-ppc-screamer 0x0000000108c6071e

qemu_thread_start + 126

Quoted 4 lines
7   libsystem_pthread.dylib       0x00007fffb627093b _pthread_body + 180
8   libsystem_pthread.dylib       0x00007fffb6270887 _pthread_start + 286
9   libsystem_pthread.dylib       0x00007fffb627008d thread_start + 13

Thank you for such a detailed testing of my screamer patch. Your tests show it is an improvement over the older screamer implementation :)

Quoted 8 lines

I'm hoping the maintainer will review my patch soon. I haven't heard a thing from him since late December. I thinking either he does not have the time to review my patch or he does not want to see his patch be replaced with mine.

For the binaries of QEMU you provide on emaculation.net, would you say it is time to replace the old screamer builds with this patch?

Hi,

The current screamer-enabled builds for OSX and Windows are on www.emaculation.com ;-)
As you see from testing, there are reasons why the patches from Mark's screamer branch are not in master yet, and these have not all been addressed. There still needs to be testing on Linux and certainly on Windows builds, and from what I mentioned above that might not be plain sailing.
I guess I'll wait with providing new builds when the patches for both openbios and qemu are reviewed and in some repo from which I can build easily.

Best,
Howard

#4 lore raw
Quoted 13 lines · Howard Spoelstra

The current screamer-enabled builds for OSX and Windows are on www.emaculation.com ;-)
As you see from testing, there are reasons why the patches from Mark's screamer branch are not in master yet, and these have not all been addressed. There still needs to be testing on Linux and certainly on Windows builds, and from what I mentioned above that might not be plain sailing.
I guess I'll wait with providing new builds when the patches for both openbios and qemu are reviewed and in some repo from which I can build easily.

Quoted 3 lines

Best,
Howard

Hi,

There is indeed an issue when building your code for Windows. Whereas the current screamer from Mark just plays sound, a build with your patches will not.
I need to Ctrl-Alt-G to exit grab, click on the command (cmd.exe) window in which the Qemu textual output is showing and then grab the mouse again to get sound. A simple grab exit/grab cycle is not enough, a click somewhere outside the Qemu window will also not do. Only a click to activate the command window and then grab again. Happens with both GTK and SDL GUIs.

Command line is:
qemu-system-ppc-master-screamer-john-v4.exe -L pc-bios -boot c -m 256 -M mac99,via=pmu ^
-drive file=C:\mac-disks\9.2.img ^
-sdl -serial stdio ^
-bios openbios-qemu-screamer-john-v2.elf

Took me ages to find this regularity ;-)

Best,
Howard

#5 lore raw
Quoted 27 lines · Howard Spoelstra

On Fri, Feb 21, 2020 at 1:09 PM Howard Spoelstra <[email protected]> wrote:

The current screamer-enabled builds for OSX and Windows are on www.emaculation.com ;-)
As you see from testing, there are reasons why the patches from Mark's screamer branch are not in master yet, and these have not all been addressed. There still needs to be testing on Linux and certainly on Windows builds, and from what I mentioned above that might not be plain sailing. I guess I'll wait with providing new builds when the patches for both openbios and qemu are reviewed and in some repo from which I can build easily.

Best,
Howard

Hi,

There is indeed an issue when building your code for Windows.
Whereas the current screamer from Mark just plays sound, a build with your patches will not.
I need to Ctrl-Alt-G to exit grab, click on the command (cmd.exe) window in which the Qemu textual output is showing and then grab the mouse again to get sound. A simple grab exit/grab cycle is not enough, a click somewhere outside the Qemu window will also not do. Only a click to activate the command window and then grab again. Happens with both GTK and SDL GUIs.

Command line is:
qemu-system-ppc-master-screamer-john-v4.exe -L pc-bios -boot c -m 256 -M mac99,via=pmu ^

(quoted diff) +0 -3
-drive file=C:\mac-disks\9.2.img ^
-sdl -serial stdio ^
-bios openbios-qemu-screamer-john-v2.elf
Quoted 4 lines

Took me ages to find this regularity ;-)

Best,
Howard

Thank you very much for catching this problem. Could you send me your Windows binary of QEMU that uses my patch. I would like to see if I can reproduce the problem on my computer.