don't click here

Sonic 3 & Knuckles undocumented glitch

Discussion in 'General Sonic Discussion' started by N!NJA, Jul 28, 2014.

  1. N!NJA

    N!NJA

    Member
    106
    75
    28
    Under your bed.
    Collecting all Cartridge based Sonic games and their regional variations!
    Hey All!

    I decided to make my first post on Retro about a glitch I found in S3&K years ago, I haven't found anybody talking about and it's quite an interesting one. (Least for me.)

    I have confirmed the glitch to work on consoles/emulators even compilations such as Mega Collection + etc.

    To do the glitch, Grab S3&K, Doesn't matter if it's on real hardware or not.

    Go to Angel Island Act 1 and enter the level select code, Upon hearing the chime proceed to the Sound Test like normal, Open Mushroom Hill Act 1 and enter Debug Mode.

    Once you have done the above go back to the Sound Test, Load up Launch Base Act 2 with Debug Mode enabled, Select the S monitor and keep putting them up and down until the time reaches "1:80" now proceed to bounce on them all so you catch all the boxes at once and the game will glitch up, The music will continue to play but hitting Start resets the game and that's when the odd thing happens, Instead of S3&K you will now have S&K and none of the S3 levels will work.

    I have recorded a video of the glitch in action, Please excuse the poor quality I am currently stuck on a 3G connection and haven't played emulators for years haha.

    The video:

    [media]https://www.youtube.com/watch?v=Gjq92X8OYJg[/media]

    EDIT: I know "Debug" glitches/issues don't count but felt this should come to light and if staff wish to remove feel free, Thanks.
     
  2. GerbilSoft

    GerbilSoft

    RickRotate'd. Administrator
    2,971
    76
    28
    USA
    rom-properties
    Anything done in debug mode is *not* considered a "glitch", because you're screwing around with the game logic in a way that wasn't intended.

    Restarting into S&K-only is a well-known aftereffect of crashes caused by using debug mode. I'm not sure about the specifics as to why it doesn't recognize that S3 is locked on, but suffice to say this isn't anything new.

    EDIT: Actually, I'm wondering now. Do we have anything documented on the Wiki regarding debug mode crashes in S3&K? I can't seem to find anything on this subject.
     
  3. Dark Sonic

    Dark Sonic

    Member
    14,631
    1,610
    93
    Working on my art!
    Ah yes the ol disconnect Sonic 3 glitch by hitting a crap ton of S monitors. I've seen it, as I'm sure many have, it's just not worth reporting as debug glitches are just that, debug glitches. You can do lots of crazy stuff with debug mode.

    If glitches are your thing, you should watch this playlist from a few years back. This guy found a ton of crazy things:

    http://www.youtube.com/playlist?list=PL01596721403E0594

    Edit: Ninja'd
     
  4. N!NJA

    N!NJA

    Member
    106
    75
    28
    Under your bed.
    Collecting all Cartridge based Sonic games and their regional variations!
    Well I posted this as I hadn't seen anybody else mention it, Thought it might be of interest to some. Not much of a gamer these days more into collecting.

    Thanks for saying though. :)
     
  5. Iggy for Short

    Iggy for Short

    Member
    814
    179
    43
    I'm a bit surprised a bug this seemingly well-known doesn't appear to be documented anywhere, debug-mode or not. It'd certainly be nice to know what part of S-Monitor abuse causes the game to reset to Sonic & Knuckles, though, since being able to return to the title screen on a button press after the game becomes unresponsive sounds like it would be an intentional failsafe.
     
  6. N!NJA

    N!NJA

    Member
    106
    75
    28
    Under your bed.
    Collecting all Cartridge based Sonic games and their regional variations!
    Agreed it's why I decided to bring it into the light again, Was pretty shocked not to see it anywhere. As for the pressing Start to reset it does sound like a fail safe, I wonder if it's related to them splitting the game into two halves? Also makes me wonder what other issues can come up, Sadly I haven't played for ages, Guess it's time to play again research other odd things.
     
  7. Uberham

    Uberham

    King Of Oblivion Member
    'sup.

    http://www.youtube.com/watch?v=OCUvk8KtIqw
     
  8. Tiddles

    Tiddles

    Diamond Dust Tech Member
    471
    0
    0
    Leicester, England
    Get in an accident and wake up in 1973
    The reason you end up in S&K mode is just one side effect of the main result of this glitch, which is actually just severe but seemingly relatively predictable RAM corruption. In the Sonic 3 without Knuckles topic I mentioned a flag that's set at boot time to indicate whether you're playing S&K or S3&K - well, that gets set, so you get forced into S&K mode. The S3 data is still accessible; if you used PAR/GG codes to play as Tails, for instance, all his sprites would be there. It's just that the game is operating as S&K because of the flag.

    A couple of other results of the memory corruption: the reason you can press start to get back to the title screen is because the game mode variable has been garbled, and you're now flagged as being in a demo, with invalid demo data being read from somewhere in the ROM. You'll also often crash upon reaching Hidden Palace if you can manage to continue a game without having your emeralds reset (the S&K title would clear them up) as your emerald data is also invalid and breaks the giant emerald objects.

    I never dug up exactly where or why the code ends up in this mess, but I seem to have unintentionally fixed it in development versions of Sonic 3 Complete (nothing that's released yet). That suggests it's related to that bit where I looked at a certain branch of object spawning code and thought "Gosh, sure looks like that could overflow object RAM!" The next memory space after object RAM is the Kosinski decompression buffer, so I'm guessing it just overflows a little into that, which then causes the Kosinski decompressor to kick in and go nuts on the rest of RAM due to the garbage it's trying to process, but that's just an assumption.
     
  9. LockOnRommy11

    LockOnRommy11

    Member
    2,708
    225
    43
    I've mentioned it before actually (I could scroll through my previous posts, but there's a lot). My brother does it on his Sonic Collection on his DS as a way of playing just Sonic and Knuckles. What happens is that Sonic goes out of control like he's in a demo and it causes the game to sorta crash and only loads up SK instead of S3&K.

    Have never been able to get a good video though as recording from a DS sucks.

    Nice that someone's finally documented it with a video though!

    He also got debug working in S&K only. I read before that it's documented in the wiki S&K cheats section anyway.
     
  10. JaredAFX

    JaredAFX

    You telling me a shrimp fried this rice? Member
    908
    60
    28
    Florida
    Downloading megahertz
    That's actually really creative. I personally would rather be playing S3&K as a whole, but that's still a very creative workaround! I know I never would have thought of doing that.
     
  11. nineko

    nineko

    I am the Holy Cat Tech Member
    6,298
    475
    63
    italy
    I wonder what's with this old thing being posted everywhere these days, just a few days ago someone else posted about it on SSRG.
     
  12. Iggy for Short

    Iggy for Short

    Member
    814
    179
    43
    Clever!

    I wasn't expecting to get a decent explanation of this any time soon. Thanks for clearing all of that up.
     
  13. muteKi

    muteKi

    Fuck it Member
    7,850
    131
    43
    There are a ton though, depending on how bad a crash is, that it would probably take many pages to document. I think you can use the teleporter in debug in LRZ4 and crash to a reset that goes back to the title screen, for example.
     
  14. Nova

    Nova

    Member
    3,755
    178
    43
    A little unrelated but along the same lines... I came across a glitch that I have never been able to replicate, one that doesn't involve debug trickery or anything of the sort.

    I was doing Marble Garden Zone Act 2, and had a fire shield equipped - after Eggman made the entire level quake and move up, I'm running all the way to the end of the 'rising ground' part before the boss... In the little cut-out section at the end where you just wait for it to finish if you make it quick enough, I held my turbo button in and started wildly fire-dashing left and right... Then suddenly the game seemed to warp me (as if I was entering a special stage or something) and before I knew it, the 2P character/level select screen was displayed with no option to select anything. Very, very weird and was only remedied by a game reset.
     
  15. Chibisteven

    Chibisteven

    Member
    1,364
    39
    28
    US
    In the RAM Addresses $FFAE & $FFAF with any value other than a zero is Sonic 3 not attached. You can alter this in emulators through PAR codes. Sonic 3 doesn't allow you to break S Monitors the way Sonic & Knuckles does. Debug mode glitches aren't technically glitches as you never encounter them during normal game play. They're some odd ball glitches that occur when playing Sonic 3 levels attached to Sonic & Knuckles that results in the game freezing during normal play. Anything that makes Sonic 3 crash can cause Sonic & Knuckles to reboot and act like the Sonic 3 is not attached (not always though).

    The Genesis can't normally display more than certain amount of objects on a screen at a given time, so likely nobody ever noticed it or cared to fix it. No programmer in their right mind would put that many objects on screen to begin with. This is just simply a buffer overflow.

    As for the turbo button glitch. Such a controller can let you pass the barrel in Carnival Night Zone (Act 2) with a chance you end up stuck in the wall or through the obstacle completely and on to the next level. It's likely the game was never tested with a such a controller and was an oversight in of itself based on collision based glitches in the game already being documented. I wouldn't advise someone using such a controller on a game that was not tested or developed for it, unless the developer mentions it or you're seriously handicapped and can't hit a button repeatedly enough.
     
  16. Tiddles

    Tiddles

    Diamond Dust Tech Member
    471
    0
    0
    Leicester, England
    Get in an accident and wake up in 1973
    You only need to do FFAF; it's treated as a word, and 0001 is the normal value for S&K being attached.

    It doesn't have anything to do with the Sonic 3 levels being involved or not - vanishingly close to all of the code is running from S&K even in those levels, just some data (graphics, chunk layout) etc. comes from Sonic 3. The easiest place I found to do this was Mushroom Hill, which will still just as happily reset you into S&K. The glitch even works in genuine S&K alone if you enable debug using PAR codes or other methods, minus the final reset into S&K being an interesting event. All it is is RAM corruption of the RAM addresses you mention, and it's entirely an S&K bug (though the same mistaken code probably exists in S3, it will never be called in S3&K). Crashes that don't corrupt RAM will not cause this.

    And though it is likely an overflow, there is something peculiar about this situation, because it is guarded against in most object spawning scenarios. Skipping the Icecap 1 boss and keeping the snowflakes active will leak object RAM until the game becomes unplayable, but this corruption and crash won't happen; nor will simply spawning too many monitors to begin with. So they did think program for the object limit... just something here seems to sneak around it.
     
  17. Uberham

    Uberham

    King Of Oblivion Member
    Could it be that coupled with the art change into super/hyper sonic? like the change forces the loading of new art, so it overflows from there?
     
  18. Tiddles

    Tiddles

    Diamond Dust Tech Member
    471
    0
    0
    Leicester, England
    Get in an accident and wake up in 1973
    The relevant Sonic art is directly transferred from ROM every frame anyway, and the offset doesn't actually change for Super so they can share similar poses. The Super/Hyper stars do get loaded into their own object slot but their art is also dynamic (IIRC). So I'd be surprised if it's directly related to that, personally.
     
  19. muteKi

    muteKi

    Fuck it Member
    7,850
    131
    43
    I was going to ask if it was because it had to spawn the broken-monitor object on destruction -- but then we'd expect this out of running through a series of badniks since they spawn an animal and a point total.

    EDIT: oh right those despawn as soon as they go offscreen unlike the broken monitor

    EDIT2: also seems to be REALLY hard if not impossible to trigger with other monitors besides the S one, so I bet the checking is related to a race condition with loading the super state
     
  20. kazblox

    kazblox

    Member
    178
    27
    28
    Diassemblies and decompilations.
    This is a large bump, but for future reference, I'll state it clear: It's Hyper Sonic's stars that cause the game to corrupt it's memory.

    Flamewing pointed out that Hyper Sonic's stars use Moduled Kosinski art... When looking into this glitch, he pointed out that the code for decompressing KosM art in Sonic 3 and Sonic and Knuckles does not check for overflows in it's buffer. You can probably guess what would happen if you queued too many art files.

    Always check for overflows!