How To Get The Error Type - Nintendo Wii Manuallines

Optical disc drive
Hide thumbs Also See for Wii:
Table of Contents

Advertisement

3.4

How to Get the Error Type

This section explains how an application can retrieve the optical disc error type.
The error type shows the device driver's status. The device driver status can be obtained by calling the
function DVDGetDriveStatus.
Note:
As mentioned in
when commands cannot be processed properly. So, no errors will occur if no commands have
been executed. For example, even if the disc
not return
DVD_STATE_NO_DISK
functions DVDGetFileInfoStatus and DVDGetCommandBlockStatus behave in the same
manner.
The following list indicates states the function will return when an error has occurred.
DVD_STATE_COVER_OPEN
DVD_STATE_NO_DISK
DVD_STATE_WRONG_DISK
DVD_STATE_RETRY
DVD_STATE_FATAL_ERROR
There are other states that can be returned from the function DVDGetDriveStatus(). They are not men-
tioned here because they do not indicate errors, and this document focuses on error handling. Refer to the
Revolution SDK Function Reference Manual for details on other states.
Note:
For a game that has multiple Game Discs, DVD_STATE_MOTOR_STOPPED is returned when
Game Discs are exchanged. See
Below is pseudo-code for handling errors. For an operational demo,
dling" in the Revolution SDK.
Code 1 - Pseudo-code for Error-handling
DVDReadAsync();
do{
status = DVDGetDriveStatus();
switch (status){
case DVD_STATE_NO_DISK:
show_message_for_no_disk_on_screen();
break;
case DVD_STATE_WRONG_DISK:
show_message_for_wrong_disk_on_screen();
break;
case DVD_STATE_RETRY:
show_message_for_retry_on_screen();
break;
case DVD_STATE_FATAL_ERROR:
show_message_for_fatal_error_on_screen();
break;
}
} while (status != DVD_STATE_END) && (status != DVD_STATE_FATAL_ERROR);
In order to display an appropriate error message when a problem occurs, this routine calls the function
DVDGetDriveStatus every frame and polls the state.
© 2006 Nintendo
CONFIDENTIAL
Chapter 3.2
"Error Types that Developers Need to Resolve", errors only occur
(described below) if there is no command being executed. The
(Wii has no disc cover)
Chapter 4
is
ejected, the function DVDGetDriveStatus will
"Games with Multiple Game Discs" for details.
see the DVD sample demo, "errorhan-
5
Graphics Library (GX)
RVL-06-0179-001-A
Released: October 4, 2006

Advertisement

Table of Contents
loading

Table of Contents