Function
nuContPakFileState
Syntax
s32 nuContPakFileState(NUContPakFile* file, OSPfsState* state)
Arguments
*file Controller Pak structure
*state Pointer to OSPfsState structure
Return Value
Error
Description
Gets Controller Pak game note information
Gets information from the specified game note of the Controller Pak. The obtained information is stored in "state". "file" specifies the Controller Pak structure in the game note opened by the nuContPakFileOpen function and using the nuContPakOpen function to open the device.
To get all of the game note information from inside the Controller Pak, call the nuContPakFileState function 16 times, specifying the values 0 to 15 in order in file.file_no.
The OSPfsState structure indicated by "state" has the following contents.
typedef struct {
u32 file_size; // Note size (in bytes)
u32 game_code; // Game code
u16 company_code; // Company code
char ext_name[4]; // Note extension
char game_name[16]; // Note name
}
The value returned by the osPfsFileState function is stored in file.error.
Errors
PFS_ERR_NOPACK | Nothing is inserted in the specified Controller. |
PFS_ERR_NEW_PACK | The Controller Pak may have been changed. Please perform the Open process again. |
PFS_ERR_INCONSISTENT | There is an inconsistency in the file system management area. |
PFS_ERR_CONTRFAIL | Data transfer with Controller has failed. |
PFS_ERR_INVALID | Invalid parameter or the game note does not exist. |
See Also
nuContPakOpen, nuContPakFileOpen, and nuContPakFileOpenJis