|  |  |  |  |  | ||||||||||||||||||||||||||
| 
  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 
 
 |  | 
 
 nuContPakOpenFormatvoid nuContPakOpen(NUContPakFile *file, u32 cont_no) Arguments 
 none What This Function Does It opens the Controller Pak device. It checks to see whether the Controller Pak or the Rumble Pak is inserted. If the Controller Pak is inserted, it initializes a file in order to gain access to the Controller Pak. When a Controller Pak is inserted, NU_CONT_PAK_TYPE_PAK is set in file.type. When a Rumble Pak is inserted, NU_CONT_PAK_TYPE_RUMBLE is set, and when nothing is inserted, NU_CONT_PAK_TYPE_NONE is set. The nuContPakOpen function uses this to find out if anything is inside the Controller. The returned value of the osPfsInitPak function or the osMotorInit function is set in file.error. For details about the returned value, please refer to these separate functions. Example nuContPakFile   pakFile;
// company code, game code entries
nuContPakCodeSet("64", "TEST");
// open Controller Pak device
noContPakOpen(&pakFile, 0);
if(!pakFile.error) {
// error processes regarding
// PFS_ERR_NOPACK, PFS_ERR_NEW_PACK,
// PFS_ERR_CONTRFAIL, PFS_ERR_ID_FATAL,
// PFS_ERR_DEVICE 
......
}
if(!pakFile.type !=NU_CONT_PAK_TYPE_PAK) {
// process if there is no Controller Pak
.......
return ERROR;
}
// open game note
nuContPakFileOPenJis(&pakFile,
   "NuSystemSaveData", "a",
   NU_CONT_PAK_CREATE, 256) ;
if(!pakFile.error) {
// error processes PFS_ERR_INCONSISTENT,
// PFS_ERR_INVALID, PFS_ERR_DATA_FULL,
// PFS_DIR_FULL
.....
return ERROR;
}See AlsonuContPakFileOpen nuContPakFileOpenJis 
 
 | ||||||||||||||||||||||||||||