Secret of Evermore SPC Format - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Hacks, Resources and Tutorials (https://www.ff6hacking.com/forums/forum-1.html) +--- Forum: Opera House Rehearsal Room (https://www.ff6hacking.com/forums/forum-71.html) +---- Forum: BRR Laboratories (https://www.ff6hacking.com/forums/forum-75.html) +---- Thread: Secret of Evermore SPC Format (/thread-3638.html) |
Secret of Evermore SPC Format - madsiur - 03-04-2018 I'm trying to extract SoE BRR samples. The ROM map state 71 music related pointers (019903-0199D7). (71 songs?) If we take one of them, first two bytes are number of 7 bytes data. As an example, 0AB2E1-0AB3D0 is same size as 0x22 * 0x07. Now for each 7 bytes AA BB CC DD EE FF GG, you get BBAA bytes at offset EEDDCC. From what I was it's either 2, 4, 6, 8 or a big amount of bytes. When it's not 2, 4, 6 or 8 bytes, it's a BRR sample (I checked 3-4 so far). It lands directly on the 1st byte of BRR data. Each BRR have though 3 bytes previous to their 1st data byte and it's often two 00 and a value like 5F or 7F. I'm not sure what this header does. As for bytes FF GG, it's definitely a GGFF format but I can't figure it out, seems like a (RAM?) offset.. I guess the ROM map guy figured as much, maybe more. I think I might have enough to extract BRR samples but I'd like to understand more the song format, at least this data related to it. There's also the pitch modification, ADSR and looping data that might be extracted in this sequence but I'm not sure.. So if anyone has an idea about how to expand SoE music knowledge, your help is appreciated. Edit: Update! Edit2: More updates! [attachment=313] Code: // offset 0AB2E1-0AB3D0 Pointers Code: // offset 019903-0199D7 RE: Secret of Evermore SPC Format - JCE3000GT - 03-04-2018 Wow, that's odd. Maybe because it was coded outside of Square in Japan they used some sort of different SPC code and not the standard Square SPC core? RE: Secret of Evermore SPC Format - madsiur - 03-04-2018 (03-04-2018, 09:31 PM)JCE3000GT Wrote: Wow, that's odd. Maybe because it was coded outside of Square in Japan they used some sort of different SPC code and not the standard Square SPC core? The SPC core is probably same revision as games released the same year or so, maybe with minor differences, it's just the way to fetch the data that is odd. I will know when I get the pitch modification 2 bytes data. While the looping data is self explanatory and ADSR data is a SPC-700 fixed 2 bytes format, I suspect the pitch modification data might not behave the same on different SPC core revisions. It's hard to tell what the data do but it look it differ from games to games. I've looked at FF6 SPC disassembly and 1st byte affect the Master Pitch Multiplier and 2nd byte affect the Master Pitch Multiplier envelope change rate. I don't know yet as an example how changing from E0 to A0 the 1st byte do on the actual pitch but the behavior could be different from games to games. The most obvious difference is FF4 where the pitch data is 1 byte and the absence of ADSR data for instruments. RE: Secret of Evermore SPC Format - JCE3000GT - 03-06-2018 (03-04-2018, 11:46 PM)madsiur Wrote:(03-04-2018, 09:31 PM)JCE3000GT Wrote: Wow, that's odd. Maybe because it was coded outside of Square in Japan they used some sort of different SPC code and not the standard Square SPC core? That makes sense actually. RE: Secret of Evermore SPC Format - madsiur - 03-17-2018 I've generated a disassembly with what I knew, and assumed for the document in a somewhat lazy way that last two bytes of the 7 bytes format was a RAM offset. I've also located the SPC routines which are included as well. Now the hardest part will be identifying what the fetched data by a 7 bytes command actually mean. More precisely if ADSR, pitch and loop data is somewhere there. For the disassembly I also just assumed any byte fetch of more than 0xFF bytes was a BRR sample, it is not the most precise way but I have no other way for the moment to draw a line. Edit: New version with BRR samples detection and better formatting! Edit2: Fixed an error preventing display of 1/3 of all songs. Edit3: Fixed more stuff related to BRR data! Edit4: More polishing and formatting. [attachment=312] |