osGbpakInit
Syntax
#include <ultra64.h>
s32 osGbpakInit(OSMesgQueue *siMessegeQ, OSPfs *pfs, int
channel);
Explanation
osGbpakInit() is the function for initializing the N64 Game Boy Pak. It initializes the pfs structure and the hardware. To use the N64 Game Boy Pak, you need to call this function first.
If the N64 Game Boy Pak is reinserted, please call the function again.
The OSPfs structure pfs is used for 64GB Pak control. osGbpakInit() initializes pfs.
There is thus no need to initialize the pfs structure on the application side.
siMessageQ is the initialized message queue connected to OS_EVENT_SI.
Please refer to osSetEventMesg,(3P) for information on how to make this connection.
Channel specifies the channel number of the controller. Before
osGbpakInit() is called, osContInit(3P) must be called. This is necessary for internal OS initialization.
The osGbpakInit() function performs an internal 0.2 second wait process because it takes a maximum of 0.2 second for the N64 Game Boy Pak to stabilize after the power supply is turned ON. This wait process involves a 0.2s count using the CPU timer (osSetTimer() function). Thus, before calling this function, you need to call the osCreateViManager() function.
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_DEVICE
Some device other than the N64 Game Boy Pak is inserted in the 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
osContInit (3P)
osGbpakGetStatus (3P)
osGbpakPower (3P)
osGbpakReadWrite (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
|
|