MorphOS runs on QEmu
  • MorphOS Developer
    zukow
    Posts: 642 from 2005/2/9
    From: Poland
    Usb audio uses isochronous transfers, are you sure that qemu usb redirection supports it?
  • »05.02.22 - 17:11
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @zukow
    I don't know how to answer your question. I don't have the preparation to do it,
    but the author told me it could be a usb1.1 problem since i use usb 2.0 3.0 ports,

    I followed some advice from the author of qemu-ppc for -sam460ex -g4 -pegasos2
    the author does not have a usb-audio stick at the moment to do my own tests.

    where the principle to follow should be this:

    complete control over the USB-audio stick by the host to passthrough the device.

    and also on usbhid the hardest part

    with this I take full control of the usb-audio:
    UDEV
    ACTION == "add", SUBSYSTEM == "usb", ATTR {idVendor} == "0d8c", ATTR {idProduct} == "0014", OWNER = "white"
    ATTRS {idVendor} == "0d8c", ATTRS {idProduct} == "0014", ENV {PULSE_IGNORE} = "1", OWNER = "white"

    BLACKLIST
    blacklist snd_usb_audio
    blacklist snd_usb_midi_lib

    the hardest part is usbhid where in reality I can't find any solution to prevent it from talking to usb-audio.

    a solution looked like this:

    for device in $(ls /sys/bus/usb/devices/*/product); do echo $device;cat $device;done

    USB Audio Device
    /sys/bus/usb/devices/1-6/product

    sudo dmesg

    39.108362] usb 1-3: New USB device found, idVendor=0d8c, idProduct=0014, bcdDevice= 1.00
    [ 39.108367] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [ 39.108368] usb 1-3: Product: USB Audio Device
    [ 39.108369] usb 1-3: Manufacturer: C-Media Electronics Inc.
    [ 39.128456] input: C-Media Electronics Inc. USB Audio Device as /devices/pci0000:00/0000:00:01.2/0000:01:00.0/usb1/1-3/1-3:1.3/0003:0D8C:0014.0007/input/input26
    [ 39.185488] hid-generic 0003:0D8C:0014.0007: input,hidraw6: USB HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on usb-0000:01:00.0-3/input3
    [ 39.190685] mc: Linux media interface: v0.10
    [ 39.265052] cmedia_hs100b 0003:0D8C:0014.0007: Fixing CMedia HS-100B report descriptor
    [ 39.265106] input: C-Media Electronics Inc. USB Audio Device as /devices/pci0000:00/0000:00:01.2/0000:01:00.0/usb1/1-3/1-3:1.3/0003:0D8C:0014.0007/input/input27
    [ 39.325008] cmedia_hs100b 0003:0D8C:0014.0007: input,hidraw6: USB HID v1.00 Device [C-Media Electronics Inc. USB Audio Device] on usb-0000:01:00.0-3/input3
    [ 39.379527] usbcore: registered new interface driver snd-usb-audio

    echo '1-3' | sudo tee /sys/bus/usb/drivers/usb/unbind

    1-3

    before the test:

    lsusb -t

    /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=ath9k_htc, 480M
    |__ Port 3: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 3: Dev 6, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 3: Dev 6, If 3, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 3: Dev 6, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 7: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M

    after the test:

    Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=ath9k_htc, 480M
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
    |__ Port 7: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M

    the driver is disassociated

    but in the end it is useless because in this way as soon as I reinsert the usb-audio stick the usbhid regains control of it.

    i can add the log i get as soon as i remove the qemu usb-audio only the initial lines in this case else it is much longer ..
    I have no idea what they are I guess Morphos is not finding something or that he is taking action while I remove the USB-audio

    in summary these are the principles that the author recommended to me.

    but this .log I don't know if it can be useful for the purpose that I have not yet sent to the author.

    StackFrame[ 0].LR[0x14cd4dc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0001bac0]
    StackFrame[ 1].LR[0x10351b98] -> intuition.library.elf [Hunk 0 Offset 0x00004b38 Function NewObjectA]
    StackFrame[ 2].LR[0x16474cd8] -> System:MorphOS/Prefs/MPrefs/USB.mprefs [Hunk 1 Offset 0x00013200]
    StackFrame[ 3].LR[0x1647bfc8] -> System:MorphOS/Prefs/MPrefs/USB.mprefs [Hunk 1 Offset 0x0001a4f0]
    StackFrame[ 4].LR[0x14cd4dc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0001bac0]
    StackFrame[ 5].LR[0x14ce08c4] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000275c4]
    StackFrame[ 6].LR[0x14ce7d04] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0002ea04]
    StackFrame[ 7].LR[0x14cebfec] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00032cec]
    StackFrame[ 8].LR[0x14ce9484] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00030184]
    StackFrame[ 9].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
    StackFrame[10].LR[0x14d51a40] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00098740]
    StackFrame[11].LR[0x14d4988c] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0009058c]
    StackFrame[12].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
    StackFrame[13].LR[0x1647c69c] -> System:MorphOS/Prefs/MPrefs/USB.mprefs [Hunk 1 Offset 0x0001abc4]
    StackFrame[14].LR[0x14cd4dc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0001bac0]
    StackFrame[15].LR[0x103d3c68] -> intuition.library.elf [Hunk 0 Offset 0x00086c08]
    StackFrame[16].LR[0x10353e4c] -> intuition.library.elf [Hunk 0 Offset 0x00006dec Function SetAttrsA]
    StackFrame[17].LR[0x14d60ea8] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a7ba8 Function ???VarArgs]
    StackFrame[18].LR[0x14d14864] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0005b564]
    StackFrame[19].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
    StackFrame[20].LR[0x103d3c68] -> intuition.library.elf [Hunk 0 Offset 0x00086c08]
    StackFrame[21].LR[0x10353e4c] -> intuition.library.elf [Hunk 0 Offset 0x00006dec Function SetAttrsA]
    StackFrame[22].LR[0x14d60ea8] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a7ba8 Function ???VarArgs]
    StackFrame[23].LR[0x14d534ac] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0009a1ac]
    StackFrame[24].LR[0x14d49984] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00090684]
    StackFrame[25].LR[0x14d5df98] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4c98]
    StackFrame[26].LR[0x14d5e0e8] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x000a4de8]
    StackFrame[27].LR[0x14cff154] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00045e54]
    StackFrame[28].LR[0x14cff368] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00046068]
    StackFrame[29].LR[0x14d01fc0] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x00048cc0]
    StackFrame[30].LR[0x14cf6fdc] -> MOSSYS:LIBS/muimaster.library [Hunk 1 Offset 0x0003dcdc]
    >>> ABox State
    ----------------------------------------------------------------------
    ExecBase: SysBase 0x140019b0
    SysFlags 0x8000 AttnResched 0x0000 IDNestCnt -1 TDNestCnt -1
    ThisTask 0x168a4780 TaskReady 0x1404af88 TaskWait 0x14029fa8
    ResModules 0x140040a0
    TaskTrapCode 0x101217bc TaskExceptCode 0x101217c4 TaskExitCode 0x10121820
    TaskSigAlloc 0xffff TaskTrapAlloc 0x8000
    IdleCount 4467 DispCount 133664
    Quantum 4 Elapsed 2
    VBlankFrequency 50 PowerSupplyFrequency 50 EClockFrequency 709379
    MainTID 0x10020010 SchedulerTID 0x10020012 SchedulerSig 0x80000000
    OldSRR0 0x0
    ConfigServerTID 0x10000013
    LastIntObject 0x140c48a4
    LastIntObject 0x140c48a4 <Not Valid ptr>
    Code 0x1047d4c4 Data 0x1409ab68
    Int0: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int1: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int2: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int3: iv_Code 0x10126ccc iv_Data 0x14003c38 iv_Node 0x00000000
    Int4: iv_Code 0x10126ccc iv_Data 0x14003c58 iv_Node 0x00000000
    Int5: iv_Code 0x10126ccc iv_Data 0x14003c48 iv_Node 0x00000000
    Interrupt 0x1403446e <graphics.library>
    Code 0x10198508 Data 0x14034424
    Interrupt 0x144caf20 <ixemul timer interrupt>
    Code 0x144c80cc Data 0x00000000
    Int6: iv_Code 0x10198510 iv_Data 0x14034424 iv_Node 0x1403449a
    Int7: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int8: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int9: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int10: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int11: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int12: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int13: iv_Code 0x10126ccc iv_Data 0x14003c68 iv_Node 0x00000000
    Int14: iv_Code 0x00000000 iv_Data 0x00000000 iv_Node 0x00000000
    Int15: iv_Code 0x10126ccc iv_Data 0x14003c78 iv_Node 0x00000000

    >>> Running Task

    etc.

    I apologize for this long message,
    Thank you.

    [ Edited by white 05.02.2022 - 20:06 ]
  • »05.02.22 - 19:15
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    I hope I'm not wrong
    but maybe i found the right command
    to get the ID

    lsusb -tv

    /: Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /: Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    ID 145f:02b9 Trust
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    ID 145f:02b9 Trust
    |__ Port 2: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1899 ASUSTek Computer, Inc.
    |__ Port 2: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1899 ASUSTek Computer, Inc.
    |__ Port 2: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1899 ASUSTek Computer, Inc.
    /: Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /: Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 3: Dev 6, If 2, Class=Audio, Driver=, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 3: Dev 6, If 0, Class=Audio, Driver=, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 3: Dev 6, If 3, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 3: Dev 6, If 1, Class=Audio, Driver=, 12M
    ID 0d8c:0014 C-Media Electronics, Inc. Audio Adapter (Unitek Y-247A)
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
    ID 0b05:1939 ASUSTek Computer, Inc.
    |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
    ID 0b05:1939 ASUSTek Computer, Inc.
    |__ Port 7: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
    ID 05e3:0610 Genesys Logic, Inc. Hub
    |__ Port 1: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 12M
    ID 1b1c:0c08 Corsair

    I just have to create a UDEV rule for usbhid
    I believe it can be done

    if that is the purpose.

    Thanks for any help :-)

    [ Edited by white 05.02.2022 - 22:38 ]
  • »05.02.22 - 22:05
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2983 from 2003/3/5
    From: Canada
    Quote:

    Georg wrote:
    Why do you want to get audio working through usb-audio stick? Isn't it easier to get it to work through qemu-emulated sound card for which Morphos has drivers?


    I am not aware of qemu being able to emulate any cards that MorphOS has drivers for.
  • »05.02.22 - 23:20
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    ok :-)
    I give up

    using an "asus" motherboard I was convinced that I had identified the usbhid :-)

    going to see the individual components

    with:
    sudo lsusb -vvd 0b05: 1899

    it actually corresponds to the keyboard
    Bus 005 Device 003: ID 0b05: 1899 ASUSTek Computer, Inc. TUF GAMING K5
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 1.10
    bDeviceClass 0
    bDeviceSubClass 0
    bDeviceProtocol 0
    bMaxPacketSize0 64
    idVendor 0x0b05 ASUSTek Computer, Inc.
    idProduct 0x1899
    bcdDevice 0.45
    iManufacturer 1 ASUSTeK
    iProduct 2 TUF GAMING K5

    etc. etc.

    therefore completely wrong road.

    I remain of the idea that if the developer does not personally try a usb-audio stick to see how it works.

    Of course I personally can't do anything about it.

    I will dedicate myself to something else :-)

    it remains only that with qemu sam460ex the usb-audio stick is perfectly recognized in all its parts only problem is that you can't hear the sound.

    I would work on this, but it's not up to me.

    Well it was a nice pastime I learned other things. :-)

    [ Edited by white 06.02.2022 - 10:53 ]
  • »06.02.22 - 10:37
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Templario
    Posts: 533 from 2012/4/28
    I have a doubt, How I can send lha/lzx files from Windows host to QEMU running MorphOS, because I can download files via Internet, but is there other way?
    Thanks.
  • »09.02.22 - 11:27
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    @Templario
    Hi,
    Honestly not if it is possible to do it I do not use qemu to do many things.
    I guess you can mount real partitions but I've never tried.

    a simple way is to use a usb data stick like this with qemu:

    -usb -device usb-host,vendorid=0xeba4,productid=0x7588

    I don't use qemu with windows
    "usb deview" for windows should give you the right IDs

    download link usbdeview x64

    https://www.nirsoft.net/utils/usbdeview-x64.zip

    this is a quick solution move your files to the stick and then mount it with qemu.
  • »09.02.22 - 12:50
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 106 from 2004/4/7
    Quote:

    jacadcaps wrote:

    I am not aware of qemu being able to emulate any cards that MorphOS has drivers for.


    SB128 driver (https://github.com/aros-development-team/AROS/tree/master/workbench/devs/AHI/Drivers/SB128) sort of works with some problems (maybe driver bugs) with AROS PPC on Qemu PPC after some changes/hacks to QEMU's hw/audio/es1370.c. Port to MOS would probably take half an hour.

    QEMU hw/audio/es1370.c/es_write():

    Code:

    + val = bswap32(val); /* maybe the AHI driver is supposed to do that */
    addr = es1370_fixup (s, addr);


    QEMU hw/audio/es1370.c/es_read():

    Code:

    + val = bswap32(val); /* maybe the AHI driver is supposed to do that */
    return val;


    QEMU hw/audio/es1370.c/es_transfer_audio():

    Code:

    + if (1) { /* surely the AHI driver is supposed to do that */
    + unsigned short sample;
    + int ii;
    +
    + for(ii = 0; ii < to_copy / 2; ii++)
    + {
    + sample = ((unsigned short *)tmpbuf)[ii];
    + ((unsigned short *)tmpbuf)[ii] = bswap16(sample);
    + }
    + }

    copied = AUD_write (voice, tmpbuf, to_copy);


    It does not really work correctly but it makes the beep sound in AHI Prefs program when clicking Test button. But there are sometimes distortions. Sometimes it sounds correct. Maybe something with buffer underflow, interrupt problem. Don't know. Qemu x86 with AROS x86 with same SB128 driver has same sound problem.

    Normally when running AROS on qemu on Linux with PulseAudio, sound is muted with this driver. A workaround for AROS is to also activate the ac97 drive in qemu, not just the es1370 device. The ac97 AHI driver I guess does something in initialization that causes the sound to no longer be muted:

    Code:

    qemu-system-ppc .. .. -device ac97,audiodev=snd0 -device es1370,audiodev=snd0 -audiodev pa,id=snd0


    Another workaround is to build and run qemu-system-ppc with alsa driver (is by default notcompiled in). But sound distortions are worse compared to PulseAudio.

    Code:

    ./configure --target-list="ppc-softmmu" --audio-drv-list=pa,alsa

    ..

    qemu-system-ppc -audiodev alsa,id=snd0
  • »10.02.22 - 17:51
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 106 from 2004/4/7
    The AC97 driver (https://github.com/aros-development-team/AROS/tree/master/workbench/devs/AHI/Drivers/ac97) works too and works better than SB128 after similiar endianess hacks to QEMU's ac97.c:

    hw/audio/ac97.c/fetch_bd():

    Code:

    +#if 0
    r->bd.addr = le32_to_cpu (*(uint32_t *) &b[0]) & ~3;
    r->bd.ctl_len = le32_to_cpu (*(uint32_t *) &b[4]);
    +#else
    + r->bd.addr = be32_to_cpu (*(uint32_t *) &b[0]) & ~3;
    + r->bd.ctl_len = be32_to_cpu (*(uint32_t *) &b[4]);
    +#endif


    hw/audio/ac97.c/ac_97_io_nam_ops struct:

    Code:

    - .endianness = DEVICE_LITTE_ENDIAN,
    + .endianness = DEVICE_BIG_ENDIAN,


    hw/audio/ac97.c/ac97_io_nabm_ops struct:

    Code:

    - .endianness = DEVICE_LITTE_ENDIAN,
    + .endianness = DEVICE_BIG_ENDIAN,


    hw/audio/ac97.c/write_audio() before AUD_write() call:

    Code:

    {
    unsigned short sample;
    int ii;

    for(ii = 0; ii < to_copy / 2; ii++)
    {
    sample = ((unsigned short *)tmpbuf)[ii];
    ((unsigned short *)tmpbuf)[ii] = bswap16(sample);
    }
    }


    Code:

    ./qemu-system-ppc -machine sam460ex -rtc base=localtime -drive if=none,id=cd,file=aros-sam440-ppc.iso,format=raw -device ide-cd,drive=cd,bus=ide.1 -device ac97,audiodev=snd0 -audiodev pa,id=snd0
  • »11.02.22 - 08:51
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    matt3
    Posts: 659 from 2004/2/10
    Is QEmu a viable solution compared to a real Powerbook or Powermac? Can you drive multiple monitors?
  • »26.02.23 - 00:37
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2983 from 2003/3/5
    From: Canada
    No and no.
  • »26.02.23 - 01:55
    Profile Visit Website