Thanks a lot, that will really help me with figuring out what's what, once I complete my decompresser program, I'll check out what's going on in the separate files. I take it the pointers are pointing to the compressed locations?
Also, the number after the NCB magic number is the length of the archive, that much I know. But most headers seem to be pretty much empty aside from the magic number and the file length.
I checked out the bit of output I got from GBADecmpDemo from sc.bin and it looks pretty interesting after the header:
10 00 00 00 51 02 00 00 60 09 00 00 04 00 00 00
D4 00 00 00 10 01 00 00 32 01 00 00 74 01 00 00
A4 01 00 00 E0 01 00 00 04 02 00 00 56 02 00 00
94 02 00 00 1E 03 00 00 52 03 00 00 84 03 00 00
E2 03 00 00 18 04 00 00 4A 04 00 00 74 04 00 00
A2 04 00 00 DC 04 00 00 FC 04 00 00 32 05 00 00
This continues more or less, some parts being slightly out of place and such right down to about A0
then there's a HUGE gap between that and the next part, which is pretty dense with all sorts of values, but FF and 00 showing up on occasion, sometimes a couple times in a row.
I'm really not sure what to make of this.
Also, it could be improperly decompressed, so I'm not going to do anything according to this quite yet, I'm gonna wait till I can confirm that the original filoe was built the same way, but it looks to me like possibly a pointer table and text... (though I'm rather inexperienced). I'm just looking for speculation on whether you think it is or not.
UPDATE:
I found an implementation of LZ77 in C code that I'm going to use. I'm not sure how accurate it is to the algorithm used in GBA/DS, but I guess if I need to I can get a rom to test it on where we know what the result should be.. (anyone know a rom with some LZ77 compressed graphics I could use?)
I'm gonna rewrite it in C# (because that's what I have installed for programming right now, since I haven't written a proper line of code in 2 or 3 years now) and see what I can get with it.
I'm also working on a tool for script dumping. It'll be a generic tool geared towards reading a table file and displaying the text contents described by that table, so you can use it to locate the script by looking at it, then all you'll have to do is tell it the offset to start at, and end at, and it'll dump it into a file for you.
Of course, this is just a rough idea, and is subject to change. I may have all my tools separate or in one program, depending on how I feel about it.
Looks like I'm finally making some headway in this damned game. :crazy: