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
|
nuContPakFileOpenFormatvoid nuContPakFileOpen(NUContPakFile *file, u8* noteName, u8* extName, u32 mode, s32 size)Arguments
none What This Function Does It opens the Controller Pak game note and prepares it so that it can be used. The file argument points to the Controller Pak structure of the device opened with the nuContPakOpen function. If the device is not open, then PFS_ERR_NOPACK is set in file.error. Before this function is called, the company code and game code must be registered by using the nuContPakCodeSet function. If the game note name (noteName) does not fill 16 bytes, 0x00 is assigned to the unused space. The extName argument specifies the extension for use with multiple notes. The size is 4 bytes, but 1 byte is usable, and it is usually 0x00. Additional notes are assigned 0x1A-0x33 ('A'-'Z' in N64 font code). If NU_CONT_PAK_CREATE is specified in mode and there is no game note, a game note of the specified size is created. Because game notes are managed in 256-byte units, the actual size secured is rounded up to a multiple of 256. If NU_CONT_PAK_NOCREATE is specified, PFS_ERR_INVALID is returned to file.error where there is no game note. The error returned to error.file is slightly different depending on the mode. In NU_CONT_PAK_CREATE mode, the error.file takes the error value of osPfsFindFile or osPfsAllocateFile. In NU_CONT_PAK_NOCREATE mode, it takes the error value of osPfsFindFile. The nuContPakOpen function and the nuContPakFileOpen function play different error checking roles. nuContPakOpen concerns itself with physical errors, like whether the Controller Pak is there or not, and whether it can be accessed. nuContPakFileOpen checks for errors in the data in the Controller Pak, like a missing game note or open space. Thus, you can divide the error processing routines into separate error groups. See Also nuContPakOpen nuContPakOpenJis nuContPakCodeSet
|