Extracting Stuffit 5 files with The Unarchiver

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Extracting Stuffit 5 files with The Unarchiver

Post by Jorpho »

A new version of The Unarchiver for Windows just came out.
http://code.google.com/p/theunarchiver/

This version fixes a bug that prevented resource fork extraction from working properly in Windows. It opens up the very intriguing possibility of providing an easy way of extracting Stuffit 5 files without requiring SheepShaver! The Unarchiver doesn't support MacBinary, but in theory, all you would have to do is extract the .sit with The Unarchiver, and then use HFV Explorer to copy the files over to your favorite HFV disk image.

The catch is that HFV Explorer's support of AppleDouble is a bit kludgy, and was only intended to work with Executor, as per the archived documentation. Here's what you need to do:
  • Extract your Stuffit file using "unar -k hidden [whatever].sit".
    For files with resource forks, this will create a file starting with an underscore and a period: "_."
  • Rename each of the files starting with "_." so that they start with "%" instead. This is Executor's standard.
  • HFV Explorer won't recognize a resource fork unless it has a data fork. So, for each file that now starts with %, create an empty file with the same name without the %, unless there's a file with that name already.
    In Windows, an easy way to do this is to right-click in explorer and select New->Text Document.
If you subsequently use HFV Explorer to browse to the folder to which you extracted your files, you should see it neatly laid out exactly like it would appear in the Finder, ready for copying.

Pretty cool, huh? If you think this is useful, I can try to write it up with some nice pictures. I'm not sure if AppleDouble is supposed to always have an empty file for the data fork – maybe someone could check? The official documentation doesn't specify, but there's a Linux utility included with Netatalk for converting MacBinary to AppleDouble that could be used for testing.
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: Extracting Stuffit 5 files with The Unarchiver

Post by ClockWise »

I think people might be interested in a write-up of that procedure. We could include it in the wiki, with images and downloads.
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Jorpho »

The hour is at hand! Version 1.2 of The Unarchiver for Windows has now been released, and you may never need to run Stuffit Expander ever again. I would have been in ecstasy if I found this fifteen years ago. :wink:

Simply go to the Windows command line and type "unar -k hfv [archive name]" and you'll get a convenient folder with everything neatly arranged for copying with HFV Explorer. The Unarchiver supports a whole bunch of old Macintosh formats, so this should work with all flavors of Stuffit and perhaps everything else that might be out there.

Here's what it looks like on the command line. In this case, I've copied rescue2.0.5.sit to the folder where I unzipped unar1.2_win.zip from the aforementioned link.
Image

Here's what it looks like in Windows Explorer. Notice that there are four files that start with % and four corresponding files that do not, including a zero-byte file corresponding to the empty data fork of the main Rescue! 2.0.5 application.
Image

And here's what the same folder looks like in HFV Explorer.
Image

Executor will do the trick as well. (I understand that Executor actually came up with the naming convention first, and HFV Explorer adopted it.)
Image
Last edited by ClockWise on Mon Sep 07, 2020 9:15 am, edited 1 time in total.
Reason: secure link test
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Cat_7 »

Great find! Thanks Jorpho.

And I finally understood the point you were trying to make :oops:

Best,
Cat_7
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: Extracting Stuffit 5 files with The Unarchiver

Post by ClockWise »

That's great, Jorpho. I'll add a little page to the wiki so the instructions might be a bit easier to find.
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: Extracting Stuffit 5 files with The Unarchiver

Post by ClockWise »

Tada!

http://www.emaculation.com/doku.php/ext ... in_windows

Tell me what you think. Changes will be made if you request 'em!
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Jorpho »

Looks good, thanks! But I suggest you host the images locally, lest something befall my DropBox.
User avatar
ClockWise
Site Admin
Posts: 4397
Joined: Mon May 20, 2002 4:37 am
Location: Uiwang

Re: Extracting Stuffit 5 files with The Unarchiver

Post by ClockWise »

They already are hosted locally. No worries!
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

Hey folks,

I just stumbled across this last night, amazed to see that the posts were so recent ... for months now I've had a bit of an ongoing project, trying to copy files from Macintosh Garden via one of the internet-capable devices in my house (all of which are running Win7 or Ubuntu) to a Mac Plus I keep in the closet.

I've actually gotten really really far along -- I have a 80mb SCSI hard drive for the Mac, and a PCI SCSI card that miraculously has Win7 x64 drivers. Using MacDrive, I can actually mount the disk in Windows and copy files to and from it (using regular explorer or HFVexplorer), but I'm having the usual trouble with resource forks breaking.

If I had StuffIt on the Mac already, this wouldn't be a problem, as I can just copy over everything as .sit archives, but I don't, and I've been running up against a wall trying to get it on there (the hard drive currently has a barebones System 6 version on it, and boots fine). I was hoping this solution would work, and lo and behold, HFVexplorer loaded the valid program icons of the doubled binaries the same way it did in Jorpho's post and allowed me to copy them to the SCSI drive, but when I checked in explorer (and on the Mac itself, after disconnecting the hard drive from the PC), it still had separate copies of each fork -- one with % and one without.

I'm assuming this is something weird to do with the MacDrive layer -- ordinarily, when I'm looking at files that have both a resource and a data fork through MacDrive, they show up as having a filesize of 0 bytes in Windows, whereas the ones I moved using HFVexplorer were as though I'd just c/p'ed them using explorer -- 1:1.

Any brilliant ideas appreciated!

There's Technet documentation on a Windows command called macfile that seems to be able to do this, but it's Windows Server only... http://technet.microsoft.com/en-us/libr ... 90929.aspx

I do have a free Windows Server 2008 R2 serial kicking around from when I was in grad school and Microsoft gave them out for free, so I'm going to grab that and stick it in a VM just to try this. I think that's my last lead for the time being :)
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Jorpho »

I don't think HFV Explorer can access HFV volumes on SCSI drives directly, and if HFV Explorer can't mount your disk as an HFV volume, it won't help you at all. There might be some roundabout way of creating an HFV image file from your SCSI drive, copying files to it, and then writing the image back, but I have no idea, as I had never heard of MacDrive until now and have no idea how it works.

A bit of Googling suggests that MacDrive stores resource fork data in .RSF files. Is there any information in the documentation? If you use MacDrive to copy a file from your Macintosh disk to your Windows hard drive, does it create a .RSF file?

If it uses AppleDouble for storing .RSF files, then it's a trivial matter of using a different naming scheme. If it uses its own format, then minor surgery will probably be necessary.
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

I'd already tried creating an image from the drive and writing it back, but unfortunately HFVexplorer appears to be hardcoded to only want to do this with floppies, not hard drives (I tried hex editing the drive letters in the HFVexplorer exe but I think that only changed the GUI).

Unfortunately, copying a file that contains a resource fork from MacDrive using windows Explorer just gives me another 1:1 copy showing a 0 byte file. MacDrive's documentation seems to be lacking (the "forum" link on their website gives a bad gateway error), so I'm a little stuck there.

Getting RPC errors from trying to use that Windows Server call, and I don't have the know-how to troubleshoot that. Hm....
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Cat_7 »

Hi,

Does your SCSI controller also work in Ubuntu? If, so you can use your SCSI drive directly with SheepShaver/Basilisk in Linux. I once used a setup like that with a HFS formatted partition on a Linux disk.
You can then use the internet connection from within SheepShaver/Basilisk to download the files you are looking for, without the intermediate Windows/Linux step.

Best,
Cat_7
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

Whoa, awesome! I hadn't even thought of that. My Ubuntu machine is a miniITX box, though (only a PCI-E slot, no regular PCI), and I can't even remember where I found the Win7 x64 driver for the SCSI controller, so I'd rather not go through that headache when I can just run Basilisk in Windows.

Unfortunately, the option to mount local drives in Basilisk doesn't seem to be working ... is there some kind of size limit there? I have both a 6.0.8 image and a 7.0.1 image. Never tried to run anything post-68k in an emulator.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Cat_7 »

Old Basilisk 142 supports SCSI, I recently connected two SCSI CD roms to it to read Mac CD-roms. I do not know whether it would support hard disks, assuming they need to be seen by windows first. I might try some day...

Best,
Cat_7
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Extracting Stuffit 5 files with The Unarchiver

Post by 24bit »

Hm, another off topic posting, but SCSI HDDs do work with BII/142 if your HBA is properly installed in Windows.
Its rather easy to mess things up in the BII GUI. As a HFS disk wont mount on the host, they should be selected as SCSI ID of your choice. IIRC there is some kind of pull-down feature in the SCSI pane, but I would have to try myself - didnt use that feature for a while. :)
I can fetch stuff from the attic, if you really need a HDD to run with BII/142.

The same thing can be done with FusionPC too BTW, if you can find a host with SCSI HBA old enough to run WIN98.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Cat_7 »

Hi,

Off topic:
I recently ported the SCSI support from the old 142 build onto the latest Basilisk source. It's messy, as I really don't know what I'm doing....But it works.
I have not released the resulting build as it doesn't work correctly with the prefs editor. :cry: It needs manual adaption of the prefs file. And I only tested it on a W2000 host.

Best,
Cat_7
Last edited by Cat_7 on Mon Oct 08, 2012 6:09 am, edited 1 time in total.
Reason:  
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Extracting Stuffit 5 files with The Unarchiver

Post by 24bit »

Thats pretty cool, Cat_7! Sure an interesting addition for BII with JIT.
I happen to have a W2K machine too - the one that can run Win98 as well.
(Asus P3B-F with PIII/650 in a Bondi blue tower case)
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

Man, I'm really close here -- I got Basilisk 142 to see my SCSI drive, it's just not showing up once I boot a disk image of 7.5.5. Any ideas?

This could be due to the fact that I'm running Win7, which doesn't support ASPI at all, but I got the relevant DLL to make Basilisk stop throwing errors... and FrogASPI has never let me down in the past for stuff like this: http://www.frogaspi.org/
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

Huh -- got it to work by initializing the drive in Drive Setup in Basilisk and was able to copy files over! Unfortunately, I'm having a pretty weird issue now...

If I try to reboot Basilisk, the drive is undetected and I have to initialize it again. I can hear it working when I'm copying files, though, so that's definitely doing something ... when I plug it into the Plus, however, I just get a black screen on boot, something I've never seen before. It was working fine before I initialized it. Not a big loss -- the Mac couldn't do anything before other than boot and run TeachText (the condition I got it in), but I can't for the life of me tell what's changed.

The machine has a Radius 16 in it (also the condition I got it in), which could be posing some weird compatibility issues, but it was booting System 6.0.3 before I reformatted the drive, and I've now tried 6.0.3, 6.0.5, 6.0.8, and 7.0.1, all with no luck. Totally confused. I guess I could try using Apple HD SC Setup instead of Drive Setup, but I'm getting pretty exasperated.

If I can't get this working, I do want to thank you guys for your quick and helpful responses! Sorry for clogging up this topic.
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Extracting Stuffit 5 files with The Unarchiver

Post by 24bit »

The Mac+ is the one with the non standard SCSI interface, right?
HDDs will only work with an interleave of 2:1 or higher and should be initialized with a Mac+ compatible utility.
As soon as you regularily initialized it with your BII-Win7 HBA the Plus may dislike it.
Maybe Lido can fix the interleave issue, never tried myself.
http://macintoshgarden.org/apps/lido-756

Do you still have a PC box with a serial port?
ZTerm might work for you, used that - once upon a time -.
Last edited by 24bit on Tue Oct 09, 2012 12:18 pm, edited 1 time in total.
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

Dang, good thinking. I think I'm officially in over my head... shouldn't have initialized it, I guess, but wasn't showing up in Basilisk otherwise.

Unfortunately, I don't seemto be able to change the interleave in an emulator ... the setting won't stick in Lido, and Apple HD SC Setup (the patched version) fails when trying to initialize it.

I have got a serial port, but geez, I'm getting to that point where you create as many problems as you fix.
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Jorpho »

Whoops, forgot about this thread. It's a bit late now, but:
axfelix wrote:I'd already tried creating an image from the drive and writing it back, but unfortunately HFVexplorer appears to be hardcoded to only want to do this with floppies, not hard drives (I tried hex editing the drive letters in the HFVexplorer exe but I think that only changed the GUI).
The idea is that you might be able to create an HFV image of the drive and then access the HFV image via HFVExplorer – as the name implies, it can definitely access an HFV volume stored in a file. You would use MacDrive or whatever to create the HFV image and write the HFV image back, in theory.
Unfortunately, copying a file that contains a resource fork from MacDrive using windows Explorer just gives me another 1:1 copy showing a 0 byte file. MacDrive's documentation seems to be lacking (the "forum" link on their website gives a bad gateway error), so I'm a little stuck there.
Have you tried searching your entire drive for .RSF files? Maybe it tries to store them in a subfolder (much like Basilisk II and Sheepshaver and PC Exchange).
axfelix
Space Cadet
Posts: 7
Joined: Sun Oct 07, 2012 3:54 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by axfelix »

Hey folks,

Me again. After some searching, I've given up being able to change the interleave without buying additional hardware, but I have found one potential lifeline:

This lowendmac article describes an init file that may enable a Plus to read a 1:1 interleave drive: http://lowendmac.com/compact/scsi21.shtml (wouldn't mind the performance boost, as I'm apparently no position to run without it!)

Unfortunately, the link is to a .cpt.hqx file, which I've never encountered before, and which my trusty 68k native version of Stuffit Expander 5.5 won't open. Any advice?
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: Extracting Stuffit 5 files with The Unarchiver

Post by 24bit »

Nice finding, if the init could fix the I/O issue of the Plus´s HBA.
Here is the item repacked with Stuffit 3.6: http://ubuntuone.com/5foTtdmHLTrOEJ0g7r2ytm
Hope that helps!
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Extracting Stuffit 5 files with The Unarchiver

Post by Jorpho »

axfelix wrote:Unfortunately, the link is to a .cpt.hqx file, which I've never encountered before, and which my trusty 68k native version of Stuffit Expander 5.5 won't open. Any advice?
CPT is Compact Pro, another shareware archiving program contemporary with Stuffit (and which The Unarchiver should also be able to handle).

Bonus tip: Although The Unarchiver 1.3 doesn't support MacBinary output (yet), if you copy files into an HFV volume as described above and copy them back to your Windows drive afterwards, HFV Explorer by default should re-encode them as MacBinary, which can be handled by most Macintosh unarchiving programs.
Post Reply