don't click here

Song Tempo

Discussion in 'Engineering & Reverse Engineering' started by saxman, Jun 15, 2009.

Thread Status:
Not open for further replies.
  1. saxman

    saxman

    Oldbie Tech Member
    How does Sonic 2 know how fast to make a song when Sonic picks up a pair of super sneakers? Does each song have a specific value given to it, or is there some other means of speeding the music up?

    I was betting on a specific value increase for all songs, but measuring each song's tempo, I'm finding they're all a little different.
     
  2. Puto

    Puto

    Shin'ichi Kudō, detective. Tech Member
    2,013
    0
    16
    Portugal, Oeiras
    Part of Team Megamix, but haven't done any actual work in ages.
    There's a table with speed shoes tempo values for all songs, at least in Sonic 1.
     
  3. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Oh, so that's why in many hacks some songs slow down when using the speed shoes :o

    Sonic 3D is more cheap in that sense - it just changes the tempo variable to 8 apparently >_>'

    Code (ASM):
    1. jsr         StopZ80
    2. move.b      #8,($A01C08).l
    3. move.w      #0,($A11100).l
    EDIT: why doesn't the asm tag preserve multiple spaces? =|
     
  4. Mairtrus

    Mairtrus

    Get a load of this!! Tech Member
    27
    0
    0
    Mendoza, Argentina
    Sonic Z. The Z DOESN'T means nothing.
    As Puto said, there is a table located in zbyte_1214 which has the speed up tempo. The specified value is loaded in $19B7 (Z80 mem) during the load song subroutine and loaded in the main song when the Speed Up subroutine is called.
     
  5. Metal Knuckles

    Metal Knuckles

    HAVE SOME FUN WITH MIKU Member
    4,942
    0
    0
    New Hampshire, USA
    Shadow Alpha, an awesome hack of Sonic 1
    They use different tempos for different songs? I thought they all increased the same amount.
     
  6. nineko

    nineko

    I am the Holy Cat Tech Member
    6,309
    486
    63
    italy
    This isn't possible because of the way SMPS tempos work in Sonic 1. The second tempo byte tells the game how many frames (out of 256) should be taken in account when the song routine calculates the notes' lengths. For this reason the difference between tempo 2 and tempo 3 is different from the difference between 3 and 4. So they have to be hardcoded.
     
Thread Status:
Not open for further replies.