Author Topic: is it possible to fix destroyed resource forks?  (Read 10437 times)

Offline dr bu

  • Gold Member
  • *****
  • Posts: 230
  • inconsistent soul
is it possible to fix destroyed resource forks?
« on: March 28, 2016, 07:14:14 AM »
..so if resource forks got destroyed on a number of files (by linux), and i did no backup :-[ is there ANY way to fix it?
i dont know if this http://www.bubblepop.com/typeshuffler/ might do the trick, currently i have no OSX...
what would you do?
djupsinnig

Offline MacTron

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2116
  • keep it simple
Re: is it possible to fix destroyed resource forks?
« Reply #1 on: March 28, 2016, 08:10:43 AM »
..so if resource forks got destroyed on a number of files (by linux), and i did no backup :-[ is there ANY way to fix it?
i dont know if this http://www.bubblepop.com/typeshuffler/ might do the trick, currently i have no OSX...
what would you do?

Short answer: NO

Detailed: No you can't. But is some cases, the resource fork can be reconstructed in some tricky ways. If you have a full very similar file, you can try to copy/paste the resource fork.
Please don't PM about things that are not private.

Offline Syntho

  • Platinum Member
  • *****
  • Posts: 1325
Re: is it possible to fix destroyed resource forks?
« Reply #2 on: April 18, 2016, 04:34:49 AM »
I learned this same thing the hard way =/

Offline dr bu

  • Gold Member
  • *****
  • Posts: 230
  • inconsistent soul
Re: is it possible to fix destroyed resource forks?
« Reply #3 on: April 18, 2016, 11:25:35 AM »
well, at least i found out (since most of my corrupted files are aiff or sd2) they can be opened in Amadeus as "Raw data", then by trial and error i can determine samplerate, bitdepth, and number of channels. tediously..! one by one.

btw, (offtopic) these colored squares...ive got 3 yellow ones, syntho`s got 5 green ones and Mactron...why he`s only got 1 yellow???
« Last Edit: April 18, 2016, 11:35:41 AM by dr bu »
djupsinnig

Offline DieHard

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2368
Re: is it possible to fix destroyed resource forks?
« Reply #4 on: April 18, 2016, 01:59:23 PM »
Quote
these colored squares...ive got 3 yellow ones, syntho`s got 5 green ones and Mactron...why he`s only got 1 yellow???

He is obviously the "one" like in the Matrix

Offline dr bu

  • Gold Member
  • *****
  • Posts: 230
  • inconsistent soul
Re: is it possible to fix destroyed resource forks?
« Reply #5 on: April 20, 2016, 12:37:38 PM »
thats not fair.
am I not a Consistant Contributor?? (whoever gave me that attribute?)
djupsinnig

Offline dr bu

  • Gold Member
  • *****
  • Posts: 230
  • inconsistent soul
djupsinnig

Offline DieHard

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2368
Re: is it possible to fix destroyed resource forks?
« Reply #7 on: April 22, 2016, 08:08:56 AM »
Quote
thats not fair.
am I not a Consistant Contributor??

Yes, you are very loved and part of the inner circle :)

But Mactron, as you know, is the co-creator of our beloved site; he likes the "one star" and to stay very low-key as he has the whole classic Mac universe to maintain.

Offline Galane

  • Newcomer
  • Posts: 3
  • new to the forums
Re: is it possible to fix destroyed resource forks?
« Reply #8 on: April 22, 2016, 09:27:20 PM »
Some older versions of Windows Server, when Services For Macintosh were installed, had a command called "forkize". What it would do is if you were storing Mac files on a Windows Server, was repair the relationship between a data and resource fork.

Of course you had to have both forks. I don't know if you could take a broken file and copy the forks to Windows Server and 'forkify' them, then reach out over the LAN to bring the file back whole to a Mac.

I've always found it very odd that no such utility has been made for Macintosh. If you have both forks, undamaged, it should be possible to 'glue' them back together - especially when Microsoft figured out how to do it on an 'alien' operating system. Also, Stuffit Expander will automatically create new resource forks for Stuffit archives that have lost theirs. But that one is easy since a Stuffit resource fork is nothing but the Type, Creator and an icon.

Quicktime for Windows is a curious case. On Mac, MOV files have resource and data forks, same as most others. Normally, to copy a MOV to any other system you'd have to have Quicktime Pro, which enables the "flatten" function. That bundles the resource fork into a single file with the data.

There's another way. Put a .mov extension on the file name then copy the video to a PC format drive. It's easiest to only have the one video file on it. Connect the drive to a WinBox then look in the other folders (which are hidden on a Mac) for the resource fork file. Copy it and the .mov to the same folder then add a .qtr extension to the resource fork name. The rest of the name before the extension must be identical.

Doubleclick the .mov file and Quicktime will use the data from the .qtr file to play it. Great, but what about flattening MOV on Windows? QT Flattener. http://www.macdisk.com/quickten.php

The takeaway is that for most Macintosh files it is only safe for them to travel away from home when bundled up warmly in a thick Stuffit archive or wrapped cozily in BinHex or MacBinary text encoding.

Why are there two different text encoding formats? That goes back to the early days of the Internet when it was mostly a concern of the English speaking world and most of the information going back and forth was text files and e-mail. To save transmission time and data usage (remember this was when a 20 *megabyte* hard drive was huge) the early net gateway computers were configured to not pass the 8th bit of all the bytes, unless receiving specific commands that the file going through was Binary Data - not text. For all the characters needed to write anything in English, the 8th bit is 0. So it could be ignored until arrival at the destination, where *magic happens* and a 0 got stuck onto every byte, or e-mail client software just worked with 7 bit text. If you sent an image or a program file and didn't set things to command the gateways to not strip the 8th bit, the destination got garbage - kind of like a teleporter mishap... https://www.youtube.com/watch?v=Ro_QpDJX-Sk

I'd have to look up which of the format is which, but one uses only 7 bit ASCII characters while the other uses more characters which require all 8 bits, but results in encoded files about 1/8th smaller.

It used to be common practice for sites hosting Macintosh files to have two small Stuffit archives for test downloads, one in MacBinary and one in BinHex. First, download the smaller version and if it decoded and unstuffed OK you could download that format and save on your data and/or logon time limits. If it corrupted you had to try the larger, 7 bit version. If that corrupted too, then somewhere between you and the file host was some hardware that just didn't like Macintosh files.

Fortunately all the creaky old 7 bit systems are (should be!) long gone from the internet.

Offline DieHard

  • Global Moderator
  • Platinum Member
  • *****
  • Posts: 2368
Re: is it possible to fix destroyed resource forks?
« Reply #9 on: April 23, 2016, 09:38:22 AM »
Thanks Galane for the great post...

For others that are interested in related material:

http://macos9lives.com/smforum/index.php/topic,1131.msg13276.html#msg13276

Offline dr bu

  • Gold Member
  • *****
  • Posts: 230
  • inconsistent soul
Re: is it possible to fix destroyed resource forks?
« Reply #10 on: October 03, 2017, 02:53:27 AM »
found this: http://aeroquartet.com/movierepair/aiff. so i downloaded hexedit but have not stuck head into it yet.  ::) also attached file could fix 16bit aiff...
djupsinnig

Offline ivanshpak

  • Enthusiast Member
  • ***
  • Posts: 70
  • New Member
Re: is it possible to fix destroyed resource forks?
« Reply #11 on: December 19, 2022, 02:29:16 PM »
Hello everyone, an unpleasant situation arose, its essence is as follows:

There is an executable firmware file for the SCSI controller, it has a damaged resource fork, (this file should run in OS9 and flash the controller)

There is a similar firmware file but a little newer, please tell me how can I restore an old corrupted firmware file having a whole file of a newer one?

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4439
  • just a number
Re: is it possible to fix destroyed resource forks?
« Reply #12 on: December 19, 2022, 04:56:32 PM »
the resource fork of such a software most likely only contains a header and maybe some images or dialogs.

if it also contains windows with functionality found nowhere else the program is gone.

otherwise you could just fix it by adding a new, empty resource fork and make it executable again (type: APPL)
insert arbitrary signature here

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4439
  • just a number
Re: is it possible to fix destroyed resource forks?
« Reply #13 on: December 19, 2022, 05:03:19 PM »
dr. bu´s blog is gone.
insert arbitrary signature here

Offline ivanshpak

  • Enthusiast Member
  • ***
  • Posts: 70
  • New Member
Re: is it possible to fix destroyed resource forks?
« Reply #14 on: December 20, 2022, 05:29:02 AM »
the resource fork of such a software most likely only contains a header and maybe some images or dialogs.

if it also contains windows with functionality found nowhere else the program is gone.

otherwise you could just fix it by adding a new, empty resource fork and make it executable again (type: APPL)

The program is very simple, it looks like a script from the command line.

Can you give me some guide on this topic?

Offline IIO

  • Platinum Member
  • *****
  • Posts: 4439
  • just a number
Re: is it possible to fix destroyed resource forks?
« Reply #15 on: December 20, 2022, 04:30:53 PM »
i do not fully understand the problem.

you need one installer/uploader where the fork is gone but you have a similar program which is okay and now you wonder if you can rejoin the broken one with the other ones resource fork?

..
 
the resource fork is mostly used in applications and application supprting files (such as folder icons) and can contain anything, but often only contain stuff which follows a quasi-standard pile of resource classes (such as WND# for window boxes or clut for color palettes)

you can edit them with programs such as resedit, which also offers a bunch of graphical editors for some of these quasi-standard classes. (mostly for graphical things such as windows, boxes, text...)

the other thing the resource fork has (or to be exact: the other thing which can get lost from foreign filesystems or network transfers) is the get info comment, the creation date, and the type/creator code.
(and obviously some AIFC headers, in regards to the original question how to repair audiofiles which have no samplingrate at all)

stuff like type/creator code or date can also be edited with resedit, but also with dozens of other programs.
 
for me, resedit under OS7 was a real eye opener, and i still use it until today to change menus and keyboard commands permanently in programs.
 
 
open both apps with resedit and show me what you see.
« Last Edit: December 20, 2022, 04:47:40 PM by IIO »
insert arbitrary signature here