LeoRezero LeoRezero (function)

Recalibrates the N64 Disk Drive


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

s32 LeoRezero(LEOCmd *cmdBlock, OSMesgQueue *mq);


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.

LeoRezero issues the recalibration command to the N64 Disk Drive. That is, it initializes the various settings of the internal registers and moves the head to LBA0.

Note: This function is usually not needed. For a purpose of just seeking up to LBA0, use the LeoSeek function; it is faster.

Nothing needs to be set for the command block cmdBlock argument. When processing of this function ends, an error code is returned to the message queue mq. An error could arise, so the programmer needs to check this error code.

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.

The return value is -1 if Leo Manager has not been created, and 0 if it has. Usually no check is necessary.


LEOCmd cmdBlock;
u32 error;
LeoRezero(&cmdBlock, &diskQ);
osRecvMesg(&diskQ, (OSMesg *)&error, OS_MESG_BLOCK);

See Also

Leo*CreateLeoManager, LeoSeek

Revision History

04/30/1999 Changed Format