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
|
|
osPfsRepairld
Format
#include <ultra64.h>
s32 osPfsRepairld(OSPfs *pfs);
What This Function Does
It checks the Controller Pak ID area, assigns a new ID if this area is damaged, and repairs the Controller Pak file system. This function can be used if a PFS_ERR_ID_FATAL error code is returned
by the osPfsInitPak function. For details, see
osPfsInitPak.
If the function call is successful, a 0 is returned as the return value. If
an error occurs, one of following error codes is returned:
- PFS_ERR_NOPACK - Some type of PIF error has occurred; either the Controller Pak is not inserted into the specified Controller or the Controller is not properly connected. To determine which is the case, use the osContStartQuery or osContGetQuery function.
- PFS_ERR_NEW_PACK - A different Controller Pak has been inserted. To use the inserted Controller Pak, initialize it by calling osPfsInitPak.
- PFS_ERR_CONTRFAIL - Data transfer to or from the Controller has failed. If a transfer error occurs, up to three tries will be done internally, so this error is rarely seen. If it does occur, it is possible that either the Controller is not connected properly, or the Controller Pak or Controller Socket is damaged.
- PFS_ERR_INCONSISTENT - There is a problem in the file system's management area. Usually this error does not occur because osPfsChecker is called internally when you initialize the file system with osPfsInitPak. If this error is returned, either the Controller Pak is not connected properly, or the Controller Pak itself is damaged.
- PFS_ERR_INVALID - If this error is returned, an incorrect argument was specified when this function was called, the specified game note does not exist, or the Pfs function has been called without being initialized by calling osPfsInitPak. Therefore, usually
this error is not returned.
- PFS_ERR_ID_FATAL - The ID area was damaged when the file system was initialized. Repair was attempted but failed. The Controller Pak is broken, not properly connected, or a peripheral device with no SRAM is connected.
- PFS_ERR_DEVICE - When the device ID in the ID area of page 0 was checked at system initialization, it did not match the device
ID of the Controller Pak. In other words, a device other than the Controller Pak is inserted into the Controller.
See Also
osContInit
osContStartQuery
osContGetQuery
osPfsAllocateFile
osPfsChecker
osPfsDeleteFile
osPfsFileState
osPfsFindFile
osPfsFreeBlocks
osPfsInitPak
osPfsIsPlug
osPfsReadWriteFile
|
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
|
|