MorphOS runs on QEmu
  • Butterfly
    Butterfly
    waldiamiga
    Posts: 94 from 2007/7/25
    From: Krakow, Poland
    I'm using an emulated Pegasos with MorphOS 3.15 rc1 to rc4. It can even be used, although it lacks a good graphics card. Lack of support for Lan and sound cards bothers a bit. It is also impossible to save autostart from setenv. Time to try the full version 6.1

    MorphOS.pl
    PowerBook G4 1.67GHz|2GB DDR2|ATI Radeon 9700M 128MB|SSD 80GB|TFT 17"|MorphOS 3.1x
    Core i7 Notebook|WinUAE 3.x/AmigaOS4.1x & Icaros Desktop 2.x & QEmu 6.x.x
  • »26.08.21 - 13:35
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > I'm using an emulated Pegasos with MorphOS 3.15 rc1 to rc4.

    I guess you mean rc1 to rc4 of QEMU v6.1 ;-)

    > Lack of support for Lan

    Why not simply use an emulated RTL8139 like in comment #140?

    > It is also impossible to save autostart from setenv.

    As a workaround until NVRAM emulation is added, you can extract the boot.img from the ISO image and use '-kernel boot.img'.
  • »26.08.21 - 20:00
    Profile
  • Butterfly
    Butterfly
    waldiamiga
    Posts: 94 from 2007/7/25
    From: Krakow, Poland
    Quote:

    Andreas_Wolf wrote:

    I guess you mean rc1 to rc4 of QEMU v6.1 ;-)



    Yes, sorry, my mistake.:)

    Quote:

    Andreas_Wolf wrote:
    Why not simply use an emulated RTL8139 like in comment #140?



    Parameter which i used in Mac99 emulation, -net nic,model=rtl8139 -net user not work, dos console message: warning:requested NIC (#net033, model rtl8139) was not created.
    (not supported by this machine?)



    Quote:

    Andreas_Wolf wrote:
    As a workaround until NVRAM emulation is added, you can extract the boot.img from the ISO image and use '-kernel boot.img'.


    Will try it tomorrow. Thanks for the help!

    MorphOS.pl
    PowerBook G4 1.67GHz|2GB DDR2|ATI Radeon 9700M 128MB|SSD 80GB|TFT 17"|MorphOS 3.1x
    Core i7 Notebook|WinUAE 3.x/AmigaOS4.1x & Icaros Desktop 2.x & QEmu 6.x.x
  • »26.08.21 - 20:16
    Profile
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    Is there some reason why anyone would use Pegasos II instead of Mac99 or Sam460 system in QEmu when running MorphOS? At least I don't see any reason.

    [ Edited by Piru 28.08.2021 - 07:59 ]
  • »26.08.21 - 21:12
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    sailor
    Posts: 368 from 2019/5/9
    From: Central Bohemi...
    Maybe because Pegasos was first MorphOS computer?
    And what about Altivec - how is emulated/used in Qemu PPC ? I think there are no options such "cpu mode='host-passthrough" in PPC Qemu+KVM version ?..
    AmigaOS3: Amiga 1200
    AmigaOS4: Micro A1-C, AmigaOne XE, Pegasos II, Sam440ep, Sam440ep-flex, Sam460LE, AmigaOneX1000
    MorphOS: Efika 5200b, Pegasos I, Sam460LE, Pegasos II, Powerbook G4, Mac Mini, iMac G5, Powermac G5 Quad
  • »27.08.21 - 11:32
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 105 from 2019/11/1
    Quote:

    Piru wrote:
    Is there some reason why anyone would use Pegasos II instead of Sam460 system in QEmu when running MorphOS? At least I don't see any reason.


    The goal was to use kvm-pr mode and use powerpc at full speed.
    With a Sam460ex it was not possible due it's book3e cpu.

    I repeat, any help is much appreciated and MOS Team could elaborate another way to release licences for these virtual boards.
  • »27.08.21 - 14:51
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3108 from 2003/3/5
    From: Canada
    Quote:

    MOS Team could elaborate another way to release licences for these virtual boards


    Once again, there are no plans to allow registering emulators.
  • »27.08.21 - 16:03
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > what about Altivec - how is emulated/used in Qemu PPC ?

    On x86-64, which is what Piru runs QEMU on, AltiVec/VMX instructions are translated to AVX instructions (or to scalar instructions on old x86-64 CPUs that lack AVX).

    > I think there are no options such "cpu mode='host-passthrough"
    > in PPC Qemu+KVM version ?

    In theory this should be possible with Book III-S CPU virtualized on Book III-S CPU (see comment #161). Some years ago, there were reports on POWER9 virtualizing G4 at 2 GHz running Mac OS X. I'm not aware of anyone successfully running MorphOS or OS4 this way, though.
  • »27.08.21 - 18:11
    Profile
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    Quote:

    The goal was to use kvm-pr mode and use powerpc at full speed.
    With a Sam460ex it was not possible due it's book3e cpu.


    You can configure arbitrary CPU while using QEmu. I often use 750cxe and 7448 when testing (this is in combination with -machine mac99). I don't know how kvm-pr works exactly but it'd be mighty silly if it would somehow restrict the emulated CPU type.

    You can get some impossible system + CPU combinations but as long as you boot the correct MorphOS version (and the CPU is supported in the first place) it ought to just work. Naturally if the kvm-pr can't emulate a MorphOS compatible CPU it won't work. My point here is that Pegasos II machine emulation doesn't give you any better options regarding this.

    Granted, I don't use kvm-pr myself so I have no intimate knowledge about the limitations it poses. Yet, I see no way how Pegasos II machine emulation would improve the situation there.

    [ Edited by Piru 28.08.2021 - 08:07 ]
  • »28.08.21 - 04:41
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 111 from 2004/4/7
    Quote:

    Piru wrote:
    Quote:

    The goal was to use kvm-pr mode and use powerpc at full speed.
    With a Sam460ex it was not possible due it's book3e cpu.


    You can configure arbitrary CPU while using QEmu. I often use 750cxe and 7448 when testing (this is in combination with -machine mac99). I don't know how kvm-pr works exactly but it'd be mighty silly if it would somehow restrict the emulated CPU type.



    There would not be any emulation of CPU as same (PowerPC) CPU which runs Qemu natively would run MorphOS natively (through Qemu). Like VirtualBox + co. in x86 world. Or AROS/hosted on Linux.
  • »28.08.21 - 06:26
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > I don't know how kvm-pr works exactly but it'd be mighty
    > silly if it would somehow restrict the emulated CPU type.

    See comments #149 and #161. KVM is not about (slow) CPU emulation but about (fast) CPU virtualization. With Power(PC) on Power(PC), KVM-PR lets user mode instructions be run directly but emulates supervisor/privileged instructions, as explained here and there. However, this only works with Book III-S on Book III-S (called just 'Book III' in PowerPC ISA and again as of Power ISA v3.0+), not with Book III-S on Book III-E (called 'Book E' during PowerPC ISA era), not with Book III-E on Book III-S, and interestingly also not with Book III-E on Book III-E.

    > if the kvm-pr can't emulate a MorphOS compatible CPU it won't work.

    It can, see link in comment #174. The issue lies elsewhere.

    > Pegasos II machine emulation doesn't give you any better options regarding this. […]
    > I see no way how Pegasos II machine emulation would improve the situation there.

    See above.
  • »28.08.21 - 10:05
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    ppcamiga1
    Posts: 215 from 2015/8/23
    There is almost no money in Morphos.
    Made Morphos open source and let everbody use it as they want.
    kvm why not?
    proces under ppc linux why not?
    emulator why not?
  • »28.08.21 - 10:06
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > There would not be any emulation of CPU as same (PowerPC) CPU
    > which runs Qemu natively would run MorphOS natively (through Qemu).

    This would be KVM-HV, which virtualizes as guest CPU the very same CPU as the host CPU. KVM-PR provides partly direct execution, partly emulation, depending on instruction privilege level.
  • »28.08.21 - 10:24
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Flash
    Posts: 105 from 2019/11/1
    Quote:

    Piru wrote:
    Granted, I don't use kvm-pr myself so I have no intimate knowledge about the limitations it poses. Yet, I see no way how Pegasos II machine emulation would improve the situation there.


    Pegasos II virtual machine was addressed mainly to run OS4 on PowerMacs in KVM mode.
    The whole project is a work in progress, I'll have to give some feedback to Zoltan to enable KVM.
  • »28.08.21 - 11:48
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3108 from 2003/3/5
    From: Canada
    Quote:

    ppcamiga1 wrote:
    kvm why not?
    proces under ppc linux why not?
    emulator why not?



    Nobody stops you doing either of those.

    Quote:

    Made Morphos open source and let everbody use it as they want.


    My WebKit port is open source... nobody has even forked the repo so far. The people who would know what to do with those sources are already inside the MorphOS Team.
  • »28.08.21 - 13:27
    Profile Visit Website
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    I am well aware how KVM virtualization works in general. My point was that no amount of Pegasos II system emulation helps with whatever issues there are with it.
  • »28.08.21 - 16:37
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > no amount of Pegasos II system emulation helps with whatever issues there are with it.

    Yes, but the basis to use QEMU for running MorphOS/OS4 on speedy POWER9 or OS4 on cheap G5 Macs, all without (full) CPU emulation, is now already there with the Pegasos II emulation, so that as soon as the issue that prevents running MorphOS or OS4 with KVM-PR is solved, the fun can begin for those inclined.

    Edit: some corrections

    [ Edited by Andreas_Wolf 29.08.2021 - 09:54 ]
  • »28.08.21 - 18:36
    Profile
  • MorphOS Developer
    Piru
    Posts: 587 from 2003/2/24
    From: finland, the l...
    Quote:

    Andreas_Wolf wrote:
    > no amount of Pegasos II system emulation helps with whatever issues there are with it.

    Yes, but the basis to use QEMU for running MorphOS/OS4 on speedy POWER9 or OS4 on cheap G5 Macs, all without (full) CPU emulation, is now already there with the Pegasos II emulation, so that as soon as the issue that prevents running MorphOS or OS4 with KVM-PR is solved, the fun can begin for those inclined.

    I still fail to see what this Pegasos II emulation brings to running MorphOS in QEmu. I see no benefits whatsoever over Mac99.

    If this is about some other OSes that's a completely different topic that I'm not interested in.
  • »29.08.21 - 00:19
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    ppcamiga1
    Posts: 215 from 2015/8/23
    Quote:

    The people who would know what to do with those sources are already inside the MorphOS Team.


    Maybee not.
    MOS Team loses nothing by made Morphos open source.
  • »29.08.21 - 06:12
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Andreas_Wolf
    Posts: 12150 from 2003/5/22
    From: Germany
    > I still fail to see what this Pegasos II emulation brings to running MorphOS
    > in QEmu. I see no benefits whatsoever over Mac99. If this is about some
    > other OSes that's a completely different topic that I'm not interested in.

    Yes, you are right. The basis of running MorphOS with KVM-PR is already covered by the mac99 system emulation (but not by Sam460 emulation you mentioned in comment #162 and originally in comment #170, i.e. before you added Mac99 in an edit). So this is about an OS you're not interested in (as already said by Flash in comment #180).
  • »29.08.21 - 07:49
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    I was trying to recognize the "audio stick"
    I like to take tests :-)

    "the stick I use is regularly recognized by the real morphos hardware"

    I was wondering if this "poseidon" error is probably due to because I have not yet created a UDEV rule or is it possible to solve it within morphos?

    here is the log:
    13: 50: 01 | 0-poseidon.library: Welcome to poseidon 4.4 (15.3.18) © 2002-2018 by Chris Hodges (20090807)!
    13: 50: 01 | 0-poseidon.library: This is the PPC native MorphOS version.
    13: 50: 01 | 0-poseidon.library: Event broadcaster started.
    13: 50: 01 | 0-poseidon.library: Say hello to massstorage.class V4.9 (Supports storage devices via usbscsi.device (MOS)).
    13: 50: 01 | 0-poseidon.library: Whoah! hub.class V4.4 surprised as Root / external hub base class (MOS).
    13: 50: 01 | 0-poseidon.library: The door bell rang for hid.class V4.6 (Generic support for human interface devices (MOS)).
    13: 50: 01 | 0-poseidon.library: New hardware pciusb.device / 0 added (PCI OHCI USB 1.1 Host Controller (NEC)).
    13: 50: 01 | 0-poseidon.library: Root hub has been enumerated.

    13: 50: 01 | 20-poseidon.library: Opening pciusb.device unit 1 failed device / unit failed to open (-1).

    13: 50: 01 | 0-hub.class: Hub with 3 ports successfully configured.
    13: 50: 01 | 0-hub.class: I'm in love with hub 'PCI Root Hub Unit 0'.
    13: 50: 02 | 0-hub.class: Detected device 'QEMU USB Keyboard' at port 1. I like it.
    13: 50: 02 | 0-hub.class: Detected device 'QEMU USB Mouse' at port 2. I like it.
    13: 50: 02 | 0-hub.class: Detected device 'QEMU USB Hub' at port 3. I like it.
    13: 50: 02 | 0-hub.class: Hub has added 3 device (s). That'll be fun!
    13: 50: 02 | 0-hid.class: Using HID Descriptor from initial configuration run.
    13: 50: 02 | 0-hid.class: HID the road, 'QEMU USB Keyboard'!
    13: 50: 02 | 0-hid.class: Using HID Descriptor from initial configuration run.
    13: 50: 02 | 0-hid.class: HID the road, 'QEMU USB Mouse'!
    13: 50: 02 | 0-hub.class: Hub with 8 ports successfully configured.
    13: 50: 02 | 0-hub.class: I'm in love with hub 'QEMU USB Hub'.
    13: 50: 43 | 5-Trident: Forcing a DirScan for (new) classes, as you probably updated to a newer version.

    thanks for any suggestions :-)

    [ Edited by white 17.09.2021 - 22:17 ]
  • »17.09.21 - 20:09
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    I created a UDEV rule for the usb-audio device now qemu (morphos) is able to access the device and the device is recognized as audio-usb-device and recognizes the device with the correct name.
    Not everything is perfect but it is a small step forward.
    If I try to rescan the device stops working.
    Qemu probably needs to be recompiled for usb support (maybe)
    here the log of morphos:

    15: 20: 03 | 0-poseidon.library: Welcome to poseidon 4.4 (15.3.18) © 2002-2018 by Chris Hodges (20090807)!
    15: 20: 03 | 0-poseidon.library: This is the PPC native MorphOS version.
    15: 20: 03 | 0-poseidon.library: Event broadcaster started.
    15: 20: 03 | 0-poseidon.library: Say hello to massstorage.class V4.9 (Supports storage devices via usbscsi.device (MOS)).
    15: 20: 03 | 0-poseidon.library: Whoah! hub.class V4.4 surprised as Root / external hub base class (MOS).
    15: 20: 03 | 0-poseidon.library: The door bell rang for hid.class V4.6 (Generic support for human interface devices (MOS)).
    15: 20: 03 | 0-poseidon.library: New hardware pciusb.device / 0 added (PCI OHCI USB 1.1 Host Controller (NEC)).
    15: 20: 03 | 0-poseidon.library: Root hub has been enumerated.
    15: 20: 03 | 20-poseidon.library: Opening pciusb.device unit 1 failed device / unit failed to open (-1).
    15: 20: 03 | 0-hub.class: Hub with 3 ports successfully configured.
    15: 20: 03 | 0-hub.class: I'm in love with hub 'PCI Root Hub Unit 0'.
    15: 20: 04 | 0-hub.class: Detected device 'QEMU USB Keyboard' at port 1. I like it.
    15: 20: 04 | 0-hub.class: Detected device 'QEMU USB Mouse' at port 2. I like it.
    15: 20: 04 | 0-hub.class: Detected device 'QEMU USB Hub' at port 3. I like it.
    15: 20: 04 | 0-hub.class: Hub has added 3 device (s). That'll be fun!
    15: 20: 04 | 0-hid.class: Using HID Descriptor from initial configuration run.
    15: 20: 04 | 0-hid.class: HID the road, 'QEMU USB Keyboard'!
    15: 20: 04 | 0-hid.class: Using HID Descriptor from initial configuration run.
    15: 20: 04 | 0-hid.class: HID the road, 'QEMU USB Mouse'!
    15: 20: 04 | 0-hub.class: Hub with 8 ports successfully configured.
    15: 20: 04 | 0-hub.class: I'm in love with hub 'QEMU USB Hub'.
    15: 20: 04 | 0-hub.class: Detected device 'USB Audio Device ??????????????' at port 1. I like it.
    15: 20: 04 | 0-hub.class: Hub has added 1 device (s). That'll be fun!
    15: 20: 04 | 10-poseidon.library: GET_INTERFACE (1) failed: response timeout (6)
    15: 20: 04 | 10-poseidon.library: GET_INTERFACE (2) failed: response timeout (6)
    15: 20: 04 | 0-hid.class: Using HID Descriptor from initial configuration run.
    15: 20: 04 | 10-hid.class: GET_REPORT_DESCRIPTOR (60) failed: response timeout (6)!
    15: 20: 04 | 20-hid.class: Error parsing report descriptors!
    15: 20: 04 | 10-poseidon.library: GET_INTERFACE (1) failed: response timeout (6)
    15: 20: 04 | 10-poseidon.library: GET_INTERFACE (2) failed: response timeout (6)
    15: 20: 04 | 0-hid.class: Using HID Descriptor from initial configuration run.
    15: 20: 04 | 10-hid.class: GET_REPORT_DESCRIPTOR (60) failed: response timeout (6)!
    15: 20: 04 | 20-hid.class: Error parsing report descriptors!
    15: 20: 08 | 5-poseidon.library: Device USB Audio Device ?????????????? probably dropped dead!
    15: 20: 08 | 5-usbaudio.class: Recording mode with 1 ch @ 16b was assigned to 2 ch @ 16b output mode.
    15: 20: 08 | 10-poseidon.library: GET_INTERFACE (1) failed: response timeout (6)
    15: 20: 08 | 10-poseidon.library: GET_INTERFACE (2) failed: response timeout (6)
    15: 20: 08 | 10-hid.class: GET_REPORT_DESCRIPTOR (60) failed: response timeout (6)!
    15: 20: 08 | 20-hid.class: Error parsing report descriptors!

    here a small video of the test:
    https://www.youtube.com/watch?v=wTLi_UQfUro
  • »19.09.21 - 12:11
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 158 from 2019/4/6
    here instead how the usb-audio stick on the powerbook g4 is recognized:
    https://www.youtube.com/watch?v=4wvQ7ClU-5E
  • »19.09.21 - 15:02
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3108 from 2003/3/5
    From: Canada
    I've tried experimenting with this and my bet would be that QEmu simply does not emulate the USB hardware well enough for MorphOS drivers to work.
  • »19.09.21 - 16:11
    Profile Visit Website