Difference between revisions of "Guides:MAME - floptool"
Jump to navigation
Jump to search
Line 31: | Line 31: | ||
</nowiki> | </nowiki> | ||
''' | ''' | ||
− | + | -C creates the given file device as a file on the filesystem | |
=== Mounting === | === Mounting === |
Revision as of 10:06, 22 March 2022
floptool
Introduction
An oddly named tool that can be built with MAME for managing/identifying multiple types of floppy/hard disk images
This doco will end up covering floppy images in general in some capcity since I need to learn more about them
Creating
floptool
Theoretically i believe this should create a 3.5" double density disk image for pc but MAME 0.241 threw a segfault
floptool flopcreate pc u35dsdd sb16.img
Linux
Using mkfs to make a basic image
#!/bin/bash set +u DESTIMG=${1:-/tmp/floptmp.img} DESTSZE=${2:-1440} mkfs.msdos -C "$DESTIMG" $DESTSZE
-C creates the given file device as a file on the filesystem
Mounting
Linux
As a loopback device
#!/bin/bash set +u set +x DEVIMG=${1:-/tmp/floptmp.img} DEVMNT=${2:-/mnt/mame-media/mount-floppy/} [ ! -d $DEVMNT ] && echo "Cannot find $DEVMNT" && exit sudo umount $DEVMNT sleep 1 sudo mount -o loop $DEVIMG $DEVMNT