Upstream

About Qemu-system-m68k, a m68k Mac emulator for Windows, macOS and Linux that can run MacOS 7.1 to 8.1, AUX 3.x and NetBSD

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
donsmith2060
Space Cadet
Posts: 1
Joined: Thu Nov 17, 2022 2:09 am

Upstream

Post by donsmith2060 »

Just curious,
What needs to be done to get this work upstream?
User avatar
Cat_7
Expert User
Posts: 6209
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Upstream

Post by Cat_7 »

I guess the developer is close to upstreaming, however, a small fpu bug has just recently been discovered. And there is an issue with running BSD.
We just have to wait a bit.

Best,
Cat_7
lfnpcsoft
Space Cadet
Posts: 1
Joined: Sat Jan 28, 2023 12:39 am

Re: Upstream

Post by lfnpcsoft »

Hi! I'd like to ask some questions.
As I was following the guide on E-Maculation website (QEMU version 7.1.50), using the given qemu-system-m68k binary, the emulator booted and ran smoothly.
However, when I was using QEMU binaries from Homebrew (Host OS: macOS 13 on Apple Silicon), it got stuck in a white screen without any words.(QEMU version 7.2.0)
I've also tried to compile qemu-system-m68k from source, but it doesn't work either. (QEMU version 7.2.0)
So I am curious about the differences between the binaries on this website and binaries from Homebrew / built from source code.
Is there any upstream code-related differences? Or just differences when compiling?
Last edited by lfnpcsoft on Sat Jan 28, 2023 1:04 am, edited 1 time in total.
User avatar
Cat_7
Expert User
Posts: 6209
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Upstream

Post by Cat_7 »

Hi,

The code for running Mac OS or A/UX on qemu-system-m68k is not yet in the official Qemu repository. Brew bases its builds on the official repository, so when using those you end up with a non-functional binary.
For now, if you want to build your own, you should get the source code from the author:

git clone -b q800.upstream3 https://www.github.com/mcayland/qemu q800-upstream3

Best,
Cat_7
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Re: Upstream

Post by kikyoulinux »

Qemu 8.2 now supports emulating System 7.1-8.1 and A/UX 3.0.1.
https://wiki.qemu.org/ChangeLog/8.2#68k
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

What is the current upstream?

I tried upstream3 on a minimal Ubuntu 22.04 and got dependency errors, so I will try on a standard desktop install, but want to make sure I get it right.

Is there a build guide, documentation or website for the upstream branch? Basically from a base Ubuntu desktop install to successful build of latest upstream compatible with running System 7.1 :)

I’m mostly a Mac guy, but reasonably comfortable on Linux.

Thank you!

Sean
User avatar
adespoton
Forum All-Star
Posts: 4321
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Upstream

Post by adespoton »

europlus wrote: Sat Mar 30, 2024 12:20 am What is the current upstream?

I tried upstream3 on a minimal Ubuntu 22.04 and got dependency errors, so I will try on a standard desktop install, but want to make sure I get it right.

Is there a build guide, documentation or website for the upstream branch? Basically from a base Ubuntu desktop install to successful build of latest upstream compatible with running System 7.1 :)

I’m mostly a Mac guy, but reasonably comfortable on Linux.

Thank you!

Sean
As mentioned up-thread, official QEMU as of 8.2 has the m68k Q800 upstream updates merged. So you just need to use official QEMU now. You'll need a copy of the Q800 ROM (pointed at via BIOS flag in QEMU), a blank disk image to install 7.1 onto, and your 7.1 floppies or install CD image. If you're using the Q800 machine, the defaults should be all you need to get running. Try to get to the flashing floppy first, and then add your install media and try to boot :)

The builds on here contain pre-built scripts with the correct arguments to run against official QEMU as well; you can use the scripts and instructions we've got here to get things running.
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

adespoton wrote: Sat Mar 30, 2024 2:52 am As mentioned up-thread, official QEMU as of 8.2 has the m68k Q800 upstream updates merged. So you just need to use official QEMU now. You'll need a copy of the Q800 ROM (pointed at via BIOS flag in QEMU), a blank disk image to install 7.1 onto, and your 7.1 floppies or install CD image. If you're using the Q800 machine, the defaults should be all you need to get running. Try to get to the flashing floppy first, and then add your install media and try to boot :)

The builds on here contain pre-built scripts with the correct arguments to run against official QEMU as well; you can use the scripts and instructions we've got here to get things running.
Thank you, I gathered that shortly before I read your reply.

I have working disk images from QEMU on macOS. I've installed QEMU via apt-get, but I'm not (yet) sure if it's ≥8.2.

I get a blank screen on boot using both gtk and sdl as the -display switch

Do I need to compile from source for 8.2.2?

Thanks!

Sean
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

europlus wrote: Sat Mar 30, 2024 3:27 am I have working disk images from QEMU on macOS. I've installed QEMU via apt-get, but I'm not (yet) sure if it's ≥8.2.

I get a blank screen on boot using both gtk and sdl as the -display switch

Do I need to compile from source for 8.2.2?
Hmm...if I

Code: Select all

qemu-system-m68k --help
it says v6.2.0

compile time, I think.
User avatar
Cat_7
Expert User
Posts: 6209
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Upstream

Post by Cat_7 »

Hi,

Yes, that is too old. The SDL and GTK display options were added later. So you can either compile a new version yourself, or use one of our builds.

Best,
Cat_7
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

europlus wrote: Sat Mar 30, 2024 3:33 am compile time, I think.
I finally got 8.2.2 compiled with gtk and sdl support, and I get a window with display data and it boots and everything…well, almost everything.

I've tried two different ways to create a bridged interface in Ubuntu for qemu to use, but I always seem to hit this error:

Code: Select all

failed to create tun device: Operation not permitted
qemu-system-m68k: -nic bridge,model=dp83932,br=br0: bridge helper failed
I've tried lots of variations, I have chmod +s on qemu-bridge-helper. I feel really close, but not close enough, obviously.

The pages I tried the bridge instructions for are here and here (I had to create the bridge.conf file in a different location for qemu-bridge-helper to find it).

Here is what Webmin sees of my interfaces:

Code: Select all

Name	Type		IPv4 address		Netmask		Status
br0	Bridge		10.0.27.140		255.255.255.0	Up
eno1	Ethernet	No address configured			Up
lo	Loopback	127.0.0.1		255.0.0.0	Up
wlp3s0	Unknown		10.0.27.192		255.255.255.0	Up
br0 is bridged to eno1, and seems to be getting its IP address.

Is there something else I might be missing?

For example, do I need to use any additional compile-time switches? Or something different in my -net or -nic qemu command line options?

Thanks,

Sean
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

Cat_7 wrote: Sat Mar 30, 2024 6:53 am Yes, that is too old. The SDL and GTK display options were added later. So you can either compile a new version yourself, or use one of our builds.
I've tried to find the linux builds you refer to with no luck. I think my brain is getting frazzled.

Any help greatly appreciated :D

Sean
User avatar
Cat_7
Expert User
Posts: 6209
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Upstream

Post by Cat_7 »

Oh,

I assumed you were running on macOS. I have no experience with the bridge helper.

Best,
Cat_7
User avatar
adespoton
Forum All-Star
Posts: 4321
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Upstream

Post by adespoton »

europlus wrote: Sat Mar 30, 2024 10:44 am
europlus wrote: Sat Mar 30, 2024 3:33 am compile time, I think.
I finally got 8.2.2 compiled with gtk and sdl support, and I get a window with display data and it boots and everything…well, almost everything.

I've tried two different ways to create a bridged interface in Ubuntu for qemu to use, but I always seem to hit this error:

Code: Select all

failed to create tun device: Operation not permitted
qemu-system-m68k: -nic bridge,model=dp83932,br=br0: bridge helper failed
I've tried lots of variations, I have chmod +s on qemu-bridge-helper. I feel really close, but not close enough, obviously.

The pages I tried the bridge instructions for are here and here (I had to create the bridge.conf file in a different location for qemu-bridge-helper to find it).

Here is what Webmin sees of my interfaces:

Code: Select all

Name	Type		IPv4 address		Netmask		Status
br0	Bridge		10.0.27.140		255.255.255.0	Up
eno1	Ethernet	No address configured			Up
lo	Loopback	127.0.0.1		255.0.0.0	Up
wlp3s0	Unknown		10.0.27.192		255.255.255.0	Up
br0 is bridged to eno1, and seems to be getting its IP address.

Is there something else I might be missing?

For example, do I need to use any additional compile-time switches? Or something different in my -net or -nic qemu command line options?

Thanks,

Sean
I've only played around a tiny bit with bridge-helper, and found it to be quite a headache. However, your issue may be something simpler: whatever is managing the tun interface needs to run as root. This may mean just doing sudo qemu-system-m68k, or it may require some other component be running as root if you're using qemu-bridge-helper.
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

adespoton wrote: Sat Mar 30, 2024 7:30 pm I've only played around a tiny bit with bridge-helper, and found it to be quite a headache. However, your issue may be something simpler: whatever is managing the tun interface needs to run as root. This may mean just doing sudo qemu-system-m68k, or it may require some other component be running as root if you're using qemu-bridge-helper.
Thanks – I've tried that with no luck. No error message, but no QEMU window, either. I'll keep delving.

[EDIT] I have also stopped the bridge interface from getting an address via DHCP in case that was blocking the client OS from utilising the interface. Still no go. [/EDIT]

Sean
User avatar
Cat_7
Expert User
Posts: 6209
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Upstream

Post by Cat_7 »

I never tried the helper. I just run as root with: -nic tap,model=dp83932,mac=08:00:07:12:34:56,ifname=tap0,script=no,downscript=no
and make sure that I have the tap0 device bridged using the tools in my distro.

Can you get by by forwarding some ports to the host? If so, check our guide about hostfwd rules.

Best,
Cat_7
europlus
Student Driver
Posts: 10
Joined: Mon Mar 11, 2024 3:15 am

Re: Upstream

Post by europlus »

Cat_7 wrote: Sun Mar 31, 2024 6:37 am I never tried the helper. I just run as root with: -nic tap,model=dp83932,mac=08:00:07:12:34:56,ifname=tap0,script=no,downscript=no
and make sure that I have the tap0 device bridged using the tools in my distro.

Can you get by by forwarding some ports to the host? If so, check our guide about hostfwd rules.

Best,
Cat_7
Thanks - just before I had to head out yesterday afternoon (local time), I got it working. I'm now documenting it as part of my #MARCHintosh efforts, but I'm recreating it first as there were a lot of things tried and potential not-needed steps.

Appreciate all the help I've received here :)

Sean
Post Reply