{"id":16801,"date":"2021-07-01T10:18:20","date_gmt":"2021-07-01T14:18:20","guid":{"rendered":"https:\/\/scruss.com\/blog\/?p=16801"},"modified":"2021-07-14T13:02:43","modified_gmt":"2021-07-14T17:02:43","slug":"niche-68k-mac-emulation-needs","status":"publish","type":"post","link":"https:\/\/scruss.com\/blog\/2021\/07\/01\/niche-68k-mac-emulation-needs\/","title":{"rendered":"niche 68K Mac emulation needs"},"content":{"rendered":"\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"342\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72-screen.png\" alt=\"black and white screenshot of Macintosh System 7 desktop showing Disk First Aid icon\" class=\"wp-image-16802\" srcset=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72-screen.png 512w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72-screen-320x214.png 320w, https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72-screen-160x107.png 160w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><figcaption>&#8220;<em>It amazes me how you manage to live in anything that small<\/em>&#8220;: actual size Mac Classic II screenshot<\/figcaption><\/figure><\/div>\n\n\n\n<p>So I&#8217;m refurbishing the Mac Classic II I got in 2016 now that I&#8217;ve found that <a href=\"https:\/\/scsi.blue\/\">BlueSCSI<\/a> is a fairly cheap way of providing large replacement storage. The 40 MB (yes, 40 <span style=\"text-decoration: underline;\">M<\/span>B) drive from 1992 can finally be replaced.<\/p>\n\n\n\n<p>Hit a snag, though: DiskCopy won&#8217;t copy a disk with errors, which this drive seemed to have. DiskCopy also won&#8217;t repair the boot disk, so you have to find a bootable floppy or some other way to work around this limitation. The only readily available bootable disk image I could find was the System 7.1 Disk Tools floppy \u00e2\u20ac\u201d which reported no errors on my drive! Later versions of Disk First Aid would fix it, but weren&#8217;t provided on a bootable image.<\/p>\n\n\n\n<p>Here&#8217;s the 7.1 Disk Tools floppy with all of the apps replaced by Disk First Aid 7.2. Both of these were found on the Internet Archive&#8217;s <a href=\"https:\/\/archive.org\/details\/download.info.apple.com.2012.11\">download.info.apple.com<\/a> mirror and combined:<\/p>\n\n\n\n<div class=\"wp-block-file\"><a href=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72.zip\">Disk First Aid 7.2, bootable 1.44 MB floppy image<\/a><a href=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72.zip\" class=\"wp-block-file__button\" download>Download<\/a><\/div>\n\n\n\n<p>Disk duly repaired, DiskCopy was happy, backup complete. <em>Eventually<\/em>: the Classic II is not a fast machine at all.<\/p>\n\n\n\n<p>I love the old Mac icons, how they packed so much into so few pixels:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"136\" height=\"108\" src=\"https:\/\/scruss.com\/wordpress\/wp-content\/uploads\/2021\/07\/dfa72.png\" alt=\"enlarged icon: stylized ambulance with flashing light and driver, side is a floppy disk, there are motion lines at back and the whole icon is slanted to indicate speed\/rush\" class=\"wp-image-16805\"\/><figcaption>Disk First Aid icon<\/figcaption><\/figure><\/div>\n\n\n\n<p>It&#8217;s a stylized ambulance with flashing light and driver, the side is a floppy disk, it&#8217;s got motion lines and the whole icon is slanted to indicate speed\/rush. Nice!<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>Vaguely related: most old Mac software is stored as <em>Stuffit!<\/em> archives. These don&#8217;t really work too well on other systems, as they use a compression scheme all their own and are specialized to handle the forked filesystem that old Macs use. Most emulators won&#8217;t know what to do with them unless you jump through hoops in the transfer stage.<\/p>\n\n\n\n<p>Fortunately, the ancient Linux package <em>hfsutils<\/em> knows the ways of these hoops, if only you tell it when to jump. The script below takes a <em>Stuffit!<\/em> file as its sole argument, and creates a slightly larger HFS image containing the archive, with all the attributes set for <em>Stuffit! Expander<\/em> or what-have-you to unpack it.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#!\/bin\/bash\n# sitdsk - make an HFS image containing a properly typed sit file\n# requires hfsutils\n# scruss, 2021-07\n\nif\n    &#x5B; $# -ne 1 ]\nthen\n    echo Usage: $0 file.sit\n    exit 1\nfi\n\nbase=&quot;${1%.sit}&quot;\n# hformat won&#039;t touch anything smaller than 800 KB,\n#  so min image size will be 800 * 1.25 = 1000 KB\nsize=$(du -k &quot;$1&quot; | awk &#039;{print ($1 &gt;= 800)?$1:800}&#039;)\ndsk=&quot;${base}.dsk&quot;\ndd status=none of=&quot;$dsk&quot; if=\/dev\/zero bs=1K count=$((size * 125 \/ 100))\nhformat -l &quot;$base&quot; &quot;$dsk&quot;\n# note that hformat does an implicit &#039;hmount&#039;\nhcopy &quot;$1&quot; &#039;:&#039;\n# and hcopy silently changes underscores to spaces\nhattrib -t &#039;SIT!&#039; -c &#039;SITx&#039; &quot;:$(echo ${1} | tr &#039;_&#039; &#039; &#039;)&quot;\nhls -l\nhumount\n\n<\/pre><\/div>\n\n\n<p>What this does:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>creates a blank image file roughly 25% larger than the archive (or 1000 KB, whichever is the larger) using <strong>dd<\/strong>;<\/li><li>&#8216;formats&#8217; the image file with an HFS filesystem using <strong>hformat<\/strong>;<\/li><li>copies the archive to the image using <strong>hcopy<\/strong>;<\/li><li>attempts to set the file type and creator using <strong>hattrib<\/strong>;<\/li><li>lists the archive contents using <strong>hls<\/strong>;<\/li><li>disconnects\/unmounts the image from the hfsutils system using <strong>humount<\/strong>.<\/li><\/ol>\n\n\n\n<p>Notice I said it &#8220;attempts&#8221; to set the file type. hfsutils does some file renaming on the fly, and all I know about is that it changes underscores to spaces. So if there are other changes made by hfsutils, this step may fail. The package also gets really confused by images smaller than 800 KB, so small archives are rounded up in size to keep hformat happy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So I&#8217;m refurbishing the Mac Classic II I got in 2016 now that I&#8217;ve found that BlueSCSI is a fairly cheap way of providing large replacement storage. The 40 MB (yes, 40 MB) drive from 1992 can finally be replaced. Hit a snag, though: DiskCopy won&#8217;t copy a disk with errors, which this drive seemed [&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":"niche 68K Mac emulation needs: bootable System 7.2 Disk First Aid floppy, and Linux Stuffit! archive management","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7],"tags":[2055,3287,270,3024,531,3285,3286],"class_list":["post-16801","post","type-post","status-publish","format-standard","hentry","category-computers-suck","tag-emulation","tag-hfs","tag-linux","tag-macintosh","tag-repair","tag-scsi","tag-stuffit"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pQNZZ-4mZ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16801","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=16801"}],"version-history":[{"count":4,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16801\/revisions"}],"predecessor-version":[{"id":16831,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/posts\/16801\/revisions\/16831"}],"wp:attachment":[{"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/media?parent=16801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/categories?post=16801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scruss.com\/blog\/wp-json\/wp\/v2\/tags?post=16801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}