Difference between revisions of "PPCHalt"

From Rare Gaming Dump
(Created page with "<youtube>uTNvHnD6aYc</youtube> '''PPCHalt''' is a function that's called when a Wii or Wii U system crashes. This could be due to many reasons. When this happens, the system...")
 
 
(9 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<youtube>uTNvHnD6aYc</youtube>
+
'''PPCHalt''' is a function in the [[Dolphin SDK]] and [[Revolution SDK]] standard library (specifically in the base.a/baseD.a file) which is used to halt the main CPU of a GameCube or Wii when a fatal error occurs. Notably, when this function is called without first halting audio playback, the console will freeze but continue to output the last audio frame in its DSP over the audio connection, resulting in the playback of an often loud and high-pitched tone. This tone is often referred to as the '''Sound of Death''', and has become infamous online and also became a meme.
  
'''PPCHalt''' is a function that's called when a Wii or Wii U system crashes. This could be due to many reasons. When this happens, the system suddenly freezes on the last frame and loops the last bit of sound, making an annoying beeping noise that can be loud depending on the frame. A PPCHalt doesn't happen often with regular vanilla gameplay and is more likely to happen if you use game modifications.
+
The function is implemented in PowerPC Assembly as an infinite unproductive loop which repeatedly branches to the same instruction.
  
2 games that this happens on often are '''Super Smash Bros.''' (Brawl and Wii U) and '''Minecraft''' (Wii U). The former especially happens when using one of the many mods that are available for the game.
+
The following is the source code of the PPCHalt function from the Revolution SDK (circa 2.0)'s version of the base library.<ref>[[DIAG4RVL.zip]]/trunk/SDK/build/libraries/base/src/PPCArch.c</ref>
  
The noise the system makes when it crashes has been associated with using homebrew and has been used as a meme on Twitter.
+
<nowiki>
 +
/*---------------------------------------------------------------------------*
 +
  Name:        PPCHalt
 +
 
 +
  Description:  Halt CPU by spinning infinitely.
 +
 
 +
  Arguments:    None
 +
 
 +
  Returns:      Does not return.
 +
*---------------------------------------------------------------------------*/
 +
__declspec ( weak ) asm void    PPCHalt    (void)
 +
{
 +
    nofralloc
 +
 
 +
    sync
 +
 
 +
_spin:
 +
    nop        // AMC debugger has problems with empty while(1)
 +
    li      r3, 0
 +
    nop
 +
    b      _spin
 +
 
 +
    // NOT REACHED HERE
 +
}
 +
</nowiki>
 +
 
 +
==Gallery==
 +
{{#evt:
 +
service=youtube
 +
|id=https://yewtu.be/watch?v=J7Uunp3tePE
 +
|alignment=center
 +
|description=A video demonstrating the "Sound of Death" which is sometimes indirectly produced by PPCHalt.
 +
|container=frame
 +
}}
 +
 
 +
[[Category:Errors]]
 +
{{Template:ErrorNavbox}}

Latest revision as of 05:34, 7 May 2023

PPCHalt is a function in the Dolphin SDK and Revolution SDK standard library (specifically in the base.a/baseD.a file) which is used to halt the main CPU of a GameCube or Wii when a fatal error occurs. Notably, when this function is called without first halting audio playback, the console will freeze but continue to output the last audio frame in its DSP over the audio connection, resulting in the playback of an often loud and high-pitched tone. This tone is often referred to as the Sound of Death, and has become infamous online and also became a meme.

The function is implemented in PowerPC Assembly as an infinite unproductive loop which repeatedly branches to the same instruction.

The following is the source code of the PPCHalt function from the Revolution SDK (circa 2.0)'s version of the base library.[1]

/*---------------------------------------------------------------------------*
  Name:         PPCHalt

  Description:  Halt CPU by spinning infinitely.

  Arguments:    None

  Returns:      Does not return.
 *---------------------------------------------------------------------------*/
__declspec ( weak ) asm void    PPCHalt     (void)
{
    nofralloc

    sync

_spin:
    nop         // AMC debugger has problems with empty while(1)
    li      r3, 0
    nop
    b       _spin

    // NOT REACHED HERE
}

Gallery

A video demonstrating the "Sound of Death" which is sometimes indirectly produced by PPCHalt.
  1. DIAG4RVL.zip/trunk/SDK/build/libraries/base/src/PPCArch.c