don't click here

Changing Sonic CD past music tracks...

Discussion in 'Engineering & Reverse Engineering' started by PimpUigi, Aug 4, 2011.

  1. PimpUigi

    PimpUigi

    ------- Route Magician ------- Sonic CD Technician Member
    Will it ever be possible to change the past music in the Sega CD version of Sonic CD?
     
  2. I'm no expert at all in this regard, but if I had to guess, and you were say, using an iso+mp3, surely it just depends on what mp3's are named to whatever look up song you want to be played whereever?

    I'm probably thinking way to vague here. So apologies if this isn't the answer you're looking for.
     
  3. The problem is the past tracks are not CD tracks: They're in the main game files.
     
  4. Ritz

    Ritz

    Subhedgehog Member
    4,086
    110
    43
    I was really hoping this wouldn't be a question thread.
     
  5. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,202
    432
    63
    Japan
    The past tracks for Sonic CD are played via a series of multiple PCM samples, each PCM sample in a bank being the sound of one note to a specific instrument, drum sound or voice. These samples are played by SMPS code for an SMPS engine, however this SMPS varient is altered and designed for PCM playback of 8 PCM channels (I think it's 8, don't quote me on that).

    The following banks on the disc hold; The SMPS engine (machine code), the SMPS data for the track itself, the PCM samples (including SFX samples).

    SNCBNK1B.BIN
    SNCBNK3B.BIN
    SNCBNK4B.BIN
    SNCBNK5B.BIN
    SNCBNK6B.BIN
    SNCBNK7B.BIN
    SNCBNK8B.BIN

    I tried editing one myself once, it didn't sound great, but it was fun to play around with, I'll dig up a download link in 10 minutes.

    Edit: here we are Stardust Speedway Past. Terrible, but cool stuffs =P
     
  6. nineko

    nineko

    I am the Holy Cat Tech Member
    6,308
    486
    63
    italy
    You know, I've been considering to make a modified version of xm2smps which can target the 8 PCM channels of the Sega CD, with the additional feature that the samples in the XM files can be converted as well (within certain limitations of course). However, I'd need more documentation to do such a thing, as I know barely anything about the Sega CD smps.
     
  7. PimpUigi

    PimpUigi

    ------- Route Magician ------- Sonic CD Technician Member
    Yeah, Stardust Speedway Past is the exact track I wanted to edit too.
    Ha.
    Well, very informative. Thank you very much.

    Edit:
    I actually enjoyed the Stardust Speedway P remix you posted more than the original.
    lolol
     
  8. Tweaker

    Tweaker

    Banned
    12,387
    2
    0
    Technically speaking, editing this music is pretty easy. Managing/editing the samples is trivial and the music just uses a modified version of SMPS. I imagine the reason why nobody has done it is either a lack of location data or just a lack of practical knowledge on the subject, much like editing Sonic 2 special stages in the ROM. It's relatively simple, though.
     
  9. Andlabs

    Andlabs

    「いっきまーす」 Wiki Sysop
    2,175
    1
    0
    Writing my own MD/Genesis sound driver :D
    I have a 50%-75% complete disassembly of the engine code I can put up when I finish it (along with sample rips), which leads me to the question: what's the easiest way to make simple patches to the code (like nop-ping out instructions or replacing them with jmp or rts instructions) to test stuff — patch codes in Gens/GS? Actually modifying the ISO file? Mounting the ISO and modifying the files from there?

    For those of you who want to get a head start, conditions $F4==$F6 (jump) and due to the rather limited nature of the PCM chip's frequency system (which I still don't get 100%) expect to see crazy note offsets to keep the input data looking more like the original song and less like a MOD file with its limited octave range.
     
  10. Ritz

    Ritz

    Subhedgehog Member
    4,086
    110
    43
    What, seriously? I went in expecting white noise, but it came out pretty great. Your modesty irritates me.