"Enhanced" Sonic 2 Sound Driver

Discussion in 'Tutorials' started by MainMemory, Sep 29, 2019.

  1. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    868
    This is a standalone version of the modified version of the Sonic 2 Sound Driver created for Knuckles' Emerald Hunt by @Clownacy and @ValleyBell, along with management tools created by Clownacy and myself. Note that the driver is based on the Sonic 2 GitHub disassembly, so I cannot help you install it on a hack based on an older disassembly.

    Features:
    • Support for music & SFX from Sonic 1, Sonic 2 (Beta), Sonic 3 & Knuckles (no UVB), and Sonic 3D Blast.
    • Support for DAC SFX (voice clips/samples).
    • S3K-style tempo control (no manually setting Speed Shoes tempos).
    • PCM sample support.
    • Tools make it easy to manage music, SFX, and DAC samples with INI files.
    • Automatic bank management and Saxman compression support.
    • Music/SFX title display in Sound Test.
    Installation:
    For everyone else, the changes are too numerous for me to explain right now, but I will give you some basic directions. First you should download https://github.com/MainMemory/s2-sound-driver-plus somewhere so you have access to all the files, as well as a working example of the driver. Take the entire sound folder from the repo and replace your existing folder with it. You may want to be careful with this if you already have custom sounds in your hack. You should also copy the build_source and Win32 folders, as well as build.bat and all the EXE/DLL/PDB files in the main folder. Now, there are four additional files that need editing: s2.asm, s2.constants.asm, s2.macros.asm, and s2.sounddriver.asm. s2.sounddriver.asm should be copied directly from the repo into your hack, and you can check https://github.com/sonicretro/s2dis...:master#diff-f11afe706d6935cf419c76a080a8f6ac to see a comparison between the current S2 disasm and my sound driver's code. That should give you an idea of where to make changes.
     
    Trickster, Crash, MGHACKS and 4 others like this.
  2. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    868
    Update: I've fixed several bugs in the disassembly thanks to @KaikeKTH, including the music tool not working, egg capsules prematurely activating, the level select sound test not working properly, CPU Tails using Sonic's voice clips, and the 1up jingle not restoring uncompressed music.
     
    Pokepunch, kenny0989 and ProjectFM like this.