Sonic CD Quirks/Deconstruction

Discussion in 'Discussion & Q&A' started by Devon, Jul 11, 2022.

  1. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,472
    Location:
    your mom
    If anyone cares, there's a Bluesky account for this stuff, alongside code and data breakdowns from other classic Sonic titles, including the remakes.
     
    ProjectFM, JGamer2151 and Nik Pi like this.
  2. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,472
    Location:
    your mom
    Visual example:
     
    ProjectFM likes this.
  3. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,472
    Location:
    your mom
    A brief breakdown of how the peelout and spindash are charged up in the original Sega CD version of Sonic CD. This is basically why the peelout feels faster than the spindash. Despite the same max charge speed, the peelout has a faster charge rate and charge time.


     
    Last edited: Nov 26, 2024
    ProjectFM likes this.
  4. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,472
    Location:
    your mom
    A breakdown of the differences in the peelout and spindash between the original and 2011 remake.
     
    Selbi and DeltaW like this.
  5. Devon

    Devon Please do not contact me, overwhelmed with stuff Member

    Joined:
    Aug 26, 2013
    Messages:
    1,472
    Location:
    your mom
    There is a function specifically made for Palmtree Panic where it checks if Sonic is in a tunnel and passes through a waterfall chunk, and if he is, then it spawns the splash objects. The code that checks which chunk Sonic is passing through (via it's ID) is pretty standard, except that they seem to have accidentally leftover a line that's usually used for calculating the direct address of a chunk's data, but here, it doesn't have any real purpose and effectively does nothing with how this function is used:
    Code:
    GetMapChunkId:
            move.w  d2,d0                   ; Get map layout Y offset
            lsr.w   #1,d0
            andi.w  #$380,d0
            move.w  d3,d1                   ; Get map layout X offset
            lsr.w   #8,d1
            andi.w  #$7F,d1
            add.w   d1,d0                   ; Combine map offsets
            move.l  #MapChunks,d1           ; Useless leftover line (0x210000)
            lea     map_layout,a1           ; Get chunk at map offset
            move.b  (a1,d0.w),d1
            andi.b  #$7F,d1                 ; Mask out loop flag
            rts
    Code:
            bsr.w   GetMapChunkId           ; Get chunk Sonic is passing through
            cmpi.b  #$2F,d1                 ; Is it a waterfall?
            bne.s   .NotWaterfall           ; If not, branch
    Interestingly, the 90's C port actually retains the useless "MapChunks" line, even using the same exact address value that was assigned in the original Sega CD version:
    Code:
    unsigned int mapno_chk(short d2, short d3)
    {
        unsigned int d1;
        d1 = 0x210000;                      /* The same useless leftover line! */
        d1 += mapwka[d2 >> 8][d3 >> 8];
        return d1;
    }
     
    PeanutNoceda, ProjectFM and DeltaW like this.