Function


nuContGBPakReadWrite


Syntax

s32 nuContGBPakReadWrite(NUContPakFile *handle, u16 flag , u16 address, u8 *buffer, u16 size)

Arguments

handle       GB Pak control structure (shared with Controller Pak structure)
flag           flag
OS_READ    Read
OS_WRITE   Write
address      Game Boy Game Pak address
buffer         data buffer
size           read/write byte size

Return Value

Value returned by the osGbpakReadWrite function

Description

Reads and writes data to and from the Game Boy Game Pak

"address" and "size" both must be multiples of 32. The return value is the value returned by the osGbpakReadWrite function.

Errors

PFS_ERR_NOPACK Nothing is inserted in the specified Controller.
PFS_ERR_CONTRFAIL Data transfer with Controller has failed. Either the Controller is not connected properly, or there may be some problem with the GB Pak or the Controller connector.