Does QEMU support hfs floppy disk images?

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
marbre
Inquisitive Elf
Posts: 33
Joined: Fri Aug 12, 2022 10:16 pm

Does QEMU support hfs floppy disk images?

Post by marbre »

I have some 800k and 1.44k hfs floppy images that qemu will not mount, e.g.

Code: Select all

./qemu-img info Tesserae.img 
image: Tesserae.img
file format: raw
virtual size: 780 KiB (798720 bytes)
disk size: 784 KiB
The monitor command 'change floppy0 /path/to/Tesserae.img' will load it, however it doesn't appear on the desktop.
User avatar
adespoton
Forum All-Star
Posts: 4273
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Does QEMU support hfs floppy disk images?

Post by adespoton »

Floppy images are supported, but it has to be a real image, not just an 800k or 1.44MB partition image.

So DiskCopy 4.2 images should work; BII-created images likely won't.
w16r
Space Cadet
Posts: 1
Joined: Thu Dec 14, 2023 6:38 am

Re: Does QEMU support hfs floppy disk images?

Post by w16r »

Unless I’ve missed something obvious, I don’t think QEMU (as of 8.2.0-rc4) emulates a Macintosh floppy drive at all. As a result, it can’t present a floppy disk image—regardless of the image file format—in a way that would work with the Macintosh system software.

From the QEMU source code and commit history for hw/block/swim.c, it appears that the SWIM floppy disk controller implementation is still just a stub: it can satisfy the guest operating system that a controller is present, with no attached drive, but I don’t see any logic for reading or writing data. The Cocoa user interface does have “Change floppy0” and “Eject floppy0” items in the Machine menu, but floppy0 doesn’t seem to be connected to anything, unlike mtd0, hd1, and cd1 (in a typical configuration), for which the output of the “info block” command in the QEMU monitor includes “Attached to” messages showing connections to emulated devices in the QOM tree.

Running qemu-system-m68k in macOS” mentions an A/UX boot floppy image, but it’s used with an emulated hard disk, and that’s a very special case. Ordinary Macintosh-formatted floppy disks don’t have a partition map, just a single HFS or MFS volume, and if a floppy disk image is presented as though it were a SCSI hard disk, the Macintosh system software ignores it, at least until you initialize the tiny “hard disk” with Apple HD SC Setup, which destroys any existing file system.
User avatar
Cat_7
Expert User
Posts: 6170
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Does QEMU support hfs floppy disk images?

Post by Cat_7 »

Indeed, Qemu does not support Mac floppy images.
That is why I created the small hard disk image with floppy content to be able to boot to the A/UX installer.

Best,
Cat_7
Post Reply