don't click here

Sonic 3 Samples

Discussion in 'Engineering & Reverse Engineering' started by Stealth, Sep 15, 2006.

  1. Stealth

    Stealth

    Tech Member
    594
    30
    28
    Sonic Mania, HCGE, Sonic Megamix, SonED2, [...]
    Tweaker and I had talked about these three strange areas of Sonic 3 that started with the same set of data before, and I finally decided to have a look at them. It turns out that all three of them are DAC banks. Because the full sample set was too large to fit into a single bank, they were spanned across three ($E0000 [$81-$9A], $E8000 [$9B-$AA], $F0000 [$AB-$C0]), with the full pointer list and setup table repeated at the beginning of each one (presumeably to avoid performing an extra subtract). For each bank, though, the setup table entries corresponding with data that is stored in ANOTHER bank don't have completely accurate settings (the size setting is 0, for one).

    I went through each bank and found the start and end location of each sample and extracted them:
    Raw
    Decompressed
    Wav Files

    The raw set are the data exactly as it's stored in-game. The decompressed set were decompressed using jman's "Sonic 1" sample decompressor, and the wav file versions are the decompressed data with a wav header attatched so they can be played back with a wav file player. I get the impression that their "native" playback rate is 11khz, as opposed to the 16khz rate used by some other games, so the wav files were loaded and saved as 8bit 11khz mono. In-game, they're controlled by a playback rate modifier (the first byte in each setup entry), which is why some of them will end up sounding slightly different, and why some files are labeled as more than one sample ID (the same sample played at a different rate)

    Sonic & Knuckles contains the first bank with the same data, except that sample $9B was added on. It's songs don't use any of the other samples, though, and so they weren't included, and are read from their positions in the Sonic 3 ROM when they're needed by S3&K

    You'll also notice that there's a sample labeled "X" rather than with an ID. That sample is in the last bank, and does NOT have pointer and setup entries (it is unreferenced and unused). It's simply stuck between two of the other samples that ARE used. As for the rest.. how many can you recognize?
     
  2. Vangar

    Vangar

    Member
    3,654
    62
    28
    "COME ON!"

    Ha! I knew it said Come on! Some people said otherwise, but this new information proves it.

    Nice work again Stealth!
     
  3. Varion Icaria

    Varion Icaria

    He's waiting.... Tech Member
    1,019
    11
    18
    S4: Cybernetic Outbreak
    This saves me a lot of searching, Great job you both!
     
  4. ICEknight

    ICEknight

    Researcher Researcher
    Hmm, that "X" sample might have been used in one of MJ's tracks. Very interesting.

    Thanks for sharing!
     
  5. Varion Icaria

    Varion Icaria

    He's waiting.... Tech Member
    1,019
    11
    18
    S4: Cybernetic Outbreak
    Quick Question, Where's Jman's S1 Sample Decompressor?

    Edit: and does it compress aswell?
     
  6. Metal Man88

    Metal Man88

    Time Traveller Oldbie
    2,137
    0
    0
    Whoo. Now what I'd want to hear would be the original songs using these instead of their compressed versions. Quite interesting.
     
  7. drx

    drx

    mfw Researcher
    2,254
    350
    63
    :rolleyes:
    Nice, good job, thanks.
     
  8. jman2050

    jman2050

    Teh Sonik Haker Tech Member
    634
    4
    18
    yes it does. From an earlier thread. I'll release the source code too if anyone is interested.

     
  9. FuzzballFox

    FuzzballFox

    Hmmmmm Member
    575
    0
    0
    UK - Hampshire
    Nothing anymore
    Many are not used right? We know about the connection between MJ and S3, is this is what's left of the original tracks written by MJ himself perhaps?
     
  10. Hi, great job getting the samples! The download link doesn't work though, and I want to use the samples for some compositions. Thanks!
     
  11. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
  12. Thanks Nineko, that's great.