danm Posted July 30 Share Posted July 30 (edited) Last night I managed to successfully write a 820 Kb DD floppy disk under Linux for the first time. I was unable to find complete and working instructions for writing 800 or 820 Kb floppies under Linux and the ones on the Atari wiki were wrong so last night I rewrote the section for writing floppy disks under Linux. The old instructions used superformat but I was unable to get superformat to work at all under Debian. fdformat works fine for this purpose but annoyingly fdformat is no longer packaged by Debian and Ubuntu coz that 100 Kb program was just too much bloat to handle it seems? https://www.atari-wiki.com/index.php?title=Linux_Disk_Commands Edited July 30 by danm 1 Quote Link to comment Share on other sites More sharing options...
danm Posted July 30 Author Share Posted July 30 Apologies, I have announced this prematurely. The Atari wiki admins haven't approved my edits to that page yet but hopefully they will later today. Quote Link to comment Share on other sites More sharing options...
danm Posted July 30 Author Share Posted July 30 (edited) Here's the current version of the relevant bit: == Writing an image == Reading and writing 800 and 820 Kb .st disk images, as commonly used by games, under Linux requires an internal floppy disk drive, connected via a floppy disk controller. There are adapters such as the greaseweazle and the DrawBridge that allow you to read and write ST floppy disks via USB but they are not covered here. It's important to note this procedure only works with .st format disk images and not .stx, .msa or any other alternate ST disk image format and these instructions are for Debian Linux. The exact commands required may be slightly different for your Linux distro. I tested these commands under Debian 12 i386. Unfortunately, recent releases of both Debian and Ubuntu Linux no longer include '''fdformat''' in their util-linux package so your best bet is probably to build the [https://github.com/util-linux/util-linux util-linux tools] from source. After building util-linux, rather than doing a '''sudo make install''' just copy '''fdformat''' into your path eg '''/usr/local/sbin'''. First, we'll create the additional floppy devices required by running as root: /usr/sbin/MAKEFLOPPIES You can find out some information about the image with the following handy script. It reads details from the bootsector to identify the sides, sectors and tracks on the disk: #!/bin/sh od -v -Ad -t u1 -w1 $1 | awk 'NR==20 {sl=$2} NR==21 {sh=$2} NR==25 {spt=$2} NR==27 {s=$2; print "Sides: " s " Sectors: " spt " Tracks: " (sh * 256 + sl) / spt / s; exit}' Paste the script into a file '''imgstats''', then use the following command to make the file executable: chmod 700 imgstats You can then use the script to analyse a floppy disk image in .ST format: ./imgstats image.st Sides: 2 Sectors: 10 Tracks: 80 Refer to the [http://www.fifi.org/cgi-bin/info2www?(fdutils)geometry+list Geometry list] section of the '''fdutils''' documentation to see which floppy types match which disk size and format. Many game disks use disk geometry 13 which is a 820KB, 3.5" DD floppy disk. Geometry type 30 ( '''/dev/fd0_type30''') is used for 800 Kb disks. You must low-level format your disk before you can use dd to image it onto the disk. To format a 820 Kb floppy using an internal PC floppy disk drive, run: fdformat /dev/fd0_type13 Presuming that your disk formatted and passed verification OK and the write protection tab on the disk is off you can use '''dd''' to write the .st image onto your formatted disk by running: dd if=diskimage.st of=/dev/fd0_type13 Replace '''diskimage.st''' with the filename of the image you want to write to disk. Edited July 30 by danm Quote Link to comment Share on other sites More sharing options...
danm Posted July 30 Author Share Posted July 30 Presuming that the above text is approved, I will also need to rewrite the reading images section to use the correct device names, after running /usr/sbin/MAKEFLOPPIES if using Debian. Quote Link to comment Share on other sites More sharing options...
+DarkLord Posted July 30 Share Posted July 30 Are these reliable? Back in the day, I worked through a lot of formatters that gave extended ranges, 800k, 900k, and even one that claimed to be able to put close to a gig on one floppy (never could get that one to work). Problem was, for me at least, that all those extended floppy disks, beyond the stock 720k, failed at a much higher rate than the standard 720k. Just curious, thanks. Quote Link to comment Share on other sites More sharing options...
danm Posted July 30 Author Share Posted July 30 (edited) 4 hours ago, DarkLord said: Are these reliable? Back in the day, I worked through a lot of formatters that gave extended ranges, 800k, 900k, and even one that claimed to be able to put close to a gig on one floppy (never could get that one to work). Problem was, for me at least, that all those extended floppy disks, beyond the stock 720k, failed at a much higher rate than the standard 720k. Just curious, thanks. I can't really comment beyond saying that I am able to successfully format and copy images to my Atari DD disks for 720, 800 and 820 Kb disks. I've got a few other brand floppies but they're for the trash because they're clearly past it. fdformat has successfully formatted my "new" floppies every time so far except for when I attempted to format a disk as 830 Kb. That failed and my floppy drive made some rather unpleasant noises before it fdormat errored so I wouldn't recommend anyone else try the 830 Kb geometry. Edited July 30 by danm Quote Link to comment Share on other sites More sharing options...
danm Posted July 30 Author Share Posted July 30 (edited) My image writing guide has been approved fir the wiki now https://www.atari-wiki.com/index.php?title=Linux_Disk_Commands#Writing_an_image I have updated the rest of the page now to fix a couple of things. Those tweaks are awaiting approval now. Edited July 30 by danm Quote Link to comment Share on other sites More sharing options...
ijor Posted July 31 Share Posted July 31 On 7/30/2024 at 12:27 PM, DarkLord said: Are these reliable? Back in the day, I worked through a lot of formatters that gave extended ranges, 800k, 900k, and even one that claimed to be able to put close to a gig on one floppy (never could get that one to work). Problem was, for me at least, that all those extended floppy disks, beyond the stock 720k, failed at a much higher rate than the standard 720k. 800K, which is 10 sectors x 80 tracks x 2 sides, should be reliable. There is no reason for this geometry to be less reliable than 720K, and it was used extensively in original disks. Anything above that is problematic, in the best case, and should be avoided unless you have no other choice. Quote Link to comment Share on other sites More sharing options...
+DarkLord Posted July 31 Share Posted July 31 Okay, thanks. Quote Link to comment Share on other sites More sharing options...
danm Posted August 4 Author Share Posted August 4 (edited) The Linux disk commands wiki page has been updated to fix the setfdprm command, cover getfdprm and adds a note about 820 Kb disk compatibility. Edited August 4 by danm Quote Link to comment Share on other sites More sharing options...
danm Posted August 17 Author Share Posted August 17 I feel the need to confess that I actually updated the Linux disk commands wiki page whilst my ST was being recapped but since getting it back I have verified that the 820 kb, 800 kb and 740 kb .st disk images that I wrote using dd under Debian do in fact all run fine on my real STFM. I knew dd wasn't lying to me. I have updated the Linux disk commands wiki page again this morning with a few smalls tweaks and additions. I think I'm done here now. Quote Link to comment Share on other sites More sharing options...
danm Posted August 18 Author Share Posted August 18 (edited) I successfully wrote and tested a 830 Kb ST floppy disk - Gauntlet II - using good ol' dd under Debian today. With 830+ Kb .st disk images, you just have to format the disk first with fdformat /dev/fd0_type13 Then write the image with: dd if=image.st of=/dev/fd0 Geometry type13 is for 82 track, 820 Kb disks but it also works for 83/84 track and 830 Kb images, if your drive can format geometry type 13 disks. I have updated the Linux disk commands wiki page appropriately, its just waiting approval. Edited August 18 by danm Quote Link to comment Share on other sites More sharing options...
danm Posted September 6 Author Share Posted September 6 I updated the Linux Disk Commands wiki page yesterday to cover formatting images for single sided disks and added a link to an Atari hard disk image mounting script. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.