SID and SSA resource types ========================== I don't really know what either of these resource types is for yet but I have been conjecturing that each SID is paired with an AIF and contains metadata about the AIF resource. The SSA resources appear to associate a group of SIDs with each other. I've extracted some SIDs and SSAs below and annotated a few values. (All little-endian unless otherwise indicated). 1st SID from Gba.PRX (index $02, byte offset $4B0) ----------------------------- 53 49 44 00 ; ASCII 'SID\0' B4 0F 00 00 ; rsrc ID: 4020 00 00 00 00 00 00 00 00 00 00 00 00 ; unknown (always 12 bytes of 00?) 00 00 40 00 ; This is zero in all other ; rsrc headers I've seen! 56 00 00 00 ; length of entire rsrc (86 bytes) BB 7E 6E 01 ; unknown (magic number for SID?) 00 00 A4 24 00 00 00 00 00 00 00 FF 00 01 00 00 ; SID data 03 84 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 01 00 00 00 0F 00 03 00 00 00 00 00 01 00 00 The resource ID is $00000FB4 here, but in the Gba.PRX table of contents it is $00400FB4. Also, the value at byte 20 ($14) is zero in all other resource headers that I've seen, but here it is $00400000. Is it a coincidence that this value is the difference between the resource IDs in the TOC and in this resource header? I was expecting to find the ID of one of the AIFs in Gba.PRX somewhere within the SID resource data, which would support my hypthesis that the SIDs and AIFs are paired. I don't see any exact matches. The first four bytes (00 00 A4 24) appear similar to the ID of the AIF that is entry $12 in the TOC: $0040A424, but that would mean the bytes 00 00 A4 24 are in big-endian order which seems strange given that all of the other values I've identified within PRX files so far appear to be little-endian. (I reordered the bytes of the AIF ID $0040A424). 2nd SID from Gba.PRX (index $0E, byte offset $9ABA4) ------------------------------- 53 49 44 00 ; ASCII 'SID\0' 68 10 00 00 ; rsrc ID: 4200 00 00 00 00 00 00 00 00 00 00 00 00 ; unknown (always 12 bytes of 00?) 00 00 40 00 ; this is $00400000 again 56 00 00 00 ; length (86 bytes again) BB 7E 6E 01 ; unknown (magic number for SID?) 00 00 9D 08 00 00 00 00 00 00 00 FF 00 01 00 00 ; SID data 01 A9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 01 00 00 00 08 00 02 4C CD 00 00 00 01 00 00 Once again, there is a difference of $00400000 between the TOC ID for this resource and the ID within this resource header (or at least there is between the bytes that I am interpreting as the IDs). Also, the value at byte 20 ($14) is again $00400000. I verified that the same is true for every other SID in Gba.PRX and found that it is true for the AIF and SSA resources too. And again, the first four bytes (00 00 9D 08) of the SID data appear to correspond to one of the AIF IDs: $00409D08 (entry $03) in the TOC. After examining all of the other SIDs -- and assuming that these bytes are big-endian and that the resource IDs in this file are all $00400000 less than in the TOC -- I have found a one-to-one correspondence between the SIDs and the AIFs in Gba.PRX! 1st SSA from Gba.PRX (index $0F, byte offset $9ABFA) ------------------------------- 53 53 41 00 ; ASCII 'SSA\0' 68 10 00 00 ; rsrc ID: 4200 00 00 00 00 00 00 00 00 00 00 00 00 ; unknown (always 12 bytes of 00?) 00 00 40 00 ; this is $00400000 also 32 00 00 00 ; length (50 bytes) 01 04 7E D1 ; unknown (magic number for SSA?) 04 00 ; num of IDs to follow 68 10 00 00 ; list of IDs for SID rsrcs 69 10 00 00 6A 10 00 00 6B 10 00 00 Well, it appears that an SSA resource associates a group of SID resources together. Are the sounds played sequentially or simultaneously or is there some other purpose here? Perhaps the reason can be found out by identifying which sounds form a group and then paying attention to how they are used in the game ... Values are little-endian. 3rd SID from Gba.PRX (index $10, byte offset $9AC2C) ------------------------------- 53 49 44 00 ; ASCII 'SID\0' 69 10 00 00 ; rsrc ID: 4201 00 00 00 00 00 00 00 00 00 00 00 00 ; unknown (always 12 bytes of 00?) 00 00 40 00 ; this is $00400000 again 56 00 00 00 ; length (86 bytes again) BB 7E 6E 01 ; unknown (magic number for SID?) 00 00 9D 09 00 00 00 00 00 00 00 FF 00 01 00 00 ; SID data 01 A9 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00 01 00 00 00 08 00 02 4C CD 00 00 00 01 00 00 This SID is grouped with the previous SID by the SSA shown above. Other than the different resource IDs, the two are identical. Several other values are the same as the 1st SID above too (the 2nd thru 4th, 6th thru 10th, and 13th 4-byte groups). 2nd SSA from Gba.PRX (index $15, byte offset $AC630) ------------------------------- 53 53 41 00 ; ASCII 'SSA\0' 72 10 00 00 ; rsrc ID: 4200 00 00 00 00 00 00 00 00 00 00 00 00 ; unknown (always 12 bytes of 00?) 00 00 40 00 ; this is $00400000 also 2E 00 00 00 ; length (46 bytes) 01 04 7E D1 ; unknown (magic number for SSA?) 03 00 ; num of IDs to follow 72 10 00 00 ; list of IDs for SID rsrcs 73 10 00 00 74 10 00 00 Pretty similar to the previous SSA, but groups together 3 SIDs instead.