N64® Functions Menu

al - Audio Library Functions
gDP - DP GBI Macros
gdSP - General GBI Macros
gSP - SP GBI Macros
gt - Turbo Microcode RDP
gu - Graphics Utilities
Math - Math Functions
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

LeoReadCapacity

Format
#include <leo.h>

s32 LeoReadCapacity (LEOCapacity *cap,
   s32 direction);

typedef struct
{
     u32 startLBA; /* Beginning LBA of usable region */
     u32 endLBA;   /* Ending LBA of usable region */
     u32 nbytes;   /* Total byte size of usable region */
}   LEOCapacity;
What This Function Does
It calculates the usable disk space. When this function is called with OS_READ placed in the direction argument, "readable starting LBA" is returned in startLBA of the LEOCapacity data structure pointed to by the cap argument, "readable ending LBA" is returned in endLBA, and "total readable LBA" is returned in nbytes. These values are usually the same no matter what the type of inserted disk, with startLBA=0, endLBA=4291 and nbytes=64458560. The following returned values are possible. A check is usually not necessary.
  • -1 means Leo Manager is not running. The currently inserted disk type is referenced for the conversion operation, so be sure to start Leo Manager before calling this function.
  • LEO_ERROR_GOOD means normal termination occurred.
See Also
Leo
LeoCreateLeoManager
LeoReadWrite
LeoSeek
LeoSpdlMotor
LeoByteToLBA
LeoLBAToByte
LeoInquiry
LeoTestUnitReady
LeoRezero
LeoClearQueue
LeoReadDiskID



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.

Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated January 1998