{"id":17978,"date":"2025-10-21T21:45:51","date_gmt":"2025-10-22T01:45:51","guid":{"rendered":"https:\/\/scruss.com\/blog\/?p=17978"},"modified":"2025-12-13T19:54:54","modified_gmt":"2025-12-14T00:54:54","slug":"reading-atari-st-floppy-images-on-linux","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2025\/10\/21\/reading-atari-st-floppy-images-on-linux\/","title":{"rendered":"Reading Atari ST floppy images on linux"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Atari ST disks were <em>weird<\/em>. Although they were nominally FAT format 3\u00bd\u2033 double density disks, they wouldn&#8217;t read on a PC. You could format a disk on a PC, however, and the Atari would read\/write it just fine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I had a (virtual) stack of roughly 170 Atari ST disk images that I wanted to access from Linux. <em>mtools<\/em>, the FAT image reading suite for Linux, could only read 4 of the disks. It didn&#8217;t help that some of the images had 82 tracks, or 11 sectors per track, where 80 tracks and 9 sectors per track were standard. I knew that the <a href=\"https:\/\/www.hatari-emu.org\/\">Hatari<\/a> emulator could read the images, but the ST&#8217;s graphical interface made automation difficult.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I <a href=\"https:\/\/www.atari-forum.com\/viewtopic.php?t=28804\">sought help years ago<\/a>, but that didn&#8217;t come to much. I tried again the other day: hatari&#8217;s <em>hatari-prg-args<\/em> combined with the <a href=\"https:\/\/github.com\/simonlaszcz\/gulam\" target=\"_blank\" rel=\"noreferrer noopener\">gulam<\/a> shell made it work.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You&#8217;ll probably need <a href=\"https:\/\/emutos.sourceforge.io\/download.html\">EmuTOS<\/a> so that Hatari can emulate hard drives. I used the current <code>etos512us.img<\/code> ROM image throughout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, I made a folder structure for the emulated hard disk:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gemdos<br>\u251c\u2500\u2500 AUTO<br>\u251c\u2500\u2500 bclip<br>\u251c\u2500\u2500 gulam.g<br>\u251c\u2500\u2500 gulam.hlp<br>\u2514\u2500\u2500 gulam.ttp<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>bclip<\/em> is the destination folder. For each disk image, I modified the <em>c:\\gulam.g<\/em> startup file to read something like:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir c:\\bclip\\m668<br>cp +t -r a:\\* c:\\bclip\\m668<br>exit<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">that is: make a new folder for the disk image, then copy all the files recursively (keeping original timestamp, with the &#8216;+t&#8217; option) there.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here&#8217;s the shortest working command line that will copy the files then exit the emulator:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">hatari-prg-args -q --harddrive gemdos --sound off --disk-a FaST_Club_Mono_Clip_Art_668.st -- gemdos\/gulam.ttp \"exit\"<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re transferring a lot of disk images, you probably want to add some speed-up options to the Hatari command line. For my batch conversion job, I added:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">--fast-forward 1 --cpuclock 32 --fast-boot 1 --fastfdc 1 --protect-floppy on<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The whole disk contents are now in the gemdos\/bclip folder:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">gemdos\/bclip<br>\u2514\u2500\u2500 m668<br>    \u251c\u2500\u2500 bin.img<br>    \u251c\u2500\u2500 books.img<br>    \u251c\u2500\u2500 bowl.img<br>    \u2502        ... <br>    \u251c\u2500\u2500 clothing.017<br>    \u2502   \u251c\u2500\u2500 babyshoe.img<br>    \u2502   \u251c\u2500\u2500 blouse.img<br>    \u2502   \u251c\u2500\u2500 boot.img<br>    \u2502        ... <br>     etc.<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This process allowed me to batch-convert most of FaST Club&#8217;s Mono Clip Art collection and put it up on the Internet Archive in a readable format: <a href=\"https:\/\/archive.org\/details\/FaST_Club-Mono_Clip_Art_Selection\/\" target=\"_blank\" rel=\"noreferrer noopener\">FaST Club Mono Clip Art Selection<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Update \u2026<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I now have an Atari ST, and something very odd happened: I can read (real) Atari ST disk images just file with <em>mtools<\/em>. Here&#8217;s one to play with:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-cd548d19-a628-48ce-9cd5-51ede08e2daa\" href=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/10\/formatted_st.zip\">formatted_st<\/a><a href=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2025\/10\/formatted_st.zip\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-cd548d19-a628-48ce-9cd5-51ede08e2daa\">Download<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Atari ST disks were weird. Although they were nominally FAT format 3\u00bd\u2033 double density disks, they wouldn&#8217;t read on a PC. You could format a disk on a PC, however, and the Atari would read\/write it just fine. I had a (virtual) stack of roughly 170 Atari ST disk images that I wanted to access [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"Atari ST disks were weird. Although they were nominally FAT format 3\u00bd? double density disks, they wouldn\u2019t read on a PC. hatari-prg-args and the gulam shell made it possible to transfer image content to Linux.\n\n#AtariST #Linux #floppy #RetroComputing","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2745,730,270,2556],"class_list":["post-17978","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-atari","tag-floppy","tag-linux","tag-retrocomputing"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-4FY","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/17978","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/comments?post=17978"}],"version-history":[{"count":6,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/17978\/revisions"}],"predecessor-version":[{"id":18019,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/17978\/revisions\/18019"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=17978"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=17978"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=17978"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}