FANDOM


The Castle Crush Glitch is the infamous game-breaking glitch in Donkey Kong Country 2: Diddy's Kong Quest. It can be done in the stage Castle Crush (hence the name) on the SNES and Wii U versions of the game. This glitch is unique in that it could potentially mess up save file data, or even possibly damage the hardware itself, rendering it permanently unplayable.

The glitch essentially has two parts to it, the first being pulling in the nearest entity close to the player and the second scrambling the usual execution code when entering the Rambi Animal Barrel. Only the second part has the potential to affect the physical hardware, or even crash the game, however the first part can cause the player to be unable to complete the stage without dying.

Method

Part One

Diddy needs to be the leading character and pickup the first DK Barrel. After picking up the Barrel, the player should move over to the far left side of the screen, place the Barrel on the moving floor then instantly pick it up again. If done correctly, the Barrel will break but Diddy's character will look like he is still holding it.

Once the Barrel is "thrown," a myriad of things can happen. Depending on the location of the player, it can pull other entities close including enemies, Barrels, projectiles and banana bunches. Only if the Rambi Barrel is drawn close and entered activates the second part of the glitch.

If the player manages to still be carrying the Barrel near the automatic Barrel Cannon encountered further in the stage, if the blast Barrel is moved, the player will not be able to progress any further as the line of path for the Barrel will be incorrect when shooting.

Part Two

Entering the Rambi Barrel will not transform the player into a normal Rambi when they enter the Barrel; instead they will turn into a glitched entity. The entities that the player can transform into are (likely to be incomplete):

Other outcomes that are not transforming into any of the entities above are stretched sprites, monkey noises, or instant game crashes. Most of these outcomes will lead to a game crash, although if an enemy defeats the player they may be returned to the map screen instead and able to play normally.

Cause

The first part of the glitch is caused by a pointer mismatch in the game, as it tries to draw close the nearest entity which under normal circumstances would have been the Barrel that the game thinks is still being held by Diddy.

The second part of the glitch involves some sort of buffer overflow, since enemies such as Klubba are not involved in the stage yet the game somehow manages to get those sprite references. The color palette for the entity is also incorrect.

Different button presses among other factors change the outcome of the second part of the glitch, which means the game is executing arbitrary code dependent on what is in the SRAM content at the time.


Back in the days games are coded in low level languages, and memory was a luxury. Lot of objects are swapped using pointers in SNES, which means each object has a temporary reference. Upon creation and deletion the reference pointers are swapped for other objects, therefore achieving low memory usage. It seems like upon picking up the Barrel assign it a reference to memory sector, but for some reason other objects are able to swap to its memory sector while that memory sector is still being used as a Barrel object (probably due to bad collision). Therefore the game, instead of presenting a Barrel object, present whatever is currently using that memory block - enemies, objects, etc. This memory block is most likely an index to an Array object - in some extreme cases I would assume the index of the Barrel memory sector went above the array length threshold, and caused an overflow issue - which can explain oddity like spawning of Klubba. In modern day gaming there is abundance of memory usage (assume code is optimized), so most developer won't run into this issue of memory-sharing anymore (remember how games comes in CDs instead of blocky cartridges?).

Effects

Depending on what the player transforms into, they can try move around but this usually causes the game to soon crash; whilst the player is Klubba, after a few seconds if they do not move they will seemingly drop down the screen at a fast rate which usually crashes the game soon after.

It is interesting to note that if the player becomes the discolored Rambi, they can seemingly keep ascending for a while after moving in any horizontal direction,[2] though they cannot jump and making contact with an enemy will still hurt the character. The stage cannot be completed as the glitched Rambi even if they manage to reach the top, since they are unable to jump (on the ending pad).

Harmful side effects of the glitch include causing save files to be corrupt or erased after execution, as well as even damaging the ROM itself making it unplayable.[3] This can happen to both the ROM file on an emulator and the physical SNES cartridge. The platform the game is played on (emulator or SNES) can also affect what the glitch does, such as displaying the corrupt SRAM message "An irregularity has been detected. Please turn the power off, wait for 10 seconds, and then turn the power on again." when played on a console.[4]

The glitch was fixed on most re-releases of the game, but not the Wii U.

Recovery

The best way to fix the effects of this glitch is to take out the cartridge's save battery, since the battery loses all of its data if it dies. Save states, like those on the Wii U's Virtual Console, would actually be ideal for the best recovery.

Gallery

References

  1. https://youtu.be/lo-16pMF1Mg?t=1095
  2. https://www.youtube.com/watch?v=OSnKokw-AXM
  3. https://www.youtube.com/watch?v=kS623XTmr04
  4. https://www.youtube.com/watch?v=lo-16pMF1Mg

External links

Community content is available under CC-BY-SA unless otherwise noted.