Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batch copy all files from 3.5″ Mac floppy disks with creation dates? #756

Open
wilhelmloof opened this issue Jun 11, 2024 · 8 comments
Open

Comments

@wilhelmloof
Copy link

My goal is not to create disk-image files, but to copy all files (preferably with original dates) from old Mac 3.5″ floppy disks.

FluxEngine "Read disk" was able to read and save disk-images as dsk-files. But I can't find any util that can mount or extract the files from the dsk-files. How can the individual files be extracted from dsk-image files?

"Browse files"/direct access worked with format "mac" and the options: "800kb 80-track DSDD" selected and "read/write 524 byte sectors" unselected.
From there I was able to save files one by one, unfortunately without original creation dates. Can all files be batch copied using the terminal? If so, what would a correct command look like?

When is the setting "read/write 524 byte sectors" useful?

Hardware
Greaseweazle v4.1
Mitsumi D359M3 (33 pins) and Samsung SFD-321B (22 pins)
Twisted floppy cable

@davidgiven
Copy link
Owner

You can do it from the command line, but you'll need some scripting. If you do fluxengine ls mac --800 -i image.dsk you'll get a list of files. You can add -p path to list a particular directory (using / as the separator). Then using getfile -p <path> -l <localfile> will copy the files off one at a time. Wildcards and recursion would be a useful thing to have but it's not supported yet. getfileinfo will let you see the creation dates and the standard Unix command touch -t will let you set them.

Creation dates aren't set mostly because nobody's asked for it yet. Not all filesystems have them, unfortunately, and they're also frequently wrong, but again, it'd be useful to have.

The 524 byte sectors thing is because MacOS reserves some extra space per sector for filesystem use, and this option returns the extra data as well. Except the standard MacOS filesystem doesn't use it! The FluxEngine filesystem plugin is supposed to work with it either enabled or disabled but that's clearly not working.

@wilhelmloof
Copy link
Author

wilhelmloof commented Jun 12, 2024

Thanks for your quick reply!

I will try the command line. Nifty that FluxEngine can list its own disk image files. Working with disk image files is much more convenient than accessing old floppy drives.
In what format are the FluxEngine disk image files stored? Non of the utils I tried could handle them. I tested: macOS Disk Utility 18.0 (on macOS 10.14.6, Mojave), hfsutils 3.2.6 (via homebrew), The Unarchiver 4.3.8, BetterZip 5.1.1, Disk Copy (using SheepShaver with MacOS 9), HFSExplorer 2021.10.9 (Windows) and Disk-Manager 0.17 beta (Windows). Is there any other program that can handle FluxEngine's dsk-files? It would be handy if FluxEngine also could write disk image files that can be read by modern macOS Disk Utility, like dmg or iso formats.

Yes, adding support for wildcards, recursion and original creation date would be highly appreciated.

If those features would be added, it would also be useful if FluxEngine could handle filenames on original media that is stored in obsolete character encodings and convert the names to UTF-8 when copying files. I am no expert on old Macs, did Apple use Mac OS Roman for most western countries? I my case the filenames contains Swedish characters (ÅåÄäÖö) and probably some other diacritics and they are not shown correctly in the current version of FluxEngine.

@davidgiven
Copy link
Owner

FluxEngine supports a bunch of disk image formats --- it uses the extension to determine which one. See the 'Image sources and destinations' section here for a list: http://cowlark.com/fluxengine/doc/using.html

Character encoding would be a useful feature, actually, and pretty easy to do. I'll take a look.

@wilhelmloof
Copy link
Author

It's probably a better strategy to first create image files and then extract/copy desired files.

It would be handy if the GUI version also could write img-files, "Read disk" > "Save decoded image" creates a dsk-file.

I got an error trying to list the dsk-file in terminal:

C:\Program Files (x86)\Cowlark Technologies\FluxEngine>fluxengine ls mac --800 -i "C:\Users\w\Desktop\KS Mac disk\mac-test.dsk"
      OPTION: 800kB 80-track DSDD
      IMG: read 80 tracks, 2 sides, 800 kB total from C:\Users\w\Desktop\KS Mac disk\mac-test.dsk
  1.System              403286
  "File 1"      6796
  File2                16428
  File3        17196
terminate called after throwing an instance of 'std::runtime_error'
  what():  invalid utf8

@davidgiven
Copy link
Owner

Regarding writing img files: if you just change the filename to something.img, it'll work fine...

Re the filename: that's interesting. The high-bit characters in the Mac filename are clearly being parsed as UTF-8. I never actually put any character encoding stuff in there, so this must be happening automatically somewhere.

@wilhelmloof
Copy link
Author

Changing the suffix to img did unfortunately not solve it. MacOS shows a warning after double clicking the img-file: "Legacy image should be converted". The image file from FluxEngine is 410k and the working img-file from gw is 819k.

@davidgiven
Copy link
Owner

If the output image is 400kB, that suggests that the 800kB format option hasn't been set (although it should be the default).

@thorsted
Copy link

thorsted commented Sep 9, 2024

Thanks for your quick reply!

I will try the command line. Nifty that FluxEngine can list its own disk image files. Working with disk image files is much more convenient than accessing old floppy drives. In what format are the FluxEngine disk image files stored? Non of the utils I tried could handle them. I tested: macOS Disk Utility 18.0 (on macOS 10.14.6, Mojave), hfsutils 3.2.6 (via homebrew), The Unarchiver 4.3.8, BetterZip 5.1.1, Disk Copy (using SheepShaver with MacOS 9), HFSExplorer 2021.10.9 (Windows) and Disk-Manager 0.17 beta (Windows). Is there any other program that can handle FluxEngine's dsk-files? It would be handy if FluxEngine also could write disk image files that can be read by modern macOS Disk Utility, like dmg or iso formats.

Yes, adding support for wildcards, recursion and original creation date would be highly appreciated.

If those features would be added, it would also be useful if FluxEngine could handle filenames on original media that is stored in obsolete character encodings and convert the names to UTF-8 when copying files. I am no expert on old Macs, did Apple use Mac OS Roman for most western countries? I my case the filenames contains Swedish characters (ÅåÄäÖö) and probably some other diacritics and they are not shown correctly in the current version of FluxEngine.

You should also try the Applesauce software. It can extract all files with creation dates. It can also read greaseweazle flux streams. Adding extraction of all files with original dates and a report of MD5/SHA1 would be a great addition to the fluxengine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants