Guides:MAME - floptool

From Wah!ki
Revision as of 10:05, 22 March 2022 by Sairuk (talk | contribs) (Created page with "= 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 co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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


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