PPCHalt

From Rare Gaming Dump
Revision as of 20:46, 21 May 2022 by Hallowizer (talk | contribs) (Hallowizer moved page PeePeeCHalt to PPCHalt over a redirect without leaving a redirect: Reverting vandalism)

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 somewhat infamous online.

The function is implemented in PowerPC assembly as an infinite 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