don't click here

Editing Sonic 1's SEGA sound?

Discussion in 'Engineering & Reverse Engineering' started by ALittleTooFast, Jul 28, 2017.

  1. ALittleTooFast

    ALittleTooFast

    How about that? Member
    Some hacks that I see go out of their way to actually change the SEGA sound that plays before the title screen, to something else entirely. I'm curious as to how it's done, and I haven't seen really any guides on this when editing music and sounds. And I'm guessing that's because editing the SEGA sound isn't as easy?
    Of course, I could be missing a very obvious guide like an idiot, but that doesn't seem to be the case? I do get a kick out of it when it's done though, and I do want to give it a shot for whenever I eventually make a proper Sonic 1 hack.
     
  2. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    In the GitHub disassembly, it's this file: https://github.com/sonicretro/s1disasm/blob/master/sound/dac/segapcm.bin

    The file must be 32 KB or less. I don't remember the exact sampling rate, but it's encoded as mono 8-bit unsigned raw PCM. (No WAV header.)
     
  3. Devon

    Devon

    I think I'm paranoid Tech Member
    1,175
    1,315
    93
    your mom
    16000 Hz, I believe.
     
  4. MainMemory

    MainMemory

    Kate the Wolf Tech Member
    4,716
    306
    63
    SonLVL
    The sample rate is 16000Hz. You can use a program such as Audacity to export a sound to raw PCM. Set the Project Rate in the lower left to 16000, make sure the track is mono (Tracks -> Stereo Track to Mono), go to File -> Export Audio, set the type to "Other uncompressed files", set the header to "RAW (header-less)", and the encoding to "Unsigned 8-bit PCM".

    It is also possible to get higher or lower sample rates by adjusting the timing of the playback loop. Knuckles' Emerald Hunt has 24000Hz PCM samples, which is nearly the limit of what the Mega Drive can produce.
     
  5. ALittleTooFast

    ALittleTooFast

    How about that? Member
    Alright then, cool. So I'm guessing that I have to use SOME to take the raw PCM and put it into the bin, or do I use a different program?
    Edit: Nevermind what I just asked here, I'm an idiot who didn't realize I'm inserting the audio into the bin through Audacity.
    Unless I'm not supposed to, which would make me a double idiot. :v:
     
  6. nineko

    nineko

    I am the Holy Cat Tech Member
    6,289
    475
    63
    italy
    It *is* actually possible to open the whole Sonic 1 ROM as raw PCM into any audio editor of your choice and edit the Sega sound from there if you know what you're doing, but I doubt that anyone sane of mind would recommend that.

    And yes, I actually did something similar when I experimented with the Snow Bros and the Mean Bean Machine ROMs a few years ago, but that's for another topic.
     
  7. ALittleTooFast

    ALittleTooFast

    How about that? Member
    Okay, some things did throw me off, but I managed to figure out that I could in fact take the audio and import it into the SEGA Sound's bin as long as I did get the format and size right.
    Thanks guys!
     
  8. Does this apply to sonic 3 and Knuckles too?