MorphOS runs on QEmu
  • Butterfly
    Butterfly
    Posts: 98 from 2019/4/6
    @jacadcaps
    Yes, it's just fun for me
    I am very happy to use morphos on real machine and am having a lot of fun.
    I went back in time only now I have a much more powerful "amiga" that works with everything I try :-)

    I noticed that on a real machine the USB-audio and associated have:
    usb.audioclass and hid.class with poseidon

    while on qemu:
    usb.audioclass only

    also at the moment i get this error in the qemu window:
    qemu-system-ppc libusb_set_interface_alt_settings -5: notfound

    even if in the compilation of qemu the support is active for:
    libusb-1.0-0 libusb-1.0-0-dev

    it would be nice to make it work
    but if you've tried it and it doesn't work
    then most likely my hopes are nil :-)
  • »19.09.21 - 17:41
    Profile
  • Butterfly
    Butterfly
    Posts: 98 from 2019/4/6
    I tried to get close to the actual hardware setup.
    Now somehow the audio stick seems to "work"
    poseidon recognizes the hardware and rescan morphos works fine too.
    the device no longer receives "device death" but is not classified for example with: hid.class or other
    and also in qemu the libusb error disappears
    The only drawback is that in the audio settings it is not recognized as "usb audio" and therefore I cannot select it to enable it.

    If, on the other hand, someone wants to try this is the new UDEV rule I used:
    SUBSYSTEM == "usb", DRIVER == "snd-usb-audio", ATTRS {idVendor} == "0d8c", ATTRS {idProduct} == "0014", ATTR {authorized} = "0"

    then not to use sudo:
    ACTION == "add", SUBSYSTEM == "usb", ATTR {idVendor} == "0d8c", ATTR {idProduct} == "0014", OWNER = "white"

    this instead the previous UDEV that was recognized directly in MUSIC as USB-AUDIO:
    ACTION == "add", ATTR {idVendor} == "0d8c", ATTR {idProduct} == "0014", RUN + = "/ bin / sh -c 'echo 0> / sys / \ $ devpath / authorized'"

    but he had problems with the "death of the device"

    now I'm not an expert in this maybe someone can help.
    Thanks :-)

    maybe some parameters are missing in UDEV but I can't do better

    here instead the new log:
    16: 38: 19 | 0-poseidon.library: Welcome to poseidon 4.4 (15.3.18) © 2002-2018 by Chris Hodges (20090807)!
    16: 38: 19 | 0-poseidon.library: This is the PPC native MorphOS version.
    16: 38: 19 | 0-poseidon.library: Event broadcaster started.
    16: 38: 19 | 0-poseidon.library: Say hello to massstorage.class V4.9 (Supports storage devices via usbscsi.device (MOS)).
    16: 38: 19 | 0-poseidon.library: Whoah! hub.class V4.4 surprised as Root / external hub base class (MOS).
    16: 38: 19 | 0-poseidon.library: The door bell rang for hid.class V4.6 (Generic support for human interface devices (MOS)).
    16: 38: 19 | 0-poseidon.library: New hardware pciusb.device / 0 added (PCI OHCI USB 1.1 Host Controller (NEC)).
    16: 38: 19 | 0-poseidon.library: Root hub has been enumerated.
    16: 38: 19 | 20-poseidon.library: Opening pciusb.device unit 1 failed device / unit failed to open (-1).
    16: 38: 19 | 0-hub.class: Hub with 3 ports successfully configured.
    16: 38: 19 | 0-hub.class: I'm in love with hub 'PCI Root Hub Unit 0'.
    16: 38: 20 | 0-hub.class: Detected device 'QEMU USB Keyboard' at port 1. I like it.
    16: 38: 20 | 0-hub.class: Detected device 'QEMU USB Mouse' at port 2. I like it.
    16: 38: 20 | 0-hub.class: Detected device 'QEMU USB Hub' at port 3. I like it.
    16: 38: 20 | 0-hub.class: Hub has added 3 device (s). That'll be fun!
    16: 38: 20 | 0-hid.class: Using HID Descriptor from initial configuration run.
    16: 38: 20 | 0-hid.class: HID the road, 'QEMU USB Keyboard'!
    16: 38: 20 | 0-hid.class: Using HID Descriptor from initial configuration run.
    16: 38: 20 | 0-hid.class: HID the road, 'QEMU USB Mouse'!
    16: 38: 20 | 0-hub.class: Hub with 8 ports successfully configured.
    16: 38: 20 | 0-hub.class: I'm in love with hub 'QEMU USB Hub'.
    16: 38: 20 | 10-poseidon.library: SET_CONFIGURATION failed: endpoint stall (4)
    16: 38: 20 | 10-poseidon.library: No current configuration, huh?
    16: 38: 20 | 0-hub.class: Detected device 'USB Audio Device ??????????????' at port 1. I like it.
    16: 38: 20 | 0-hub.class: Hub has added 1 device (s). That'll be fun!
    16: 38: 20 | 10-poseidon.library: SET_CONFIGURATION failed: endpoint stall (4)
    16: 38: 20 | 10-poseidon.library: No current configuration, huh?
    16: 38: 20 | 10-poseidon.library: SET_CONFIGURATION failed: endpoint stall (4)
    16: 38: 20 | 10-poseidon.library: No current configuration, huh?
    16: 38: 24 | 10-poseidon.library: Forced device binding of USB Audio Device ?????????????? to hub.class failed.


    I put a video maybe the concept is clearer maybe you can configure it manually and be of help to those who want to try:
    https://www.youtube.com/watch?v=jJSZilWXe-Y

    [ Edited by white 20.09.2021 - 15:52 ]
  • »20.09.21 - 13:13
    Profile
  • Cocoon
    Cocoon
    cip060
    Posts: 47 from 2010/7/30
    tanto non SUONA
  • »20.09.21 - 13:52
    Profile
  • Butterfly
    Butterfly
    Georg
    Posts: 79 from 2004/4/7
    I would first try getting this to work by running some Linux live cd with qemu. As long as that causes similiar problems you know it's not related to MorphOS/Poseidon.

    If you get it to work with Linux live cd, but still not with MorphOS, maybe try some AROS Live CD (uses Poseidon USB Stack, too).
  • »20.09.21 - 14:55
    Profile
  • Butterfly
    Butterfly
    Posts: 98 from 2019/4/6
    @Georg
    Thanks for the advice,
    i tried "aros 440 live" with sam460ex
    actually the problem is the same "death of the device"
    or it is recognized but no class.hid is associated for example.
    at this point it seems to be UDEV the problem I probably have the parameters are wrong or the USB-audio is not completely disabled on the host.
    I had also tested morphos with sam460ex and pegasos2 but the problems are the same,
    or it's simply not possible I don't know :-)

    [ Edited by white 20.09.2021 - 19:01 ]
  • »20.09.21 - 16:55
    Profile
  • Butterfly
    Butterfly
    Posts: 98 from 2019/4/6
    I am tenacious I wanted to get back on the test
    now works
    I have disabled all UDEV rules
    and I just did:
    "stop pulseaudio.socket"
    this is what creates the problem with libusb as well
    the only drawback is that qemu remains frozen
    once the usb-audio is recognized
    if instead I remove the usb-audio stick everything works again
    and is perfectly recognized with:
    usbaudio.class and hid.class as in "real hardware"

    here the video with the test:
    https://www.youtube.com/watch?v=nH1_b3gwxc0

    I hope it will be useful for qemu and add any improvements
  • »23.09.21 - 14:21
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    liquidbit
    Posts: 406 from 2003/10/12
    I want to buy MOS and use it through QEmu... does anyone know if this is possible ?
  • »27.09.21 - 14:49
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2534 from 2003/3/5
    From: Canada
    You can use it in demo mode. It is not possible to register MorphOS running on QEmu.
  • »27.09.21 - 15:38
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Minuous
    Posts: 157 from 2010/2/12
    And consequently, since the SDK will not install in the allowed time, programmers wishing to support MorphOS can't use such a system for development.

    [ Edited by Minuous 28.09.2021 - 23:19 ]
  • »28.09.21 - 12:19
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2534 from 2003/3/5
    From: Canada
    Quote:

    Minuous wrote:
    And consequently, since the SDK will not install in the allowed time, programmers wishing to support MorphOS can't use such a system for development.


    I can install it just fine though. Perhaps your CPU is too slow for emulation. Then again, you really want to cross-compile in such case. QEmu's PPC emulation just isn't good enough and GCC will ICE / crash / crash QEmu eventually when compiling bigger projects.
  • »28.09.21 - 13:09
    Profile Visit Website
  • Butterfly
    Butterfly
    Georg
    Posts: 79 from 2004/4/7
    Well ... theoretically an emulator does not need to have 1:1 mapping between real time and emulated time. If for example in an emulator timing ran at half speed compared to real life, you could use it twice as long. To the OS in the emulated machine it would look like it's running on a machine that is twice as fast and being used by an hyper active user which is also twice as fast (for example at typing) as a normal user.

    ...
  • »28.09.21 - 13:17
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    polluks
    Posts: 669 from 2007/10/23
    From: Gelsenkirchen,...
    @Georg
    It may depend on the RTC which is independent of the speed.
    Pegasos II G4: MorphOS 3.9, Zalman M220W · iMac G5 12,1 17"
    Power Mac G3: OSX 10.3 · PowerBook 5,8: OSX 10.5, MorphOS 3.15
  • »28.09.21 - 16:33
    Profile
  • Butterfly
    Butterfly
    Georg
    Posts: 79 from 2004/4/7
    The emulator can lie about everything if it wants to. Depending on what user wants to do inside the emulated OS, he may not care about whether anything time related inside the emulation matches real world or not.
  • »28.09.21 - 16:47
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2534 from 2003/3/5
    From: Canada
    Quote:

    The emulator can lie about everything if it wants to.


    Which is precisely why we are not allowing QEmu registrations.
  • »28.09.21 - 19:13
    Profile Visit Website