Difference between revisions of "DVDFatal"

From Rare Gaming Dump
(Added proto error message variants)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
The '''DVDFatal''' error occurs when a Wii or GameCube has a fatal error when loading a disc that the console cannot recover from. <code>DVDFatal</code> is the actual function called in the game code in this scenario.
+
'''DVDFatal''' is the name of a fatal exception that is raised when a Wii or GameCube fails to read the game disc and cannot recover from the resulting error. Contrary to popular belief, <code>DVDFatal</code> is merely the internal name of the error handling code, and is not actually a function.
  
When a DVDFatal happens on a Wii, an error with wording similar to, "An error has occurred. Press the Eject button, remove the Game Disc, and turn off the power to the console. Please refer to the Wii Operations Manual for help troubleshooting" will be presented on-screen. The only way to clear the error is to power off the console.
+
In order for the <code>DVDFatal</code> code to be ran, the variable <code>DVDSetAutoFatalMessaging</code> needs to be set to true at the beginning of the program. The variable needs to be set to true manually in the [[Dolphin SDK]], but is set automatically in the [[Revolution SDK]]. When the variable is set to false, custom error handling code would be required to be written. If <code>DVDSetAutoFatalMessaging</code> is set to true, then a message similar to the following message will be displayed on screen.
  
The following is the source code of the DVDFatal function from the Revolution SDK.
+
<blockquote>"An error has occurred. Press the Eject Button, remove the Game Disc, and turn off the power to the console. Please refer to the Nintendo GameCube Instruction Booklet/Wii Operations Manual for help troubleshooting."</blockquote>
  
<nowiki>
+
Earlier versions of the Revolution SDK DVD library used this message instead:
/*---------------------------------------------------------------------------*
 
  Project:  Dolphin DVD Fatal Error Message print routine
 
  File:     DVDFatal.c
 
  
  Copyright 2002 Nintendo. All rights reserved.
+
<blockquote>"An error has occurred. Turn the power off and refer to the Nintendo Revolution Instruction Booklet for further instructions."</blockquote>
  
  These coded instructions, statements, and computer programs contain
+
This was followed by this variant before the final version:
  proprietary information of Nintendo of America Inc. and/or Nintendo
 
  Company Ltd., and are protected by Federal copyright law.  They may
 
  not be disclosed to third parties or copied or duplicated in any form,
 
  in whole or in part, without the prior written consent of Nintendo.
 
  
  $Log: /Dolphin/build/libraries/dvd/src/dvdFatal.c $
+
<blockquote>"An error has occurred. Turn the power off and refer to the Instruction Booklet for further instructions."</blockquote>
   
 
    6    03/09/12 16:19 Hashida
 
    Modified (NINTENDO GAMECUBE -> Nintendo GameCube).
 
    Removed TM from European English sentense (US English has already done
 
    this).
 
   
 
    5    02/08/29 9:23 Hashida
 
    Removed TM from the English message.
 
   
 
    4    8/23/02 18:48 Shiki
 
    Modified message layouts to fit in the TV screen.
 
  
    3    8/22/02 18:35 Shiki
+
The only way to clear the error is to power off the console, as the code calls <code>OSFatal</code> after drawing the screen, which in turn calls <code>[[PPCHalt]]</code>.
    Revised messages.
 
 
 
    2    8/21/02 13:48 Shiki
 
    Fixed a warning issued by CW 1.2.5.
 
 
 
    1    8/20/02 21:39 Shiki
 
    Initial check-in.
 
 
 
  $NoKeywords: $
 
*---------------------------------------------------------------------------*/
 
 
 
#include <dolphin/os.h>
 
#include <dolphin/gx.h>
 
#include <dolphin/vi.h>
 
#include <dolphin/dvd.h>
 
 
 
void __DVDPrintFatalMessage(void);
 
 
 
static void (*FatalFunc)(void) = NULL;
 
 
 
const char* Japanese = "\n\n\nエラーが発生しました。\n"
 
                "\n"
 
                "本体のパワーボタンを押して電源をOFFにし、\n"
 
                "本体の取扱説明書の指示に従ってください。";
 
 
 
const char* English =  "\n\n\nAn error has occurred.\n"
 
                "Turn the power off and refer to the\n"
 
                "Nintendo GameCube Instruction Booklet\n"
 
                "for further instructions.";
 
 
 
const char* const Europe[] =
 
{
 
    // English
 
    "\n\n\nAn error has occurred.\n"
 
    "Turn the power off and refer to the\n"
 
    "Nintendo GameCube Instruction Booklet\n"
 
    "for further instructions.",
 
 
 
    // German
 
    "\n\n\nEin Fehler ist aufgetreten.\n"
 
    "Bitte schalten Sie den Nintendo GameCube\n"
 
    "aus und lesen Sie die Bedienungsanleitung,\n"
 
    "um weitere Informationen zu erhalten.",
 
 
 
    // French
 
    "\n\n\nUne erreur est survenue.\n"
 
    "Eteignez la console et r馭駻ez-vous au\n"
 
    "manuel d'instructions Nintendo GameCube\n"
 
    "pour de plus amples informations.",
 
 
 
    // Spanish
 
    "\n\n\nSe ha producido un error.\n"
 
    "Apaga la consola y consulta el manual\n"
 
    "de instrucciones de Nintendo GameCube\n"
 
    "para obtener m疽 informaci.",
 
 
 
    // Italian
 
    "\n\n\nSi ・verificato un errore.\n"
 
    "Spegni (OFF) e controlla il manuale\n"
 
    "d'istruzioni del Nintendo GameCube\n"
 
    "per ulteriori indicazioni.",
 
 
 
    // Dutch
 
    "\n\n\nEr is een fout opgetreden.\n"
 
    "Zet de Nintendo GameCube uit en\n"
 
    "raadpleeg de handleiding van de\n"
 
    "Nintendo GameCube voor nadere\n"
 
    "instructies."
 
};
 
 
 
static void ShowMessage(void)
 
{
 
    const char* message;
 
    GXColor bg = {  0,  0,  0,  0 };
 
    GXColor fg = { 255, 255, 255,  0 };
 
 
 
    if (VIGetTvFormat() == VI_NTSC)
 
    {
 
        if (OSGetFontEncode() == OS_FONT_ENCODE_SJIS)
 
        {
 
            message = Japanese;
 
        }
 
        else
 
        {
 
            message = English;
 
        }
 
    }
 
    else
 
    {
 
        message = Europe[OSGetLanguage()];
 
    }
 
 
 
    OSFatal(fg, bg, message);
 
    // NOT REACHED HERE
 
}
 
 
 
BOOL DVDSetAutoFatalMessaging(BOOL enable)
 
{
 
    BOOL enabled;
 
    BOOL prev;
 
 
 
    enabled = OSDisableInterrupts();
 
    prev = FatalFunc ? TRUE : FALSE;
 
    FatalFunc = enable ? ShowMessage : NULL;
 
    OSRestoreInterrupts(enabled);
 
    return prev;
 
}
 
 
 
void __DVDPrintFatalMessage(void)
 
{
 
    if (FatalFunc)
 
    {
 
        FatalFunc();
 
        // NOT REACHED HERE
 
    }
 
}
 
</nowiki>
 
  
 
[[Category:Wii]]
 
[[Category:Wii]]

Latest revision as of 04:34, 23 May 2023

DVDFatal is the name of a fatal exception that is raised when a Wii or GameCube fails to read the game disc and cannot recover from the resulting error. Contrary to popular belief, DVDFatal is merely the internal name of the error handling code, and is not actually a function.

In order for the DVDFatal code to be ran, the variable DVDSetAutoFatalMessaging needs to be set to true at the beginning of the program. The variable needs to be set to true manually in the Dolphin SDK, but is set automatically in the Revolution SDK. When the variable is set to false, custom error handling code would be required to be written. If DVDSetAutoFatalMessaging is set to true, then a message similar to the following message will be displayed on screen.

"An error has occurred. Press the Eject Button, remove the Game Disc, and turn off the power to the console. Please refer to the Nintendo GameCube Instruction Booklet/Wii Operations Manual for help troubleshooting."

Earlier versions of the Revolution SDK DVD library used this message instead:

"An error has occurred. Turn the power off and refer to the Nintendo Revolution Instruction Booklet for further instructions."

This was followed by this variant before the final version:

"An error has occurred. Turn the power off and refer to the Instruction Booklet for further instructions."

The only way to clear the error is to power off the console, as the code calls OSFatal after drawing the screen, which in turn calls PPCHalt.