Morphos on Qemu not usable, any chance ?
  • Caterpillar
    Caterpillar
    Barren
    Posts: 35 from 2016/12/29
    Hi, I have an old PowerMac G5 which I still keep for those rare times I still need to use MorphOS, for those 2 or 3 programs, very seldom. But I still need them sometimes. I wanted to eventually get rid of it (it's too bulky and often fails to boot) so I decided to try Qemu.
    I followed this simple tutorial https://amigafun.wordpress.com/2020/12/30/morphos-3-14-and-qemu-5-2/ and I had some luck, despite some inaccuracy in the description I eventually managed to install and run MorphOS 3.18 on my PC.
    Fact is, despite everything seems OK at first glance, the whole thing is far from usable, because of the mouse pointer. It moves jerky, and sometimes it also has hiccups. Also, Qemu grabs the mouse pointer completely, not just when one clicks inside its window as it should be. As a result, you can't even click on your Windows desktop or grab the Qemu window bar anymore. In addition, sometimes you can't move MorphOS pointer over a certain area because the normal Windows pointer resumes moving from that position, still being far within MorphOS screen limits. Well, it seems mouse support is very poor and buggy.
    I don't know if Qemu is really so primitive or there are rather some options to improve mouse handling. I am a total newbie here, I cannot recompile it if needed nor I know anything of Linux/Unix.
    Thx
  • »27.12.24 - 21:10
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    sailor
    Posts: 379 from 2019/5/9
    From: Central Bohemi...
    @Barren
    try to use different video device: -device sm501 and newer qemu according to this Zoltan Balaton guide.
    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.12.24 - 21:41
    Profile
  • Caterpillar
    Caterpillar
    Barren
    Posts: 35 from 2016/12/29
    Hi Sailor and thanks for your answer, I tried with -device sm501 but there is no difference at all :(
    Also, I am *already* using the latest Windows x64 build of course (9.2.0, Dec 2024).
    The mouse pointer still has severe hiccups.
    I read somewhere that it is likely caused by a sensor.service but I can't work anything useful out of the explanation they give to fix it.

    But what is even worse is how Qemu grabs the mouse pointer movement, preventing to drag its window. Once you click in its window at beginning, it keeps controlling the mouse pointer, but when you click outside its window, it *keeps* intercepting it, which is IMHO a bug (control should return to Windows).
    Also, as I said, you can't move the mouse pointer to the very left of MorphOS screen, because at some point Windows pointer reappears and starts moving in place of MorphOS' one !
    And once I risked and enabled full-screen mode: the only way out was resetting the PC with the reset button !!!

    My question was, more generically, if somebody managed to run MorphOS with Qemu in an "usable" way, considering the preliminary problems with the mouse pointer I am encountering...
  • »27.12.24 - 23:11
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Minuous
    Posts: 162 from 2010/2/12
    ikill temperature.sensor

    should stop the momentary freezes, you could put that in your s:user-startup. Or you could emulate eg. pegasos2 guest, IIRC the freezing only happens on mac99 guest.

    Frequent use of Ctrl-Alt-G shortcut helps with keeping the pointers in sync, you move the mouse so that the host and guest pointers are at the same position over the QEMU window and then click.

    Ctrl-Alt-Del should still work to bring up Task Manager in any situation, it shouldn't be necessary to ever actually reboot the host.

    The worst problem I have is that most non-trivial applications do not work correctly even though they are OK on the real machine, which makes it useless for testing programs. Presumably some bug in the CPU emulation. At least for the pegasos2 guest on QEMU 7.2.0. Conceivably it might have been fixed in some later version of QEMU, it was 2 years ago that I set it all up.

    [ Edited by Minuous 28.12.2024 - 11:26 ]
  • »28.12.24 - 01:22
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    Tcheko
    Posts: 538 from 2003/2/25
    From: France
    Some tweaks I figured out to make QEmu run Morphos a bit better.

    Mouse accuracy
    -device usb-mouse -device usb-tablet allows a bit better mouse handling
    between the guest and the host. Not perfect but a bit better with.

    Network
    sungem is working better than rtl8139 on my setup (ie: read rtl8139 is
    simply failing)

    Building a somewhat more integrated QEMU (linux)
    ------------------------------------------------

    Using VNC to access the emulated machine can be a bit cumbersome. It is
    possible to build QEMU to use a GTK window for displaying the guest. Do not expect 3D acceleration at all. :)

    You'll need to fetch the QEMU source tree, install GCC and whatever the usual mess for building stuff.

    1. CC tweaking before building QEMU
    CC="gcc -mavx -march=native" CXX="g++ -mavx -march=native" ../configure \
    --target-list=ppc-softmmu \
    --enable-lto \
    --enable-gtk

    -march=native is used to solve an issue with some unsupported atomic16 op
    on my system. Might not be necessary at all for yours.
    -mavx should be set only if your system supports AVX2 extension.

    You'll probably need to install libgtk-3-dev (for debian) before configuring.

    2. Build QEMU

    make

    3. Tweak the qemu starting recipe

    Add "-display gtk" to your qemu starting options

    qemu will now display a window with a perfect mouse matching between
    host and guest. No more VNC needed for accessing the guest.

    Some somewhat usefull options that can be used to improve the UI experience:
    -display gtk,window-close=on|off,fullscreen=on|off,gl=on|off,show-menubar=on|off,zoom-to-fit=on|off

    It is not a fully detailed how to but some rough hint to build an 'improved' QEMU experience for running MorphOS.
    Quelque soit le chemin que tu prendras dans la vie, sache que tu auras des ampoules aux pieds.
    -------
    I need to practice my Kung Fu.
  • »28.12.24 - 10:07
    Profile Visit Website