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





osGbpakPower

Syntax
#include <ultra64.h>
s32 osGbpakPower(OSPfs *pfs, s32 flag);

Explanation
The osGbpakPower() function controls the supply of power to the Game Boy game pak.

If there is no activity, no power is supplied to the Game Boy cartridge connected to the 64GB Pak. Before accessing the Game Boy cartridge, power must be turned on using osGbpakPower().

Please use the osGbpakInit() function to initialize the pfs structure in advance. Power is turned ON or OFF according to the value specified by the flag. If OS_GBPAK_POWER_ON is specified for flag, the power is turned on; if OS_GBPAK_POWER_OFF is specified, the power is turned off.

Ensure that the power is on before calling osGbpakReadWrite().

If the Game Boy game pak is not accessed for an extended period of time, use the osGbpakPower() function to turn the power OFF. Then turn the power back ON the next time it is accessed. make sure the power is OFF, when the Game Boy game pak is removed.

If power is turned from OFF to ON, the function performs an internal process for more than 0.12 second to wait for the power supply to stabilize. osGbpakPower() internally uses the CPU timer (osSetTimer() function)to wait for this interval. Thus, osCreateViManager() must be called before calling osGbpakPower().

Return value is an error code. If the function terminates normally, a value of 0 is returned. If an error occurs, one of the following error codes is returned:

PFS_ERR_NOPACK
Nothing is inserted in the specified controller.

PFS_ERR_CONTRFAIL
Data transfers with the controller have failed. The controller may not be connected correctly, or there may be some problem with the N64 Game Boy Pak or the controller connector.

See Also
osGbpakInit (3P)
osGbpakPower (3P)
osGbpakReadWrite (3P)
osGbpakGetStatus (3P)
osGbpakReadId (3P)
osGbpakCheckConnector (3P)




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 March 1998