Sonic CD Quirks/Deconstruction

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

  1. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    @Clownacy I went ahead and reposted the ring sound bug and sound priority bug explanations on my Sonic CD Deconstructed account, and provided additional examples to help explain them. I should note that the "stop all sounds" command is played every time it exits an MMD file, not just when leaving the time warp cutscene.

    [​IMG]

    As an addendum, they also forgot to assign sound effect 0xDF (drowning) a priority value.
     
    Last edited: Dec 29, 2022
    JGamer2151 likes this.
  2. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    3D ramp/loop

    I made a video about how a 3D ramp/loop works in Palmtree Panic Act 1 Present:


    Additional notes:
    • Gravity is only disabled if Sonic is going fast enough (at least 8 upwards). If he slows down, then gravity is enabled, which is why when you let go of the jump button, he starts falling.
    • He will also only be boosted forwards if he's moving fast enough.
    Metal Sonic projector sprite cropping

    The Metal Sonic projector's sprites have the 1st row of pixels cropped out in the 1996 PC version:
    [​IMG]

    This actually extends to the 2011 remake a little, where a couple sprites have that cropping issue, but others are just fine:
    [​IMG]
     
    Pacca, ProjectFM, Clownacy and 2 others like this.
  3. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    Explosions and flowers are flipped depending on the direction of the badnik in the original version of Sonic CD.
    [​IMG]
    [​IMG]

    This is because the way the explosion and flower are spawned are by sequentially changing their object ID and resetting their routine ID back to the initialization one. However, during re-initialization, it fails to reset the flip flags, and that's why it does that.
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    Usually, using OR to combine bits with previously set ones are used by stage objects placed in the stage layout to retain settings set by the layout data. They probably just copied that line without much thought into the explosion and flower objects.

    This does not happen in the 2011 remake.
     
  4. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    Here are some videos of the final boss with hitboxes visible in the original Sega CD version and the RSDK version; the hitboxes are quite different.

     
  5. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    There are some invisible blocks placed in Metallic Madness.
    [​IMG] [​IMG]

    They don't exist in the 2011 remake.
    [​IMG] [​IMG]
     
    yami, JGamer2151, ProjectFM and 2 others like this.
  6. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    I would like to make a correction, as these are incorrect, actually. The track structure address is actually incremented before calling the update function, and on top of that, each song adds in a dummy slot for the removed rhythm channel, so things are actually kept aligned properly. My apologies!

    [​IMG]
    [​IMG]
     
  7. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    So, I've been learning how to use After Effects, and I came up with this demonstration on how the Sega CD is used to render a special stage.



    This example demonstrates how the Sega CD renders a special stage. The way scaling and rotation works on the Sega CD is that it uses a table of values to dictate how to scan a source image. For each row in the rendered image, it takes an entry from the table. Each table entry consists of a starting coordinate and delta values. It plots the scanner at the starting coordinate, and for each pixel in the rendered row, it moves the scanner by the amount set in the delta values. In this specific example, the first 3 rows are effectively nulled out due to rendering errors caused by the fact that it's rendering so far away for those rows (although, the 4th row is also erroneous, although it doesn't seem like it was noticeable enough for the developers).
     
  8. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    Another After Effects test, this time a 2D visualization of the Special Stage 6 demo

     
  9. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    Here's an extra tidbit with this
    The past is also affected by this:
    [​IMG] [​IMG]

    And, of course, if we look back at 510, we have a match:
    [​IMG]
     
    JGamer2151, Clownacy and DeltaWooloo like this.
  10. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    The points chaining system in the 2011 remake of Sonic CD is bugged. This is due to the fact that the chain doesn't get updated until a points object disappears, causing an inconsistent points chain if you rack them up too quickly.



    This is the code responsible for it. Object[26] is what keeps track of the chain. As you can see, it doesn't get updated until the points object has despawned, causing the issue shown above.

    [​IMG]

    The way the chain gets reset if the player lands on the ground or on top of an object is also weird. When a points object despawns, the chain counter is set to a "gravity" value depending if the player is grounded or not, and then checks if it changed in the next frame.

    [​IMG]

    For instance, if you start a chain by hitting a badnik, landing on the ground and jumping before the points despawns, and then hitting another enemy after it despawns, the chain will continue. Here, a spring was added to easily demonstrate this.



    It also creates inaccurate behavior where, unlike the original Sega CD version (by extension, Sonic 1), you cannot continue a chain if you roll into an enemy and then jump into another.



    For reference, here's the original's behavior.

     
    Clownacy and DeltaWooloo like this.
  11. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    There is a bug where a Tamabboh's missiles will despawn if it flies past a block with solidity.

    [​IMG]

    This is due to an oversight where it checks for floor collision (aka, it checks for collision with a block downwards) even if it's moving upwards. When it moves high enough past a block with solidity for the downwards check to register as touching the floor, it despawns.

    [​IMG]

    The first bit just checks if the missile is on screen, and if not, despawn it. Then comes the floor collision check without an additional check to see if it's moving downwards.

    Here is a visualization of this. Notice how the left missile despawns once the bottom of its collision sensor touches the block with solidity.

    [​IMG]
     
    ProjectFM, Clownacy and DeltaWooloo like this.
  12. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    The 2011 remake doesn't accurately handle ring bonus chaining when hitting multiple ring UFOs in a row. That's because the remake merely just doubles the ring count for each subsequent rings UFO that is destroyed.

    [​IMG]

    In the original, it uses a separate counter for the chain bonus, which is initialized as 20, and doubles for each subsequent rings UFO, which is then added to the ring counter.

    [​IMG]

    [​IMG]

    Here is a demonstration.

     
    ProjectFM, Clownacy and DeltaWooloo like this.
  13. Devon

    Devon Powered by a malfunctioning Motorola 68000 Member

    Joined:
    Aug 26, 2013
    Messages:
    1,315
    Location:
    your mom
    If you have an astute eye, you can see that the drowning countdown numbers are actually bubbles that come out of Sonic's mouth. (Yes this is in all the Genesis titles, but it's also in CD, so...)

    [​IMG]

    Also, the colors are a bit messed up here in Sonic CD for when the number forms. The reason for this is because they are using the wrong palette line. The number itself uses line 1 for the yellows, but it seems they got a bit lazy and also made the bubble formation use it as well, when they were designed for line 0, using Sonic's blues.

    [​IMG]

    The reason why this is because in prototypes, the fully formed number graphic weren't yellow like in Sonic 1, but rather also appeared like a bubble, so it used line 0. When the numbers went back to being yellow, they went back to line 1, but took the formation with it.

    [​IMG]

    The code changes between v0.51 and the final are highlighted here. When the number gets spawned, its palette line is set from the start, and also changed the initialization code to OR the tile ID instead of directly setting it so that the palette line change can go into effect.

    [​IMG]

    [​IMG]

    Interesting thing to note is that these graphics appear to stem from a later prototype of Sonic 1. The numbers originally being bubbles makes the whole thing with them coming out of Sonic's mouth make more sense.

    [​IMG]

    The 2011 remake mostly fixes this, but the lightest shade of blue was accidentally left as the regular one instead of the underwater one, so it appears more purple instead of baby blue.

    [​IMG]
     
    Last edited: Sep 14, 2023