Author Topic: resource utility  (Read 1726 times)

Offline WayneCa

  • Member
  • Posts: 4
  • New Member
    • Wayne's Gaming Site
  • Liked:
  • Likes Given: 0
resource utility
« on: August 25, 2020, 05:12:26 AM »
I am trying to locate a utility that will allow me to decompress csnd resources. So far, all I have found are source code packages that require being built under OSX or Linux. I don't want the hassle of trying to build software. I just need a utility that can allow me to deal with resources in the resource fork and convert them to files I can use on my Windows laptop. Is there such a utility?

Offline IIO

  • Platinum Member (500+ Posts)
  • *****
  • Posts: 3044
  • just a number
  • Liked:
  • Likes Given: 61
Re: resource utility
« Reply #1 on: August 25, 2020, 06:48:17 AM »
you are looking for the free resedit.

for sound extractor it was planned but obviously never came. https://macintoshgarden.org/apps/soundextractor-131

for pictures there is a neat function in graphic converter to do that.

resedit probably doesnt know how to handle them. then you are supposed to install forker so that you can copy the csnd resources into data forks of new files, then save them and give them the correct attributes (probably 8 bit mono pcm audio?) using soundhack.

you probably already know this: https://github.com/fuzziqersoftware/resource_dasm and there is no binary. ;/
insert arbitrary signature here

Offline WayneCa

  • Member
  • Posts: 4
  • New Member
    • Wayne's Gaming Site
  • Liked:
  • Likes Given: 0
Re: resource utility
« Reply #2 on: August 25, 2020, 12:29:47 PM »
I have to look for forker. I looked at resource_dasm. It was promising until I saw there is no binary and I have to compile it. Also, I think it's only for MacOSX, so I couldn't use it on my Windows 10 laptop or in the SheepShaver emulator running MacOS9, so it's kind of useless to me.

Thanks for the response.

Offline IIO

  • Platinum Member (500+ Posts)
  • *****
  • Posts: 3044
  • just a number
  • Liked:
  • Likes Given: 61
Re: resource utility
« Reply #3 on: August 25, 2020, 06:05:17 PM »
if you dont get it to work with resedit feel free to upload the files in question, there are many here who can help to find the right procedure.
insert arbitrary signature here

Offline WayneCa

  • Member
  • Posts: 4
  • New Member
    • Wayne's Gaming Site
  • Liked:
  • Likes Given: 0
Re: resource utility
« Reply #4 on: August 25, 2020, 07:19:08 PM »
if you dont get it to work with resedit feel free to upload the files in question, there are many here who can help to find the right procedure.

Thanks. I have resedit. I just found super resedit and it contained the forker extension. But forker is for reading data forks, and the documentation doesn't say anything about using it to copy resources to data forks, so I'm lost on how that works. Documentation, or a tutorial, would help immensely. I just need to decompress the csnd resources to get the snd files, and I also am looking to see if I can find a way to determine the format of images stored in a resource that's not just pictures, but other types of resources as well. It's an old game, and I am trying to learn how it was put together.

Offline IIO

  • Platinum Member (500+ Posts)
  • *****
  • Posts: 3044
  • just a number
  • Liked:
  • Likes Given: 61
Re: resource utility
« Reply #5 on: August 25, 2020, 07:31:56 PM »
good question, let me see, i do it sometimes but i cant tell it by heart :)

ah, no it should always have one; as soon as you create a new document in resedit it already has the browser for the emtpy datafork.

otherwise you could also just create one by command-K, then attempt to create a "<DF>" resource.

in the source and in the new document go to lowest level and copy and paste. for image files like in the example it will mostly fail because of the missing container or description. that is where GC or soundhack come to play, as they open arbitrary and headerless data, too.
« Last Edit: August 25, 2020, 08:07:22 PM by IIO »
insert arbitrary signature here

Offline WayneCa

  • Member
  • Posts: 4
  • New Member
    • Wayne's Gaming Site
  • Liked:
  • Likes Given: 0
Re: resource utility
« Reply #6 on: August 28, 2020, 10:58:08 PM »
I have been trying to copy the data to files as data fork data using hexedit. I have found that resedit doesn't always want to copy the whole resource because in hex form the data is greater than 32000 bytes, or so resedit thinks. An example is one csnd resource that is 18017 bytes. Apparently, the hex editor sees it as 36034 bytes (2 bytes for each hex character). So, I copy it in sections and paste it into a hexedit document and then save that document. That's as far as I can get. I'm not sure what file creator or type to give it, so I leave it at whatever hexedit's default is. I tried using sfil and MOVR, but the system thinks the file is damaged, and I have no idea how to decompress it to get the sound file out of it. The image files are in a resource named BRGR. I know they are images because they are wall textures, but I have no idea what format they are in, and only know that they are LZSS compressed. I tried copying the raw data to a PICT resource, but resedit says the resource is not valid (or something like that). The game itself decompresses the resources as it uses them, but I have no idea how it does it. I'm not much of a hacker, so figuring this stuff out is next to impossible for me without some expert guidance.

Offline IIO

  • Platinum Member (500+ Posts)
  • *****
  • Posts: 3044
  • just a number
  • Liked:
  • Likes Given: 61
Re: resource utility
« Reply #7 on: August 29, 2020, 12:35:52 AM »
oh yeah that damned clipboard limit in resedit. not sure where it comes from.
insert arbitrary signature here