I figured both out.
The first problem is that hfdisk has no way of knowing the length of the SCSI driver you're later going to add (following the 'from scratch' directions linked above). It's at offset 0x17 at the start of the VHD (in block 0 of the partition map) and defaults to the driver partition size (32 or 0x20) in blocks, which is wrong and will cause the Mac ROM to try to read more driver than is actually there (and subsequently lock up/crash spectacularly). The fix requires knowing the proper length of whatever SCSI driver you're using in 512-byte blocks (if it's lido, it's 18, or 0x12) in hex. Place that value at offset 0x17 of your file just after step 3 in the 'from scratch' instructions and then continue and you'll be golden. If you're using a driver other than lido, you're on your own, but presumably if you're that far off the reservation you're either also knowledgeable enough about low-level partition map constructs that you knew all this already or you're using a proper set of tools on a real Mac.
tl;dr If you're creating a VHD from scratch following the instructions here:
http://www.codesrc.com/mediawiki/index. ... romScratch
between steps 3 and 4, do this:
Code: Select all
echo -n -e \\x12 | dd of=disk.img bs=1 seek=23 conv=notrunc
and it will fix things right up for you.
The one nice thing about following this method is that if you chop the first 49152 bytes off the front of the file (after you've formatted it on the Mac and actually done something useful with it, of course!):
Code: Select all
dd bs=512 count=96 if=disk.img of=partition_map
and pull out the rest of the file:
Code: Select all
dd bs=512 skip=96 if=disk.img of=disk1.dsk
the resulting disk1.dsk can be used directly in Mini vMac, and can be reassembled later for use with the MiSTer MacPlus core like so:
Code: Select all
cat partition_map disk1.dsk > disk.img
Naturally, all of this assumes availability (and some knowledge of) Linux...but with WSL2 for Windows, installing Linux is really quite straightforward (I recommend Ubuntu for simplicity, but that's just me) and is an excellent excuse for finally learning a bit of Linux command line.
The "related note" (two VHDs at once) was made obvious by reading the github commits, namely this one:
https://github.com/MiSTer-devel/MacPlus ... 312702477e
which removed the functionality but not the menu item. D'oh!