Reading .ST floppy images on linux

A forum about Atari protected floppy disks analysis, preservation, emulation, tools

Moderators: DrCoolZic, Brume

scruss
Atarian
Atarian
Posts: 3
Joined: Fri Nov 22, 2013 1:35 am
Location: Toronto
Contact:

Reading .ST floppy images on linux

Postby scruss » Mon Nov 09, 2015 4:16 am

Hi - I'm trying to access and archive files from within .ST disk images stored on TOSEC: Atari ST. Although Hatari can read all of the disk images I've tried, I can't get reading and copying to work reliably with mtools.

Am I right in thinking that the .ST format is just a cylinder-by-cylinder dump of the disk image? If so, I'd expect the files to be either 368640 bytes (SS DD) or 737280 bytes (DS DD). But they're not all that size. Just in one folder, there are images of the following sizes:

  • 368640 bytes (Heads: 1 Cylinders: 80 Sectors: 9?)
  • 373248 bytes (Heads: 1 Cylinders: 81 Sectors: 9?)
  • 377856 bytes (Heads: 1 Cylinders: 82 Sectors: 9?)
  • 409600 bytes (Heads: 1 Cylinders: 80 Sectors: 10?)
  • 450560 bytes (Heads: 1 Cylinders: 80 Sectors: 11?)
  • 737280 bytes (Heads: 2 Cylinders: 80 Sectors: 9?)
  • 746496 bytes (Heads: 2 Cylinders: 81 Sectors: 9?)
  • 755712 bytes (Heads: 2 Cylinders: 82 Sectors: 9?)
  • 819200 bytes (Heads: 2 Cylinders: 80 Sectors: 10?)
  • 901120 bytes (Heads: 2 Cylinders: 80 Sectors: 11?)

Only some of the DS DD sized images are readable with mtools. Are there any mtools configs out there that could reliably read these images, please?

User avatar
leech
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Tue Dec 01, 2015 3:26 pm

Re: Reading .ST floppy images on linux

Postby leech » Thu Jun 23, 2016 4:33 am

You're over thinking this.

Code: Select all

username@localhost:~/Documents/Atari % sudo mount -o loop hddriver.st /mnt/
[sudo] password for username:
username@localhost:~/Documents/Atari 2s % ls /mnt                 
AUTO          CONTRIB  HDDRCONF.CPX  HDDRUTIL.INF  LIESMICH  XHDI
AUTOPARK.ACC  FIXES    HDDRUTIL.APP  ICONS.RSC     README    ZIPCTRL.CPX
username@localhost:~/Documents/Atari %                           


Granted, I think you have to have mtools installed. But yeah it's as simple as mounting the image with -o loop
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (fully upgraded (soon!))
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

Jeff_HxC2001
Captain Atari
Captain Atari
Posts: 309
Joined: Fri Sep 21, 2007 7:35 pm
Location: Paris - France
Contact:

Re: Reading .ST floppy images on linux

Postby Jeff_HxC2001 » Sun Jul 10, 2016 2:52 pm

You can also use the hxc software to browse ST/MSA/STX/Whatever images.
To build it for linux : https://sourceforge.net/projects/hxcfloppyemu/

scruss
Atarian
Atarian
Posts: 3
Joined: Fri Nov 22, 2013 1:35 am
Location: Toronto
Contact:

Re: Reading .ST floppy images on linux

Postby scruss » Sun Aug 14, 2016 6:13 pm

leech wrote:You're over thinking this.

But yeah it's as simple as mounting the image with -o loop


Okay then:

Code: Select all

$ sudo mount -t msdos -o loop,ro FaST_Club_Mono_Clip_Art_661.st /mnt/scratch/
mount: wrong fs type, bad option, bad superblock on /dev/loop1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.


Maybe you were under reading the question? This is not about simple HD images, it's about ST floppy images, in all their weird sizes.

The hxc software is a nice idea, thanks, but I need something from the command line. I have potentially hundreds of floppy images to convert.

User avatar
leech
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Tue Dec 01, 2015 3:26 pm

Re: Reading .ST floppy images on linux

Postby leech » Sun Aug 14, 2016 10:41 pm

Code: Select all

leech@localhost:~/Documents/Atari 1 % sudo mount -o loop Gauntlet.st /mnt/
[sudo] password for leech:
leech@localhost:~/Documents/Atari 2s % ls /mnt
AUTO          GAUNT_ED.PRG  LEVEL.DAT   MR_DEATH.SPR  TITLE.PI1
DEMON.SPR     GAUNT_ED.TXT  LEVEL.DIR   MUSIC.DAT     VALKYRIE.SPR
ELF.SPR       GHOST.SPR     LOBBER.SPR  RAND.BIN      WARRIOR.SPR
GAUNT_ED.DAT  GRUNT.SPR     MIDI.PRG    SORCERER.SPR  WIZARD.SPR
leech@localhost:~/Documents/Atari %


That's what I meant by over thinking it. On most modern Linux systems, it'll automatically figure out the file system for you. Granted this won't work with all of the disk images, since there are always those that don't have typical Atari TOS or msdos style formats.

Hmm, I'm guessing this image is one of those in the funky format.

Code: Select all

[64866.927738] FAT-fs (loop0): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
[65496.210161] FAT-fs (loop0): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (fully upgraded (soon!))
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

User avatar
leech
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Tue Dec 01, 2015 3:26 pm

Re: Reading .ST floppy images on linux

Postby leech » Sun Aug 14, 2016 10:59 pm

Interesting thing here as well. Another

Code: Select all

file AHDI.st
AHDI.st: DOS/MBR boot sector, code offset 0x30+2, sectors/cluster 2, root entries 112, sectors 1440 (volumes <=32 MB) , Media descriptor 0xf9, sectors/FAT 5, sectors/track 9, dos < 4.0 BootSector (0x0), FAT (12 bit by descriptor)

Code: Select all

disktype AHDI.st                                                   

--- AHDI.st
Regular file, size 720 KiB (737280 bytes)
FAT12 file system (hints score 3 of 5)
  Volume size 711 KiB (728064 bytes, 711 clusters of 1 KiB)



Code: Select all

file FaST\ Club\ Mono\ Clip\ Art\ 661\ \(19xx\)\(FaST\ Club\).st
FaST Club Mono Clip Art 661 (19xx)(FaST Club).st: data

Code: Select all

disktype FaST\ Club\ Mono\ Clip\ Art\ 661\ \(19xx\)\(FaST\ Club\).st

--- FaST Club Mono Clip Art 661 (19xx)(FaST Club).st
Regular file, size 720 KiB (737280 bytes)
FAT12 file system (hints score 1 of 5)
  Volume size 711 KiB (728064 bytes, 711 clusters of 1 KiB)
 

Hatari doesn't have a problem reading the disk.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (fully upgraded (soon!))
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

joska
Hardware Guru
Hardware Guru
Posts: 3684
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Reading .ST floppy images on linux

Postby joska » Mon Aug 15, 2016 7:10 am

leech wrote:That's what I meant by over thinking it. On most modern Linux systems, it'll automatically figure out the file system for you. Granted this won't work with all of the disk images, since there are always those that don't have typical Atari TOS or msdos style formats.


My experience is that Linux struggles with most floppy images (or real floppies for that matter) that are not straight DOS or TOS formatted. There's a lot of "strange" disks out there - coverdisks which are both single- and double-sided at the same time, PD library disks with "antivirus" bootsectors, lots of disks formatted with broken formatters...

I prefer to use Hatari to access disk images. If the OP needs to extract the files from a large number of floppies I suggest using a shell like Mupfel and write a simple script for it.
Jo Even

Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

User avatar
leech
Atari Super Hero
Atari Super Hero
Posts: 899
Joined: Tue Dec 01, 2015 3:26 pm

Re: Reading .ST floppy images on linux

Postby leech » Mon Aug 15, 2016 2:23 pm

Yeah, I think this is the case here. hatari sees the files just fine, and as shown, disktype even shows the same size of the .st image for one that works and the one in question that doesn't.

Also, I'm not seeing anywhere how to build the HxC tools for Linux. I ended up ordering two of them this week (one for my Falcon, and another for my Amiga 4000D, I'm getting tired of floppies just starting to error out on me for no reason).

Edit: nevermind, I see this post; viewtopic.php?f=99&t=29580 When I tried yesterday, I couldn't find the correct source tree/zip file.
Atari 8Bits: 800xl, 600xl, XEGS, 800, 130xe, 130xe (fully upgraded (soon!))
Atari STs: 1040STf (broken shifter), 1040STe, Mega STe, TT030, Falcon (CT60e, SuperVidel)

scruss
Atarian
Atarian
Posts: 3
Joined: Fri Nov 22, 2013 1:35 am
Location: Toronto
Contact:

Re: Reading .ST floppy images on linux

Postby scruss » Tue Aug 16, 2016 12:58 am

joska wrote:I prefer to use Hatari to access disk images. If the OP needs to extract the files from a large number of floppies I suggest using a shell like Mupfel and write a simple script for it.


Thanks; that looks a potentially useful path. I don't see a way to auto-mount different floppy images inside Hatari, or to quit the emulator from inside a script. I don't have time for pointing and clicking over hundreds of images, so I'll likely just give up on the project.

What I was planning to do:
  • For each disk image:
    • Start Hatari with the disk image mounted as A:
    • Auto-run a program to recursively copy all of A: to a folder on the virtual disk C:
    • Quit Hatari automatically once the copy was finished
    • From outside Hatari, modify the script/program that is auto-run to write to a different folder on C:


Social Media

     

Return to “Floppy Disk Preservation”

Who is online

Users browsing this forum: No registered users and 2 guests