Running MorphOS in Qemu

AmigaOne X5000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: Running MorphOS in Qemu

Post by xeno74 »

Roland wrote: Tue May 25, 2021 1:03 pm Thanks, with that string I got it running !-) Is the "mac_ppc32/boot.img" some special internal bootimage of qemu?
It's on the ISO.
But the emulation worked VERY slowly, especially the pointer... Is that normal, or is there still some problem?
I think you tested it on the X5000/20. On the X5000/40 it isn't very slow. It's not fast but I can test some things.
Roland wrote: Tue May 25, 2021 1:03 pm Can you use qemu with a hd image of a USB stick which can boot mos 'natively' in X5000? Or do you need an installation made for some other machine? How should the string be formulated for that? HD installation within qemu is impossible because of the slowness...
I haven't tested an HD installation in a virtual QEMU machine yet because it is natively installed on my X5000/20. I would recommend you to use it native. I bought an ATi Radeon X1950 PRO Extreme and a Creative Sound Blaster Live Player 1024 (EMU10K1 audio processor) for my MorphOS X5000.

Impressions of MorphOS on a X5000/20:

Image

Image

Image

Image

Image

Image

Image

ATi Radeon X1950 PRO Extreme installed in my X5000:

Image

Creative Sound Blaster Live Player 1024 (EMU10K1 audio processor):

Image

MorphOS in a virtual QEMU machine is very good for testing but if you want to do productive work then I would recommend a nativ installation of MorphOS on your X5000.

BTW, Fienix works very well on this MorphOS hardware compatible X5000 as well.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Roland
Posts: 824
Joined: Tue May 02, 2017 7:23 am

Re: Running MorphOS in Qemu

Post by Roland »

xeno74 wrote: Tue May 25, 2021 2:19 pm I think you tested it on the X5000/20. On the X5000/40 it isn't very slow. It's not fast but I can test some things.
How about the pointer, is it moving more or less normally in your system? When I tested it was moving from the very beginning like the slowed-down pointer in native MOS after the first 30 minutes of use. I do not have the licence, so I cannot test whether it has any effect on qemu.
I haven't tested an HD installation in a virtual QEMU machine yet because it is natively installed on my X5000/20. I would recommend you to use it native. I bought an ATi Radeon X1950 PRO Extreme and a Creative Sound Blaster Live Player 1024 (EMU10K1 audio processor) for my MorphOS X5000.
I will not be able to use it anymore natively as I will soon have a Radeon R7 240 in my X5000 (I would like to finally test some 3D software with AmigaOS...!) That's why I gave a try to the qemu.
- Roland -
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: Running MorphOS in Qemu

Post by xeno74 »

Roland wrote: Tue May 25, 2021 3:00 pm How about the pointer, is it moving more or less normally in your system? When I tested it was moving from the very beginning like the slowed-down pointer in native MOS after the first 30 minutes of use.
Hi Roland,

I have found the following explanation with a solution:
Mouse movement periodically jumps and CPU usage is high on mac99.
This is caused by a high priority temperature.sensor task which presumably tries to access temperature sensors over I2C but this is not emulated by QEMU so this hangs waiting for an interrupt which is not delivered so it has to time out. You can see this in Applications / LogTool / LogTool. Workaround is to lower priority of this task from Utilities / Task Manager until this is implemented in QEMU which helps with mouse freezing but does not avoid possible performance impact of this. The sensor task can also be stopped by ikill temperature.sensor from a shell command window or some start up script. I have collected some information on what is needed to emulate this I2C bus in QEMU here so if someone wants to help implementing it this is open for contribution.
Please try the shell command ikill temperature.sensor

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: Running MorphOS in Qemu

Post by xeno74 »

xeno74 wrote: Wed May 26, 2021 7:12 am Please try the shell command ikill temperature.sensor
I tested it today and it solves the mouse issue.

Image

Image
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Running MorphOS in Qemu

Post by Hypex »

I thought I would have a go after reading this thread. So I tried it on my X1000. I found I was missing the main binary but did an apt-get on the name and it installed quickly with few depends on Fienix. Unlike the x86/64 version the one in Fienix is up to date and the command line works. So I managed it get it booting with the latest MorphOS 3.15 ISO. For a while I didn't know anything was happening. It loaded up a window with the message about no active display. And on terminal said new context. But after a while the window resized. I found later I had to use the patched bios as I got stuck on a frozen pointer.

I haven't tested it much yet but it looks interesting. Slightly sluggish but should still be usable for testing. As with any emulation requires patience. :-)

I thought I would also try qemu on my laptop. I installed it but it lacks a GUI as standard so installed all these files with no sign anything was added. Guess I'm used to it from the package manager when packages have logos. I tried this QEMUCTL app but it's broken as it only has menus and the window is blank. It could actually a fault of of Qt as I find it's buggy and not very useful as a user interface, Never been able to fix it.

So as is typical in Linux, the latest version in the distro is years out of date. Happens with Wine all the time. And it couldn't boot MorphOS. So I removed it and then downloaded the huge source and left my laptop to spend an hour compiling it. I should have just selected ppc but I went to the X1000 in the meantime. I kind of don't get these guys. Unlike with Wine, you can't actually download a package for QEMU. On the download page they only list source. There is a Windows binary hidden in the text, nothing for Mac and nothing for Linux to download. It all looks like it's designed for programmers and not any users. They want to get this out there they should provide binaries IMHO. Even the make file can't even make a deb. Looks a bit exclusive.

I booted up MorphOS and it looks to have worked. I used the simpler line letting it find the boot image from the iSO. It was faster than the X1000 but I wouldn't say blazing fast. There was still a delay where I wonder if anything was going on. I found knocking out the "-vga none" setting helped as without it you at least get OpenBIOS text telling you something is going on. Then suddenly MorphOS springs to life. The speed is comparable to my 1.67Ghz PowerBook. It actually looks usable and is fluent. Running it on a humble i5-8250U. But, I have an immediate issue, the graphics are messed up. It looks like it scaled the screen and the text is hard to read. I tried to specify "-g 1024x768" but it's still messed up. I didn't see this issue on PPC.

In practical use, emulating ppc is fine on x86, or when using KVM on ppc. But otherwise emulating ppc on ppc is impractical. In that case I suggest a solution like MoL would be best. Wasn't there some shots of MacOnLinux a while back? If that can work on new AmigaOne systems that would be a better and faster solution to running MorphOS in a VM. Since MorphOS can run on Mac it makes sense to me. :-)
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: Running MorphOS in Qemu

Post by xeno74 »

Hi Hypex,

Thanks a lot for your report! MacOnLinux is available but I haven't tested MorphOS in this vm yet.

Download:

Image

mol-kvm_0.9.73.0-ubuntu_powerpc.deb

Have a nice day,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Running MorphOS in Qemu

Post by Hypex »

Thanks for link! I spent some time looking this up. Forgot about all the discussions years ago.

I almost got somewhere with qemu x86. I found some option to open a window at real size, but then I lost the settings and can't remember what it was. The display was oversized and didn't fit but it wasn't scaled down so I could read it, even if I couldn't use it,

I think this is a flaw in the qemu design. Despite being a huge project they haven't added the ability to set standard settings like display resolution. My research indicates it can't be done directly but needs to be done by modifying the X11 settings or using something like a spice screen. The issue is my laptop screen isn't big enough. I read the default should be 1024x768 but that isn't the case. I think it is defaulting to 1280x1024 but scales it on my 1366x768 display. It would be acceptable if it interpolated and blended but it's a hard rescale so unsuitable. My X1000 will be fine as it has a HD monitor though a lesser resolution would help to speed it up.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Running MorphOS in Qemu

Post by Hypex »

xeno74 wrote: Thu Aug 26, 2021 7:53 am mol-kvm_0.9.73.0-ubuntu_powerpc.deb

Have a nice day,
Christian
I'm afraid the nice package you provided is missing files or depends. It installed fine in Fienix without errors but startmol doesn't work. It needs libpng12 but it's not installed nor can be. The codebase should be updated to the current libpng16 and rebuilt but I don't know how much rework it is. I downloaded libpng12 and compiled it on my X1000 but it didn't fix it and they don't provide a make deb. It needs libpng12-0.so but I don't know where or how to produce it. I'll try on my older Ubuntu.
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: Running MorphOS in Qemu

Post by xeno74 »

Hypex wrote: Fri Aug 27, 2021 9:49 am It needs libpng12 but it's not installed nor can be. The codebase should be updated to the current libpng16 and rebuilt but I don't know how much rework it is.
How about creating a symbolic link called libpng12 to libpng16 with “ln -s“?
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: Running MorphOS in Qemu

Post by Hypex »

xeno74 wrote: Fri Aug 27, 2021 7:13 pm How about creating a symbolic link called libpng12 to libpng16 with “ln -s“?
Well, for one thing, I don't exactly know where those so libs are that it wants. And it's a bit of a hack. Given the API is different it could fail or crash. I think the latest source needs to be recompiled. Although it could be all over the place. I'm sure I read of a newer one somewhere.

It worked fine in Ubuntu 12.04. I mean loaded fine. I forgot how quirky it is. Needing root and all the config files. I expected to get a module error but didn't. This may be due to kvm and it's better now. Mol was very picky about having modules for the exact kernel it was running. I was reminded of this when I read the old thread with Scabit posting his problems. I think he must have given up. And I got that damned sync read error again! I thought that was fixed five years ago! I can't find my OSX CD so I can't test with OSX. But I could get the Mol logo opening a screen. Didn't get MOS booting.

Also it is buggy still, as I got crashes, VM unmapping errors and other things scrolling by. Strangely, the self test passed, which initially gave me hope. :-)
Post Reply