nfg.forums

NFG Forums => SIG X68000 => Topic started by: neko68k on August 08, 2016, 04:51:37 AM

Title: Mounting an XDF in *nix
Post by: neko68k on August 08, 2016, 04:51:37 AM
It is possible to mount XDF images in linux, etc. by patching the first byte of the file from 0x60 to 0xEB.

Something like this should work in recent Ubuntu style systems. This assumes a directory in CWD called xdf exists. Change diskimage.xdf accordingly. Make sure your image is actually an XDF and not a DIM. This technique does not work with DIM images.


Patch and mount:
#printf '\xEB' | dd conv=notrunc of=diskimage.xdf bs=1 seek=0
#losetup /dev/loop0 diskimage.xdf;\
#mount /dev/loop0 ./xdf -t msdos -o "fat=12"


When you're done:
#umount ./xdf
#losetup -d /dev/loop0
#printf '\x60' | dd conv=notrunc of=diskimage.xdf bs=1 seek=0


Change filesystem label:
#dosfslabel /dev/loop0 "LABEL      "
Title: Re: Mounting an XDF in *nix
Post by: famiac on August 22, 2016, 06:07:37 AM
Wow that's actually pretty cool. So would you do this mainly for file transfers?
Title: Re: Mounting an XDF in *nix
Post by: neko68k on August 23, 2016, 09:21:50 AM
I guess you could. I was using it to build some disk images for a project. I wanted something that'd work in a Makefile.