LeoTestUnitReady LeoTestUnitReady (function)

Checks the state of N64 Disk Drive

Syntax

#include <PR/leo.h>     /* leo.h */

s32 LeoTestUnitReady(LEOStatus *status);

typedef u8 LEOStatus;

Description

Note: None of the N64 Disk Drive-related instructions involve ROM DMA (including DMA to ROM in the drive). In fact, the instructions are designed on the assumption that ROM DMA will not be carried out. To learn more about this, please see "Chapter 12: Programming Cautions" in the N64 Disk Drive Programming Manual.

LeoTestUnitReadychecks the state of the N64 Disk Drive. That is, it checks to see if a disk is inserted, if the head is retracted (parked) or down, and if the motor is spinning or stopped. Following is the meaning of each bit returned to the location pointed to by the status argument:

LEO_TEST_UNIT_MR
The disk is not inserted.

LEO_TEST_UNIT_RE
The head is parked (retracted).

LEO_TEST_UNIT_SS
The motor is stopped.

Error codes are returned as return values to the message queue. Check all error codes and take the appropriate measures when the operation does not terminate normally.

For more information about the errors that may be returned, their causes, and ways to deal with them, please see "Chapter 10: Error-Handling" in the N64 Disk Drive Programming Manual.

See Also

Leo*CreateLeoManager

Revision History

04/30/1999 Changed Format