-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCsL / cast lists #9
Comments
Nope, we already figured that out - or rather, it was already implemented in Schockabsorber. That's all done in the KEY* section. If I recall correctly, if the ID in the key section is greater than 1024 (since, I believe, the maximum number of casts is 1000) then the ID instead refers to which cast library the item is owned by. So the KEY* section takes on two purposes in that sense. Also, haven't had a chance to document this but I should add: the IDs in MCsL refer to the CAS* chunks, based on their index in mmap. The CAS* are a table of the IDs of CASt chunks in the mmap table, iirc, and the chunks those CASt rely on are found using KEY*. So it goes MCsL > CAS* > mmap > CASt >KEY* > Data (such as BITD, snd , etc.) note that multiple chunks can be linked to one CASt in KEY*, for example the sound headers can be seperate of the sound itself using sndH and sndS This is one of my more recent realizations and it is with this that I finally begin to understand the structure somewhat. Also, note that LCsM isn't present in older Director movies as not all versions of Director have cast libraries. |
Wow, that's a weird implementation. I don't really see how it would add up though, i'm testing out with a game dxr here (same as on the screenshot) that has 4 internal cast libraries, does it just modulo 1024 then? |
No; take a look at the KEY* section. If an item belongs to the first cast library it'll have an ID of 0x0400. If it belongs to the second it'll have an ID of 0x0401. If it belongs to the third it'll have an ID of 0x0402. I assume it was done this way to maintain some kind of compatibility with Director 4. If the file is little-endian, it'll be in reverse and be 0x0004, 0x0104, 0x0204 etc. so it IS one ID, not two numbers. |
But how does it retain the cast member numbers in the other libraries then? Just appending everything? Pretty confused. |
I don't know what you're asking. CAS* refers to IDs in the mmap, not KEY*. The purpose of KEY* is to establish a relationship of being linked together. As in, "this CASt is linked to this BITD" or "this CASt is linked to this snd " or "this member is linked to this library" |
So it links the entries to the cast library itself and not a CASt? How would it then know what member to link to? |
CAS* contains the IDs of CASt chunks in the mmap. So in examples one, two, and three above, you can see how you'd go from CASt to BITD for example. And CAS* contains IDs of CASt chunks. And you can tell which cast library a CAS* represents from looking at the KEY* chunk, like in example four. Then you can find the name of that cast library from MCsL. Sorry if I'm doing a poor job of explaining it but frankly I find it confusing myself. |
yeah this is way too confusing for me, and i just remembered there are two key* entries so i got those confused too i think i'm starting to understand it though, data entries and cast entries are different and links aren't really static but the thing i wanted with all of this is just getting a list of all the cast members in their correct libraries, and i ran into so much other stuff i can barely focus anymore |
OK. The CAS* chunks are a list of IDs of CASt chunks. In other words, CAS* = list of things in a single cast library. The KEY* chunk says which cast library that is. First, second third... and it does this using IDs greater or equal to 1024. The KEY* section also has another purpose, which is to establish a link between CASt chunks and the actual data they refer to, and this is done with just normal IDs. So once you have your list of CASt chunks, from the CAS* chunks - that's how you get to the data. |
oh so it's a specific case when it's cas*? well alright i still don't understand how all this ties together though, but i have several diagnoses so i guess it's not that strange ¯\(ツ)/¯ |
No, it's not specific to CAS*. For example an Lctx can also be linked to a cast library. But for your purposes you probably care about CAS* the most. The thing that makes it a link to a cast library is the ID being greater than or equal to 1024. |
i think i'm getting it now, but what about the link id being like 1500? that's on other files but still |
holy.................... All of my notes on MCsL came from my own research, aided by a friend, since i couldn't run director... So some MOVIES lack it, also... great... I didn't know how these link-up to CAS* was yet discovered... @tomysshadow I will ignore pretty much, everything else that was said here |
It might help if you showed the actual hex view, also? I will try to look at MCsL again very soon |
@Brian151 I checked out MBARN.DXR and it's completely different from what i've been working with, must have been a big overhaul in director between those games |
k thx |
@MrBrax [analysis of two MCsL, @MrBrax 's example, and the one for Spybotics: The Nightfall Incident]
|
Here's one for a DXR with external casts: |
Will analyze tomorrow... |
Some more discoveries: Strings in older versions (e.g. MBARN.DXR) doesn't have a null byte at the end. Checking out dirapi.dll, found some proper definitions: |
I think I see what's going on with the offset tables. I suspected they were like CASt, I was right (mostly), what threw me off is this: divide the length of ANY offset table by four, you will ALWAYS have Now, what might cause this? I will have to revise my notes
may actually be THIS:
fun stuff... I will try to get the latest stuff up, but that might not happen till tomorrow extra byte is not just a byte, it's another string, the external .cst file path |
I should mention that I've found the code that creates CASt chunks and can
confirm that the only guaranteed similarity between CASt chunks is the type
number, the layout of the chunk is completely different depending on its
type and any similarity between these types is pure coincidence.
There are 15 types in total but I still can't tell what all of them are. 3
and 7 both use STXT chunks, I suspect one is for a button and the other is
some other menu item or plaintext. One of them is for Rich Text as well,
which use RTE0/RTE1/RTE2 chunks.
Currently I'm investigating the SaveMovie function and how it creates the
mmap. When saving the movie it creates the mmap last, after everything else
has been added, oddly enough.
…On Mon, Jul 10, 2017, 2:45 AM MrBrax ***@***.***> wrote:
yeah the file path is most likely correct
[image: 1499676297883]
<https://user-images.githubusercontent.com/1517911/28009752-d9d7927a-655c-11e7-9cb6-5cce8b19f8f4.png>
all this seems right, it's just those offsets/values in the beginning now
it feels like
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMB-6yQqRhvnK71gvAtU5tEWuRgFwRIjks5sMeS4gaJpZM4OPhz1>
.
|
i've had the "cast fields" array thing work on every cast so far, remember that director versions differ a lot |
i'll reply later... busy |
right, so... @tomysshadow CASt types: STXT: @MrBrax That's all Also, again... let's keep issues to their primary topic. That, or we can create a generic "sections" issue? But, let's try not to have multiple and fairly separate ideas be discussed on same thread, and especially if it should happen on multiple threads. Much easier to keep track of Hope everyone understands? |
let's see, I tend to have easily up to 10 unnamed 'files' when I'm doing stuff with this format. Or, I have 10-20 that I just click-dragged... So, I can relate to forgetting these things... So, is it safe to close this issue, now? |
closing, because this matter is mostly resolved |
Due to this: https://github.com/Brian151/OpenShockwave/blob/master/docu/FormatNotes.txt#L334
and me getting some kind of success reading the format, is the spec there correct, or is it just guessing?
Here's some progress I've made:

(albeit it breaks if casts are external and uses paths)
But i can't figure out how it assigns the cast members to the cast library, i think this is where you people are stuck too, yeah?
One interesting note is that on some of the CAS* entries, the first integer more often than not matches up with what cast number the first member has.
The text was updated successfully, but these errors were encountered: