Compact XVI Users: how to format & writting disk images under Linux

Started by e1000, September 24, 2015, 12:12:54 PM

Previous topic - Next topic

e1000

Hi folks,

I would just like to share with you a method to use Linux to format & write XF disk images into 3.5" floppy disks for X68 Compact.

First of all, consider I have a Ubuntu 3.5.0-49 installed in a Virtual Machine. It could be a real machine, of course, however this shows that Linux under VMs could also be used.

Second, I'm using a USB floppy drive as recommended in wiki: Sony Vaio PCGA-UFD5
http://www.gamesx.com/wiki/doku.php?id=x68000:writing_3.5_floppies.

Third, USB floppies can be formatted using a blessed tool called ufiformat
http://manpages.ubuntu.com/manpages/trusty/man8/ufiformat.8.html

Get that for your Linux, now!  ;)

Ok, here's the how to:

#1- Connect the floppy drive into the USB
No mistery here

#2- If using Linux under a VM, connect the USB drive from the Host machine
(Check your VM instructions for that)

#3- Insert any valid floppy into the drive
Linux will try to mount it. If successful it might show a file manager window. Dismiss that window.

#4- Check on which device your drive is mounted on
At command line use "mount":


defaultuser@ubuntu:~$ mount
/dev/sda2 on / type ext3 (rw,errors=remount-ro)
............ // lots of stuff
/dev/sdc on /media/defaultuser/48A6-7CC9 type vfat (rw,nosuid,nodev,uid=1001,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)


On the example above, my floppy drive was located at device /dev/sdc.

I know that because the floppy was MS-DOS formatted (vfat) under volume label 48A6-7CC9.

#5- Unmount the floppy
sudo umount /media/defaultuser/48A6-7CC9

#6- Check your floppy drive info
Use ufiformat:

defaultuser@ubuntu:~$ sudo modprobe sg
defaultuser@ubuntu:~$ sudo ufiformat -i /dev/sdc
vendor:  Y-E DATA
product: USB-FDU
write protect: off
media type: 2HD
status      block size   kb
formatted    2880  512 1440
formattable  2880  512 1440
formattable  1232 1024 1232
formattable  2400  512 1200


Please note the "sudo modprobe sg" command, this adds a SCSI pass-thru device driver "on the fly".

The format we want for 3.5" floppies is highlighted above: 1232 1024 1232

#7- Format the floppy
Ok, that's the great proof everything is fine.

Use ufiformat as this:

defaultuser@ubuntu:~$ sudo ufiformat -f 1232 /dev/sdc
geometry: track=77, head=2, sector=8, block=1024
done   
                               

#8- Write the image
Ok, now the for the final move, use the mighty dd tool.

I wrote a memtest68k disk into /dev/sdc as follows:

defaultuser@ubuntu:~$ sudo dd if=memtest68k.xdf of=/dev/sdc
2464+0 registros de entrada
2464+0 registros de saĆ­da
1261568 bytes (1,3 MB) copiados, 110,477 s, 11,4 kB/s


Ok, great news is that everything was successful!

Now remove the floppy and test it in your XVI Compact...




I hope that to be useful. Thanks for reading all this.

Also keep in mind that all this was possible due to the information already available on wiki, and to these great open source tools that we have nowadays.

Thanks to all people who spent hours developing such nice tools.

Regards!


costa

Nice one e1000... this is for people averse to Windows!

I do it on my Mac, running (sic) Windows XP under VirtualBox.
:-[

famiac

Wow thanks for the tutorial! I'm sure this will prove useful. I'll probably be migrating to linux. First Ubuntu then maybe Arch. haha