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

   

osEPiGetDeviceType

Format
#include <ultra64.h>

s32 osEPiGetDeviceType(
   OSPiHandle *pihandle,
   OSPiInfo *info);
What These Functions Do
The osEPiRawStartDma, osEPiRawWriteIo, osEPiRawReadIo, and osEPiGetDeviceType functions gain access to the expanded peripheral interface (EPI) without using the PI manager.However, these functions should be used only when other services including debug, print, logging, and profiling are not using the PI bus. Nintendo strongly recommends that the PI manager be used when using the EPI. Please see osEPiStartDma for more information.

The expanded peripheral interface (EPI) transfers data between RDRAM and a bulk storage device (BSD) such as ROM, Drive ROM, and the N64 Disk Drive. EPI supports many devices sharing the PI domain, and it can switch among these devices dynamically.

The OSPiHandle data structure acts as a handler for the EPI routine when referencing each PI device without using the PI manager. The OSPiHandle structure is allocated and initialized by each device's initialization routine. It is also used for saving each PI device attributes.

The osEPiGetDeviceType routine gets the PI information recognized by the PI handler. The device information is represented by the OSPiInfo structure as shown here:
typedef struct {
   u8 type;
   member;
   u32 address;
}OSPiInfo;
The device type is DEVICE_TYPE_CART (usual game Pak), or DEVICE_TYPE_BULK (bulk storage device), or DEVICE_TYPE_64DD (disk drive). The specified device's base IO address is returned to the address field.

Warning
osEPiRawStartDma, osEPiRawWriteIo, and osEPiRawReadIo reset the PI bus. If there is a discrepancy between the given PI bus setting specified by pihandle and the actual PI bus setting when the function is called. It is not necessary to call osCartRomInit each time.

See Also
osEPiRawStartDma
osEPiRawWriteIo
osEPiRawReadIo
osPiRawStartDma
osPiStartDma
osEPiStartDma
osCartRomInit



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