Ambrosia Garden Archive
    • Limitations of the resource fork


      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

    • Excellent information. Thank you for sharing your research with the community.

      ------------------
      Moderator- (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=9&SUBMIT;=Go&mrxak;=cool")EV Developer's Corner(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=69SUBMIT=Go&mrxak;=cool")Uplink Web Board(/url) | (url="http://"http://forums.evula.com/viewforum.php?f=18")mrxak's Assorted Webspace Forum(/url) | (url="http://"http://forums.evula.com/viewforum.php?f=48")Starcraft Forum(/url) | (url="http://"http://forums.mrxak.com/")mrxak.com Forums(/url) | | (url="http://"http://directory.uroboricforms.org/profile.php?id=00008")My Profile(/url) | (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/postdisplay.cgi?forum=Forum10&topic;=007599-2&whichpost;=mrxak11-06-200203:22PM")mrxak(/url)
      (url="http://"http://www.mrxak.com")mrxak.com(/url) | (url="http://"http://www.mrxak.com/haikus/haikuarchive.html")The Haiku Archive(/url) | (url="http://"http://www.mrxak.com/EV/N/amtc/amtc.html")A mrxak TC(/url) | (url="http://"http://www.mrxak.com/EV/N/challenge/thechallenge.html")The Challenge v1.0.3(/url) | (url="http://"http://www.mrxak.com/EV/TmC/TmC.html")The mrxak Challenge(/url) | (url="http://"http://www.mrxak.com/chess/chesstournament.html")Chess(/url) | (url="http://"http://www.evula.org/mrxak/")mrxak's Assorted Webspace(/url) | (url="http://"http://blog.evula.net/mrxak/")The mrxak Blog(/url)
      (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/search.cgi?action=intro")Search First(/url) | (url="http://"http://www.macgamer.net/games/uplink/")Uplink Guide(/url) | (url="http://"http://www.ambrosiasw.com/webboard/Forum69/HTML/000061.html")Install Uplink Add-ons(/url) | (url="http://"http://www.evula.com/survival_guide/")EV/O/N Guide(/url) | (url="http://"http://www.ambrosiasw.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=31&SUBMIT;=Go")Plug-in Guide(/url) | (url="http://"http://www.AmbrosiaSW.com/webboard/Forum9/HTML/003196.html")Plug-in Developers(/url) | (url="http://"http://www.AmbrosiaSW.com/webboard/Forum9/HTML/003091.html")Plug-in Testers(/url) | (url="http://"http://davidarthur.evula.net/mc.php")Mission Computer(/url)
      "When you burn your bridges, just make sure they aren't in front of you." -mrxak

    • That really explains why large plugins come in two or three or a host of small or medium parts. Thanx alot for the information!

      ------------------
      Cmon people, the (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=20&SUBMIT;=Go")Chronicles(/url) are worth looking at.

    • Correction about the resource map: since -1 is put in the offset in the entry in the reference list for a resource type, it means the 2-byte integer is signed, meaning at most 32kb of resource names can be addressed; so if you give your resources pretty descriptive names, say 25 chars, then 32767/26=1260.~, so you would be limited sooner than by the max number of resources. Speaking of them, the limit of 2727 resources can be explained; 30 bytes are taken by the header of the resource map, 8 bytes by the entry for the one resource type (let's admit there's only one for now), 32729 bytes remain for storing the entries for individual resource, each taking 12 bytes. 32729/12=2727.416666...; thus the limit. If you put more different resource type, each is taking 8 bytes, so for every three more resource types, there are two less resources available. Plugs have around a dozen resource types, meaning the max is something like 2719. I've not been able to tell it from the offsets, but it may even be possible that resource names and resource entries compete for space in the resource map, meaning the limits could be reached even faster.

      I suggest you folks to break your plugs into separate files before reaching these limits, as they all can be circumvented by breaking in separate files; all of our editors on Mac use the resource manager to manage the resources (or I hope so...), and I dunno what it does when you begin to reach these limits, maybe it saves nonetheless, and when you will attempt to open it, it won't be able to be opened, potentially losing your hard work; and the same goes for EVNEW, dunno if .rez uses the same format, but it can be expected to have the same limitations, since you can convert .rez back to Mac plugs.

      Oh, and it was the last thing that I would think would give me karma! 😉 Thanks.

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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 message has been edited by Zacha Pedro (edited 04-21-2004).)

    • This may sound like a one-man-topic, but I'm suddenly realising people might not understand everything, so, to sum up these limitations:

      • an individual (plug or data) file can contain at most 2727 resources, and this number goes down by 2 for every 3 more different resource types (for instance, if the file features 12 kind of resource types, the max is more like 2719). I'd suggest you to consider splitting when the file reaches 2000 resources.

      • independantly with the above, for resources that are named, if the sum of (length_of_resource_name + 1) for all the named resources reaches 32767, no more names can be given

      • I'm not sure about it, but it might even be possible those two limits compete, meaning (number_of_resources12 + number_of_resource_types8 + sum_for_all_named_resources of (length_of_resource_name + 1)) must be <32767; practically, it would mean that if you give resources names of 11 chars in mean, the max number of resources would be halved (for instance). Then again, I'm not sure about that one

      • independantly with everything above, the size of an individual (plug or data) file must be inferior to 16 Mb. Begin to panic if it reaches 15 Mb, and I would split in two files when it reaches 12 Mb

      • this may be well-known, but do not attempt to use IDs outside of the normal range (128 to 32767)

      • lastly, it is suggested that you put at most 500 resources of the same kind in the same file. Resources that comes in massive numbers such as dëscs should be distributed across several files as was done in the Nova data files

      Now, I'd like to ask AriosSw, David Arthur, Aprosenf (and Dr Ralph in case he sees that too): could this information be included in the docs of your plug editor? It would be useful for everyone to know. Being included in the Bible would be ideal, but utopic.

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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 message has been edited by Zacha Pedro (edited 04-23-2004).)

    • Interesting stuff. I skimmed through a lot of that when making EVNEW. The rez format is very similar, but there a few key differences:

      • ALL offsets are 32-bits, meaning there are virtually no size limitations on anything (other than the obvious 4-gig limit, which we can ignore)

      • The resource names in the map are all padded to 256 bytes

      Which basically means that Windows plug makers don't need to worry about any of those guidelines. Of course, in order to be able to be converted back to Mac plugs via David Arthur's or AriosSoftware's converters, they would still need to follow those limitations. As for putting this info in the Bible or plug editor docs? No, I don't think that's necessary. People making plugs don't need all of this technical info. It's probably a good idea to put this somewhere on the web for people who are interested, but I think it's overkill to put it in the Bible. It might scare people away from plugin making.

      ------------------
      Get (url="http://"http://www.aznt.com/EVN/EVNEW")EVNEW(/url) - the free, open-source EVN plugin Editor for Windows!

    • Quote

      Originally posted by Aprosenf:
      **Interesting stuff. I skimmed through a lot of that when making EVNEW. The rez format is very similar, but there a few key differences:

      • ALL offsets are 32-bits, meaning there are virtually no size limitations on anything (other than the obvious 4-gig limit, which we can ignore)

      • The resource names in the map are all padded to 256 bytes

      Which basically means that Windows plug makers don't need to worry about any of those guidelines.
      **

      Speaking for myself, I would like to see the EVNgine on the Mac start using data fork based .rsrc data. I suspect many of the limitations of the resource forks would not be an issue, then. And, while I'm dreaming, I'm going to point out that I can't see any reason why the windows EVNgine couldn't use data fork based .rsrc files for data and plugins. So, if both the Mac and Windows versions used .rsrc data files, no conversion would be necessary and the world would be a much better, safer place. Sure, the Windows version would probably have to do some endian swaping, but that seems like a minor task.

      Imagine a world where Mac and Windows EVN players could swap plugins without having to convert them. Now imagine Contraband actually implementing such a thing. Keep imagining....

      -STH

      ------------------
      "Create enigmas, not explanations." -Robert Smithson

    • Quote

      Originally posted by Aprosenf:
      **As for putting this info in the Bible or plug editor docs? No, I don't think that's necessary. People making plugs don't need all of this technical info. It's probably a good idea to put this somewhere on the web for people who are interested, but I think it's overkill to put it in the Bible. It might scare people away from plugin making.

      **

      The 16 MB limit and the 500-resources-of-a-type recommendation, at the least, seem like things worth including in documentation; I've hit that 16 MB limit myself thanks to a few inadvisably huge sprites, and it wouldn't be hard for any TC maker to pass 500 descs. With a bit of attention to the editing, nothing ZP discusses need frighten anyone. Just de-emphasize the "why" info in favor of the practical "what," and give the section a heading that reads something like "TECHNICAL NOTE FOR MAKERS OF VERY LARGE PLUGS" so first-time skimmers of the doc understand that it's a paragraph they can safely skip.

      ZP, I'd say go ahead and send emails to Burch and Pipeline, or whoever else it is that should be collecting notes on revisions to be included in the 1.0.8 version of the Bible. If they don't want to do it, they don't have to do it.

      ------------------
      (url="http://"http://home.comcast.net/~drtrowel/")Dr. Trowel's E.S.W.P.(/url) -- Featuring Cold Fusion graphics for EVN Override and two EVN:O bug fixes.
      Very Good Stuff: (url="http://"http://www.evula.com/escape_velocity/")EVula(/url) (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) (url="http://"http://www.evula.org/infernostudios/search.html")EVPlugSearcher(/url) Play FAQs: (url="http://"http://ev-nova.net/forums/viewtopic.php?t=2832&sid;=43627ead61761e7f19060b00c14c739c")N(/url) (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&forum;=EV+Nova+FAQs&number;=30&DaysPrune;=20&LastLogin;=")N(/url) (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&forum;=EV+Override+FAQs&number;=53&DaysPrune;=20&LastLogin;=")O(/url) (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&forum;=Escape+Velocity+FAQs&number;=28&DaysPrune;=20&LastLogin;=")C(/url) Dev FAQs: (url="http://"http://www.AmbrosiaSW.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&forum;=EV+Plug-in+Developer+FAQs&number;=29&DaysPrune;=20&LastLogin;=")A(/url) (url="http://"http://www.ambrosiasw.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number;=31&SUBMIT;=Go")B(/url)
      Interests: The Good, The Bad, and The Loopy.

    • Before making this research, I knew about some kind of 16 Mb limit, but not much more, and I really wanted to know why this limit. I eventually found the details of the resource file format, and began looking for an address/offset that would be 3-bytes long, and saw 4-bytes offsets and lengths, and thought "that's odd, why is the size not limited only by 2Gb (the limit for a file size in HFS+)?" I read on, and found the 3-bytes only offset in the entry (I suppose to keep everything 32-bit alligned, and not limit the number of resources too much) and despaired. It was the only 3-byte offset, which is what is limiting us all. (url="http://"http://www.folklore.org/StoryView.py?project=Macintosh&story;=Mea_Culpa.txt&sortOrder;=Sort by Date&detail;=medium")I recently read something about it.(/url)

      The .rez format seems (from what you're saying) very well done, being easily translatable from a Mac resource file, evidently a lot of thought went into it. But the fact the .rez format is indeed better made makes it all the more necessary for the info to be put in EVNEW docs, since PC TC makers could eventually break the 16Mb limit without noticing, and when trying to convert the plug to a Mac for their Mac testers, it would fail with a very difficult bug to identifiate (dunno if EVONE or David Arthur's converters would fail silently or not). I actually never intended it to be put in the Bible, it's not up to the Bible to tell that, more to the docs of the programs that do the plugs (but indeed something for later, maybe an FAQ telling: "why does XXX fail to open/save/whatever my large plug?"). You do whatever you want with your editors, but the plug community would gain by making this information better known.

      Well, it's indeed still very technical and trying to explain why, since I knew some techies would be reading it, it's obvious that if it's to be put in some docs, it would be more like my last post. But from what I've seen, there shouldn't be any other limitation, I am sure these are all the ones we can suffer from.

      seant, it makes sense to have the plugs converted once and for all, so that the program itself does not have to make make the endian swapping and the such at loading. Check the progress log for WinNova, it was first to accept .bin files, then later changed, probably for a reason. Plus, there still needs to be a scheme to keep the information contained in the resource fork (we just can't take all the plugs already done and make them have their resource fork in the data fork of a new file), and it's this scheme of unstuffing with an outdated version of Stuffit, that Aladdin does no longer make available in their ftp, that is causing the most problems, compared to that, dragging a .bin file to a drag&drop; app is nothing. However, having MacNova understand the "resource in data scheme" files would make sense, indeed. But it wouldn't remove these limits, sice it's not linked to the fact it's in the resource fork (I've made, due to errors, a file with a resource fork full of 1Gig of garbage, obviously ResEdit refused to open it) but due to the organisation of the resources inside the file.

      Dr. Trowel, I've indeed made this research and posted it here 'cause I suspected people in the past have been ramming into these limits without even being aware of it, and learning it painfully as they reached these. Now people will be warned.

      Now I'm back home, I'm going to do some tests to find out what ResEdit (and, supposedly, the resource manager since ResEdit must be using the resource manager) does when reaching those limits (ResEdit is gonna crash a whole lot on my comp in the next few hours ;)...); stay tuned.

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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 message has been edited by Zacha Pedro (edited 04-23-2004).)

      (This message has been edited by Zacha Pedro (edited 04-24-2004).)

    • Your intrepid ResEdit tester is coming back from duty...

      I first tested the max number of resources (supposedly, 2727, this number is quite documented). I simply took "Override data 1", copied it, opened it with ResEdit, and took resources from "Override data 2" and copied them to "Override data 1 copie", whole resource types after another. When I copied the spďn (I eventually opened Override graphics too) resources, which would make the total number go over 2750, it copied without problem, and ResEdit saved automatically to the hard drive, as it always does, without complaining. Odd. I added some shän resources (from Nova ships 1) to be sure, but it behaved normally, I went checking and opened each resource picker without problem. However, when I explicitely asked ResEdit to save, it went down with a type 1 error. But the oddest thing is to come: after asking my computer to reboot (to be sure), ResEdit opened that mutant file with around 2800 resources without any problem, and I checked: nothing was missing. I closed ResEdit, and opened the file with HexEdit, and checked the offsets that would supposedly cause a problem (the one in the shän resource type entry for the resource list, and the offset for the resource name list from the beginning of the map): they were something like 0x80 23 and 0x80 A5, being over 32k without (much) problems, save making ResEdit crash when explicitely told to save. The good news is that if someone is to break that 2727 limit, not only he will be told about a problem, but not any single byte of his work will be lost.

      Now for the resource name limit: I made a copy of my blank plug, made a new dësc resource, put nothing in it and gave it a name 255 chars long. Then I duplicated this resource, over and over, until I had 128 of them. Nothing particular happened. I duplicated the whole list to reach 256 resources, added one, two three to have 259 of them, but all the names were there, normally. Then it suddenly hit me "But of course! Everything I made with the names is 256bytes-aligned (1length byte+255 bytes of chars), so for the overnumerous names, ResEdit simply puts them at the end and puts their offset in the place, that offset has its high-order bit truncated, so it falls exactly in place for one of the other names!". I opened HexEdit, and sure enough, it was the explanation. I returned to ResEdit, made a new STR (to change a bit) resource, attempted to name it with a new name, and sure enough instead of the name I choose, garbage from the 255-chars name I gave before appeared. It did not make ResEdit crash at all, and it was funny to see. I wiped out that poor file, made another copy of my blank plug, and retried with a 254-chars name, but it did not make any funny behavior until I had 257 or 258 resources, so my previous theory was false, and really 64 kb of resource names can be addressed, just that -1=65535 (0xFF FF) is interpreted specially. Another thing is that it did not make any problem to add other, unnamed resources, meaning my theory about resource entries and resource names competing was false.

      Now, on to the 16Mb limit. This one was easy: I took 8Mb of RleDs from a Nova ships file, another 8Mb of RleD from another, copied the first group into yet another copy of blank plug, copied the second group, and ResEdit told me it had unexpectedly reached the EOF (error -39). However, it did not quit, and the resources that were able to fit were there without problem. Then again, ResEdit did behave remarkably, and no data will be lost.

      I made another test: I tried to give a resource an ID of 32768, and sure enough it had an ID of -32768, and gave it an ID of -32769, and it unsurprisingly displayed an ID of 32767 when I closed the get info window.

      ResEdit is therefore remarkably respectful of our data, but I wouldn't so sure about MC or EVONE. I've not tested these; actually I do not even have them on my computer.

      Now, I'd like some help from any PC guy: could you make a plug with EVNEW, full of emptiness (say, dëscs, each one filled with 1Mb of always the same char) that goes over 17 Mb (with 17 of these dëscs)? Obviously, I'm not gonna download (and my inbox won't accept) a file of that size, but given it will be full of zeroes, once .zip compressed it will be very light. This way I could test what David Arthur's rez-to-Mac does when encountering such a beast. If it's less than 1Mb in size once zipped, send it to lebpierre(à)wanadoodotfr (yeah, I'm paranoid about spam bots); otherwise, tell me here. Thanks in advance.

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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 message has been edited by Zacha Pedro (edited 04-24-2004).)

    • Quote

      Originally posted by seant:
      Speaking for myself, I would like to see the EVNgine on the Mac start using data fork based .rsrc data. I suspect many of the limitations of the resource forks would not be an issue, then.

      Data fork-based rsrc data is just the exact same format, except stored in the data fork rather than the resource fork, so I don't really see how it would allow you to overcome the limitations of the format itself.

      Quote

      Originally posted by Zacha Pedro:
      ... **when trying to convert the plug to a Mac for their Mac testers, it would fail with a very difficult bug to identifiate (dunno if EVONE or David Arthur's converters would fail silently or not).
      **

      From my experience with Nova betas which tried to cram too much into a single file (or, for that matter, with some early EV plug-ins), it would most likely successfully create a Mac file, but the result would be unreliable since it exceeded the resource system's limitations.

      ------------------
      David Arthur | (url="http://"http://davidarthur.evula.net/")davidarthur.evula.net(/url) | (url="http://"http://www.ev-nova.net/")EV-Nova.net(/url)
      The people united can never be ignited!

    • Quote

      Originally posted by David Arthur:
      **From my experience with Nova betas which tried to cram too much into a single file (or, for that matter, with some early EV plug-ins), it would most likely successfully create a Mac file, but the result would be unreliable since it exceeded the resource system's limitations.

      **

      Thanks for the info, it means that, if a PC plug maker creates a too-big-for-a-Mac plug, his Mac tester(s) (I sure hope that a plug maker of large-size plug makes sure it is tested on both platforms, at the very least) would think they succeeded in converting, but some resources would be oddly lacking, or Nova would refuse to launch; either way, difficult to track down if people are not aware of these limitations. Eiter ResEdit would refuse to open it, or open it with less resources than the .rez file had, and it would require much back-and-forth before people could realise some resources are lacking, and they would not know the reason.

      I've gathered some experience in the field of resources-in-data in the last few days, as it seems it's the only format of sound and sprite files Maelstrom 3.0.5 for OSX will accept, while others versions (I've tested on a PC) accept the .bin compressed scheme (which is just a "128 bytes header" + "padded to multiple of 128" more, all in the data fork, as far as Maelstrom is concerned). I've been able to make it use my favorite sound file (guess what... Simpsons) as well as some alternate sprites using HexEdit (which has the advantage of being able to open the resource fork and the data fork in hexadecimal the exact same way), but I'm still trying to come up with a method suitable for mass consumption (not to mention OSX native).

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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 message has been edited by Zacha Pedro (edited 04-26-2004).)

    • Quote

      Originally posted by seant:
      **Speaking for myself, I would like to see the EVNgine on the Mac start using data fork based .rsrc data. I suspect many of the limitations of the resource forks would not be an issue, then. And, while I'm dreaming, I'm going to point out that I can't see any reason why the windows EVNgine couldn't use data fork based .rsrc files for data and plugins. So, if both the Mac and Windows versions used .rsrc data files, no conversion would be necessary and the world would be a much better, safer place. Sure, the Windows version would probably have to do some endian swaping, but that seems like a minor task.

      Imagine a world where Mac and Windows EVN players could swap plugins without having to convert them. Now imagine Contraband actually implementing such a thing. Keep imagining....

      -STH

      **

      You are aware that the .rsrc files that stuffit for windows produces (on the occation that it works) are absolutely not the same as data fork rsrc files on a mac, right? (They are actually macbinary encoded plugins, which carry the .rsrc extension for reasons that baffle me).

      Why dont we make it so Mac nova can use the PC .rez format, which as we have seen here is a ready-made format that is superior to the resource fork format? Then only one version of nova would have to be rewritten (and i dont belive it would be too hard to implement convert-to-rez features into the existing mac editor, esp. if the first person to do it released thier code).
      -Az

      ------------------
      It is here. EVNEW Public Beta (url="http://"http://www.aznt.com/EVN/EVNEW")www.aznt.com/EVN/EVNEW(/url)
      Stuffit is a piece of .sit.

    • Ever since EV the engine used and accepted plugs as resource files, and we ain't gonna change that, sorry, plus I think it's practical to use resource manager routines to do the work (a resource manager clone has had to be written for the PC version). It makes indeed as much sense for Mac Nova to use .rez files as it makes for PC Nova to use .rsrc. However, correct me if I'm wrong, but I'm under the impression that a .bin encoded resource file (which the .rsrc seems to be) is just a 128 byte header+resource fork padded to multiple of 128 bytes, if I'm reading well the specs available (url="http://"http://www.lazerware.com/formats/macbinary.html")here(/url). But indeed the fact it bears the rsrc extension baffles me too. I agree Stuffit is hard to use on a PC (not to mention an outdated version must be used), but the already released plug won't convert themselves, so we must still do these odd workarounds we all know, all this mess seems awkward but it's actually for the better.

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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.

    • When reading the specs another time to see if I could draw other conclusions from it, something suddenly hit me. See those system reserved spaces (between the header and the beginning of the resources data, and in the entries for individual resources), which are not documented to my knowledge and probably will never be. It means only the resource manager can fill them. Therefore, it's impossible to create a valid resource format, even in the data fok, on something else than a (possibly emulated) Mac. It would be impossible for EVNEW to create .bin files that would work on Macs if WinNova used them. It's impossible to convert a .rez file in a .bin'ed plug on a PC. Etc, etc...

      ------------------
      The (url="http://"https://secure.ambrosiasw.com/cgi-bin/store/hazel.cgi?action=serve&item;=breakdown.html&BREAKDOWN;_SKUID=1480")Ambrosia Mac CD(/url) with other registrations - 5$. Paying for (url="http://"http://www.ambrosiasw.com/games/evn/")EV Nova(/url) as it's such a great game - 30$.
      The (url="http://"http://www.ambrosiasw.com/games/evn/tshirts.html")1337 EV Nova T-shirt(/url) - 22$. The (url="http://"http://w00tware.ev-nova.net/")NovaTools(/url) 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.