News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Squaresoft BRR Database  (Read 1337 times)

Madsiur

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 173
  • FF6 hacker
    • View Profile
Squaresoft BRR Database
« on: March 17, 2018, 08:00:31 pm »


This is a project of ripping directly from ROMs BRR Samples from Satellaview and SFC Squaresoft game, all the ones Squaresoft was publisher or developer if possible while having in mind easy import into FF3us. I started a few weeks ago gathering BRR samples and locating ADSR, Pitch and loop data. I host the collection at ff6hacking.com, see this thread. I also developed a wiki section that should grow with more technical info. BRR related offsets are compiled here.

All samples from all games (BRR + WAV) (19MB)

Game that samples were completely (or almost completely) extracted with ADSR, Pitch and Loop data are the following:

Bahamut Lagoon
Chrono Trigger
Dynami Tracer
Final Fantasy 4
Final Fantasy 5
Final Fantasy 6
Front Mission
Front Mission: Gundam Hazard
Hanjuku Hero
Koi ha Balance
Live a Live
Mystic Quest
Radical Dreamers
Romancing SaGa
Romancing SaGa 2
Romancing SaGa 3
Seiken Densetsu 3
Super Mario RPG
Secret of Mana
Treasure Conflix
Treasure of the Rudras


Some games data  are less compatible (direct copy / paste) with FF6, especially for pitch data and data from first SPC Cores (FF4, Romancing Saga, etc.). This has consequence that you might require trial and error to find a suitable data for a sample from these games. I'm investigating the two bytes format of the FF6 Pitch data to be able to easily adjust this value but the pitch adjustment routine of FF6 SPC core is still beyond my comprehension for now.

Two games that are making me banging my head on the wall right now are Secret of Evermore and Breath of Fire that have their own special way of storing things (and not the Squaresoft regular pattern). There is a thread on SoE and one on BoF over at ff6hacking.com. I think I am on par with RHDN SoE ROM map as far as music offsets goes. This is the "disassembly" I have generated today. If anyone has BRR samples related info or info on ADSR data, pitch data (if any) and loop data (if any) for these two specific game, you would be very kind if you share them.

The SPC - Hard Core sub-forum over at Slick Productions was a really great help during this journey (that is not over yet). Every game I had a bit of info about I was able to locate rest of data fast and easily because Squaresoft had more or less the same pattern for the majority of its games. So a big thank to JCE3000GT and other folks there. Some info in some threads here from Bregalad and over at NESdev.com was also helpful for understanding some things and brrtools was used to convert BRR samples to WAV samples so thanks for this.
« Last Edit: March 18, 2018, 02:14:18 pm by Madsiur »

Sara-chan

  • RHDN Patreon Supporter!
  • Jr. Member
  • *****
  • Posts: 84
  • Only one "Human"
    • View Profile
    • Sara's Homepage
Re: Squaresoft BRR Database
« Reply #1 on: March 17, 2018, 08:06:19 pm »
It's no surprise that Breath of Fire and Secret of Evermore would be a problem.
Breath of Fire isn't a Square game at all. Square only did the localization. So... It wouldn't use a Square-like engine.
Secret of Evermore was developed in outside of Japan. in its own engine without the original SquareSoft teams, so it wouldn't use a similar engine either.
(They unfortunately could not get the source code to Secret of Mana to use as a base and had to do everything from scratch.)
So these games would be in different enough of engines (including the sound/music engine) to naturally be issues, alas. x_x
Ooh, they said this planet was cold, but it's sooo hot here!

Madsiur

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 173
  • FF6 hacker
    • View Profile
Re: Squaresoft BRR Database
« Reply #2 on: March 17, 2018, 08:22:08 pm »
It's no surprise that Breath of Fire and Secret of Evermore would be a problem.
Breath of Fire isn't a Square game at all. Square only did the localization. So... It wouldn't use a Square-like engine.
Secret of Evermore was developed in outside of Japan. in its own engine without the original SquareSoft teams, so it wouldn't use a similar engine either.

Yeah I was curious about the involvement of Squaresoft on BoF.. I though they had some involvement with development.. What you say explain the situation for both games. I have some BoF notes and I think I located what might be a sample list with sample related data maybe. I made progress on both games so I'm not desperate. The game that are "left to do" are Alcahest, Breath of Fire, Secret of Evermore and Treasure Hunter G. After these or even before I finish I might look into other game or other RPGs like the Lufia series. What really itch me is also the Squaresoft pitch data (2 bytes per sample except for FF4 and Romancing Saga) that may be formatted differently depending on the SPC core used, I'm not sure.

Bregalad

  • Hero Member
  • *****
  • Posts: 2536
    • View Profile
Re: Squaresoft BRR Database
« Reply #3 on: March 18, 2018, 04:42:44 pm »
Quote
The game that are "left to do" are Alcahest, Breath of Fire, Secret of Evermore and Treasure Hunter G.
None of them are Squaresoft games, exept SoE which was made by Squaresoft USA which was almost compltely distinct from Squaresoft japan.

Also is there any reason why limit the BRR database to Squaresoft games ?! Because most of those used sounds from regular synthesizers of the time, you could find similar sounds in other games too. The samples themselves were for the most part not made by Square (at best they were edited).

Madsiur

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 173
  • FF6 hacker
    • View Profile
Re: Squaresoft BRR Database
« Reply #4 on: March 18, 2018, 05:59:05 pm »
None of them are Squaresoft games, exept SoE which was made by Squaresoft USA which was almost compltely distinct from Squaresoft japan.

I was fine with including in the list also those where Squaresoft was just the publisher and not the developer and I kinda just followed the wikipedia page on the subject without really considering Squaresoft involvement in development.

Also is there any reason why limit the BRR database to Squaresoft games ?! Because most of those used sounds from regular synthesizers of the time, you could find similar sounds in other games too. The samples themselves were for the most part not made by Square (at best they were edited).

The main reason is that for some game you could copy-paste the ADSR, pitch and loop data directly into FF6. Some other game there is only the pitch data to modify. Some game you just had to inverted byte 1 and 2 for ADSR and Pitch Data and instrument sound good in FF6. So first reason is those similarities. If ADSR data is a copy of the format of the SPC-700 dedicated ADSR registers then other non Squaresoft game could have compatible data, same goes for the loop inverted word.

Second reason is that there was already existing info on some Squaresoft games, and Squaresoft had often the pattern to pack BRR pointers, SPC pointers, ADSR, Pitch and loop data in a single block, so extraction was easy. I plan on looking into other games but unless I start from an utility that detect BRR samples, it require more work. My script to extract require a few offsets from the game and does everything automatically, given there is like a sample pointers block.

Extracting from other non Squaresoft ROMs will likely not provide easily the 3 types of data required to make the sample sound good in FF6. So one avenue could be just ripping BRR sample by whatever method (SPC files, SNESSOR95, etc.) and then write manually the ADSR (like a default FFE0), pitch and loop data for each sample. Pitch data is a bit problematic for me because for now I rely on trial / error and luck mostly but I plan to look into the specific format of the two bytes in FF6. Ideally all game packages should have a list of FF6 compatible pitch data but for now it is the pitch data from the game samples were extracted.
« Last Edit: March 18, 2018, 06:46:22 pm by Madsiur »

GHANMI

  • Hero Member
  • *****
  • Posts: 687
    • View Profile
Re: Squaresoft BRR Database
« Reply #5 on: March 20, 2018, 08:01:10 am »
Alcahest was developed by HAL and apparently uses a similar sound engine to Arcana and Kirby Super Stars (even the same samples). Squaresoft was only the Japanese publisher.

Treasure Hunter G is a similar situation but developed by Skip. According to developer interviews the sound driver is different than earlier Skip games because Square told them to rewrite it, but still done by Skip.

Nice to see Dynami Tracers get some attention :P

Bregalad

  • Hero Member
  • *****
  • Posts: 2536
    • View Profile
Re: Squaresoft BRR Database
« Reply #6 on: March 20, 2018, 01:30:20 pm »
I was fine with including in the list also those where Squaresoft was just the publisher and not the developer

Quote
Extracting from other non Squaresoft ROMs will likely not provide easily the 3 types of data required to make the sample sound good in FF6. So one avenue could be just ripping BRR sample by whatever method (SPC files, SNESSOR95, etc.) and then write manually the ADSR (like a default FFE0), pitch and loop data for each sample. [...] Ideally all game packages should have a list of FF6 compatible pitch data but for now it is the pitch data from the game samples were extracted.
Sorry but you're contradicting yourself here, man. Games developed by other companies and published by Squaresoft, such as Alcahest or Breath of Fire (U) are not using any of Akao's sound engine and are not going to be directly insertible in FF6's engine.

Same goes with games developed by Square but not using any of Akao's engines (Secret of Evermore, Seiken Densetsu III, Bahamut Lagoon and Super Mario RPG); also games using older versions of Akao's engine such as FF4, Romancing Saga, FF5, Secret of Mana and FF Mysqic Quest will have their pitch regulated by a single byte instead of two bytes (I think); FF4 doesn't even use ADSR at all and use volume lockup tables instead so ADSR won't be compatible either.

None of this prevents you to re-use/import any sample from any SNES game, though, however, as the loop data is hardware standard so all SPC engines are using the same format, just like the BRR itself. As for ADSR it's a non-issue since you can make your own up very easily, so pitch is the only really problematic instrument parameter when copying from another game - it's quite easy to fix an instrument with trial and error but this requires that other instruments are already correctly pitched.

Also considering how simple it is to convert a non-BRR sample to BRR thank to my amazing utility, I don't see why you would limit yourself to BRR smaples :p

Madsiur

  • RHDN Patreon Supporter!
  • Full Member
  • *****
  • Posts: 173
  • FF6 hacker
    • View Profile
Re: Squaresoft BRR Database
« Reply #7 on: March 21, 2018, 12:43:45 am »
Sorry but you're contradicting yourself here, man. Games developed by other companies and published by Squaresoft, such as Alcahest or Breath of Fire (U) are not using any of Akao's sound engine and are not going to be directly insertible in FF6's engine.

Yeah first sentence of second quote was badly formulated. I never assumed all those games instrument data (especially pitch data) could be directly copy-pasted into FF6 and my intention was not to say so, but finding the loop and ADSR data if they exist for those game samples could have been helpful instead as an example doing trial errors on each sample. What I got wrong also is I thought all SNES games had a form of ADSR, loop and pitch data, having a similar purpose as FF6 data but in different format maybe.

Same goes with games developed by Square but not using any of Akao's engines (Secret of Evermore, Seiken Densetsu III, Bahamut Lagoon and Super Mario RPG); also games using older versions of Akao's engine such as FF4, Romancing Saga, FF5, Secret of Mana and FF Mysqic Quest will have their pitch regulated by a single byte instead of two bytes (I think); FF4 doesn't even use ADSR at all and use volume lockup tables instead so ADSR won't be compatible either.

I knew for FF4 and RS pitch data and I thought FF4 had ADSR data, only I had not found it and / or it was in a different format (that would be a bit counter-productive to reformat before ending in SPC-700 so this assumption made little sense). FF6-T actually use some FF4 samples, I saw the list some years ago and tsushiy had put a custom pitch data for each sample and a ADSR data for each sample (same for all samples iirc..)

SD3, Bahamut Lagoon and SMRPG have compatible ADSR and loop data it seems but have ADSR data as word instead of inverted word  (see here, here and here, BL and SMRPG had they "ADSR data" inverted but not yet SD3). These conclusion are just based on actual look of the data and I have not fully tested this in FF6 so I could be wrong and mislabeled everything for these 3 games because SMRPG  instruments still sound a bit off in FF6 with this data (maybe only due to pitch data?). Mystic Quest, SoM and FF5 have their pitch regulated on two bytes.

A question I have; is the pitch data using a base pitch different in each game in adjustment calculation? I'm not even sure this make sense as this is where my musical knowledge stop for now, I have no idea about the pitch data format and the definition of pitch on a musical level is still unknown to me, except that I know different pitches make the sample sound off / different.

I'll need to dig deeper on the actual FF6 pitch data format to understand the effect on the pitch of a sample and understand what ADSR data actually do, I understand these are weak points of mine now and that some data provided with the samples may look inaccurate but it is the data from the game the samples are from, the "finished status" of each game will not be reached until each game have all samples labeled and correct FF6-compatible data.

None of this prevents you to re-use/import any sample from any SNES game, though, however, as the loop data is hardware standard so all SPC engines are using the same format, just like the BRR itself. As for ADSR it's a non-issue since you can make your own up very easily, so pitch is the only really problematic instrument parameter when copying from another game - it's quite easy to fix an instrument with trial and error but this requires that other instruments are already correctly pitched.

Also considering how simple it is to convert a non-BRR sample to BRR thank to my amazing utility, I don't see why you would limit yourself to BRR smaples :p

Yes that was my plant to later add more games but I wanted to try to avoid just making available "flat" BRR samples with no FF6 compatible data. I think I'll make first all samples data I got 100% compatible with FF6. There was also in what I did a purpose of documentation for Squaresoft games, even if it was just a little something. I realize now I could just extract samples and make my own FF6-compatible data and don't really need to spend time on each new game code to understand how they deal with the samples.. I saw some nice threads on NESdev.com about samples creation and modification, it's something I'll look into sooner or later, same as for making a FF6 sample bundle made with wacky WAV samples :P
« Last Edit: March 21, 2018, 01:24:42 am by Madsiur »