Hacker News new | ask | show | jobs
by netsharc 717 days ago
I recall seeing CD-ROMs that had both Mac and Windows software on it, and depending on which OS it was mounted on, it would show the Windows EXE or the Mac app... I wonder how that's done. I'm guessing there was a clever trick so files on both filesystems share the same data (e.g. if the program/game had a movie, it would only store the bytes of the movie once but its addressable as a file on each filesystem), but that sounds like a nightmare.

I can probably look it up and figure it out myself, ah, the joys of learning about obsolete tech!

4 comments

As it starts about 32k in, the ISO 9660 superblock doesn't inherently conflict with an Apple partition map which starts at the beginning. Apple also had proprietary ISO 9660 extensions that add extra metadata to the directory entries much like the RockRidge extension does. Those would get ignored by non-Apple implementations of ISO 9660.

Microsoft went a different route with its long filename extensions (Joliet) – they simply created a whole different (UCS-2/UTF-16 encoded) directory tree. An ISO 9660 implementation that's compatible with Joliet will prefer the Unicode directory hierarchy and look there for files.

You can hide files from windows by setting a property on the file. You can hide files from MacOS by inserting it's name in a file called ".hidden".
There were also the audio CDs that had data on them. Audio CD players would just play the audio, but a CD-ROM could access both. Some had apps that were games that would play the audio portion for the game.

If you want to know about the different types of CDs, you'll want to know about the various colors: https://en.wikipedia.org/wiki/Rainbow_Books

Some Playstation 1 were setup to also play the game soundtrack if you put them in an audio CD player.
MechWarrior 2: Mercenaries (for PC) was the same way. Rocking soundtrack. Beautiful game, provided you had a Voodoo 2.
The Mac version of the original Descent was like this too, with a great redbook audio soundtrack. The game wasn't locked to the original disc though, you could pop out the CD in the middle of the game and replace it with any other audio CD and it'd play that just as well.
I remember this site from the 00's: http://cdrfaq.org
I remember listening to the Warcraft 2 soundtrack from the game CD-ROM in the living room audio CD player.
IIRC from that time, those CD-ROMs contained two tracks, one formatted with ISO 9660 and another with HFS+. Windows didn't come with HFS+ drivers so it ignored it, and probably MacOS prioritized mounting the HFS+ track.
I've seen some where the combined file size exposed on each track would be larger than a CD could hold, so there had to be something more going on. StarCraft and Brood War come to mind with the large StarDat.mpq / BrooDat.mpq files.
Oh, StarDat.mpq, brings back memories. That was one of the major reasons I'm in this industry now - the file itself is a "virtual file system" (MOPAQ, with MO being IIRC the authors' initials) file with some CRC and obfuscation. As a kid, I was hell-bent on learning how it works, writing code to decode and encode it, and then use it in my own hobby projects. I learned a lot of concepts from that little rabbit hole. Hell, the way StarDat.mpq, BrooDat.mpq, and Patch_something.mpq interacted, was what you'd call "overlay FS" today.
TL;DR ISO9660 provided an area to stuff type-tagged extension information for each directory entry.

In addition, first 32kB of iso9660 are unused, which allowed tricks like putting another filesystem metadata there.

By carefully arranging metadata on disk it was then possible to make essentially overlapping partitions, stuffing each filesystem metadata in area unused by the other, with files reusing the same space