top | item 36042409

(no title)

sischoel | 2 years ago

A few years ago I was trying if I could port that code to Linux. I made some decent progress, but in the end I got stuck trying to convert the resources (images and audio files) to a more modern format. For example, the PICT format (https://en.wikipedia.org/wiki/PICT) is not just some pixel encoding but also contains QuickDraw commands. There are some open source converters, but they seem to support only a subset. And then I had to concentrate on finishing my degree so I abandoned that project.

Other things I remember: - Data is mapped directly from files to C structs - this provided some challenges as I had to convert big endian to little endian. - Classic MacOS handled memory allocations quite a bit different, if one wanted to access a dynamically allocated buffer, they first had to acquire a lock on that part of memory as otherwise the operating system was allowed to move the data to some other address.

My memory on these details is quite a bit fuzzy though, so I can't guarantee that what I wrote here is 100% correct.

discuss

order

JKCalhoun|2 years ago

I have been in a similar rut lately, trying to recover the artwork from Glider 4.0 (the Glider before Glider Pro). I have the amazing Mini vMac set up with Glider 4.0 installed as well as one of the last ResEdit apps. I am literally opening the PICT resources with ResEdit on the emulator and taking screenshots on Mac OS Monterey of the emulator.

Yeah, then I get to tediously re-crop the artwork in the screenshots for correctness.

Also the screenshot is pixel-doubled (Retina display, I suppose) but a little GraphicsMajick fixes it:

gm convert doubled_image.png -filter point -resize 50% new_image.png

kalleboo|2 years ago

What I'd do is use the last version of Lemkesoft GraphicConverter for Classic MacOS, which now has a free abandonware license. https://www.lemkesoft.de/en/products/graphicconverter/downlo...

It can open PICT resources and save to TIFF/GIF/PNG etc and it has a batch mode.

edit: Interesting. I just tried the current version of GraphicConverter 11 I have installed on Ventura and it can actually still open PICTs from resource forks! Or... it tries, but the multi-page GUI is messed up so it crops the images and doesn't display them correctly. But somewhere in there it is still reading resource fork PICTs on macOS Ventura on Apple Silicon...

poppij|2 years ago

You may want to try rsrcdump for this task (https://github.com/jorio/rsrcdump). It takes a resource fork as input and spits out modern file formats for a selection of resource types (PICT -> .png, snd -> .aiff, etc.)

I just ran rsrcdump on Glider 4.09 and the resulting PNG files appear to match their PICT counterparts as displayed by ResEdit.

I initially wrote this tool to assist in porting some old games by Pangea Software. If you have some resource fork that fails to convert properly with rsrcdump, just let me know and I'd be happy to try to fix it.