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

   

nuContPakFileReadWrite

Format
void nuContPakFileReadWrite(NUContPakFile *file, s32 offset, s32 size, u8* buf, u32 mode)

Arguments
  • file is the pointer to the Controller Pak structure
  • offset is the read/write offset position
  • size is the read/write size
  • buf is the pointer to the buffer that holds the read or write data
  • mode specifies whether it ia a read or a write:

    • NU_CONT_PAK_READ is a data read
    • NU_CONT_PAK_WRITE is a data write
Returned Value
none

What This Function Does
It reads from or writes to the game data of the Controller Pak's game note. The file argument specifies the Controller Pak structure of the game note opened by nuContPakFileOpen in the device opened by nuContPakOpen. Data of size bytes is read or written starting from the position specified by offset. In NU_CONT_PAK_READ mode, data is read in the region specified by buf. In NU_CONT_PAK_WRITE mode, data from the region specified by buf is written to the Controller Pak.

The size and offset values are multiples of 32 and must be smaller than the file size. The value returned by the osPfsFileReadWrite function is set in file.error.

See Also
nuContPakOpen
nuContPakFileOpen
nuContPakFileOpenJis
nuContPakFileRead
nuContPakFileWrite



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