Recenty, I've had a growing interest in the guts of the files and resources of the Mac (such as, sound, text, and other things). I began reading ResEdit reference (interesting, much recommanded to all of you, even PC guys, useful for setting up your own templates if you would prefer boolean editors over hexadecimal for flags), then as I wanted to know more about resource files, Inside Mac: More Macintosh Toolbox, Chapter one: Resource manager, and I stumbled upon very interesting things, as everything we do in plug deving is based on resources :
-
1. this tells that the maximum number of resources in a single file is 2727, but more interestingly that one shouldn't put more than 500 resource of the same type in the same file. Open resEdit, tell it to view the resource types of a file without icons, and check some data files for EVC, EVO and EVN: some resources break this rule, especially dëscs. This 500-max rule is not mandatory, but since it may slow down the loading of a plug, it might be a good idea to break the dëscs into separate files as was done in the Nova data files.
-
2. Reserved IDs for resources, just so you know (yep, negative IDs exist, but you rarely if ever see them).
-
3. This shows the details of the resource file format, from which we can tell invaluable information: (damn UBB refuses to convert nested lists, though it is possible in HTML)
-
3a. an entry in the reference list for a resource type tells the offset from beginning of resource data to data for this resource on 3 bytes, meaning only 16 Mb of resource data can be addressed, though other offsets are 4 bytes, allowing 4 Gb of size for resource file, this one is the only one offfset to resource data (not resource map) to be on only 3 bytes, enforcing the 16Mb limit most of us know about
-
3b. the offsets for the resource name in the resource name list is only on 2 bytes, meaning only 65 kb of resource names, which means (not counting resources that have no names, which point to -1) the sum of the (length of resource names +1) must be inferior to 65 kb, the maximum length for a name being 255 chars (255 bytes). Therefore, if you tend to name your EV resources much, with long and descriptive names, you may end stumbling on that limit faster than you expected.
We work for our plugs on resources, but we barely know them. I wanted to put this information so that it is better known, so that you separate your plugs into more than one file a bit more, especially for would-be TC makers.
------------------
The Ambrosia Mac CD with other registrations - 5$. Paying for EV Nova as it's such a great game - 30$.
The 1337 EV Nova T-shirt - 22$. The NovaTools by wOOtWare to tinker with your Nova - FREE!
The feeling you're a Nova geek - priceless.
There are things money can't buy or that are free, for everything else, there's indeed Mastercard.
This post has been edited by Zacha Pedro : 28 July 2005 - 02:25 AM