Issues a seek command to N64 Disk Drive
Syntax
#include <PR/leo.h> /* leo.h */ s32 LeoSeek(LEOCmd *cmdBlock, u32 lba, OSMesgQueue *mq);
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.
The LeoSeek function moves the N64 Disk Drive head to the position specified by the lba argument.
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.
Example
LEOCmd cmdBlock; u32 error; ..... LeoSeek(&cmdBlock, 20, &diskQ); osRecvMesg(&diskQ, (OSMesg *)&error, OS_MESG_BLOCK);
See Also
04/30/1999 Changed Format