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





osPfsReSizeFile

This function has been omitted beginning from Version OS 2.0I.

Syntax

#include <ultra64.h>
s32 osPfsReSizeFile(OSPfs *pfs, u16 company_code, u32 game_code, 
u8 *game_name, u8 *ext_name, int length);
Explanation
osPfsReSizeFile increases and decreases the size of existing game notes. However, since attempting to change the number of pages during a game may confuse the game user, use of this function should be minimized.

Information specified for game notes is the company code (company_code), game code (game_code), game name (game_name), extension (ext_name), and the new note size (length). Although the size is expressed in bytes, it must actually be allocated as a number of pages, so it should be specified as a multiple of 256.

When game note size is decreased, the area that is removed can no longer be read. When the size is increased, the area that is added is set to 0x00.

If the function is successful, 0 is returned; otherwise, the following error codes are returned.

PFS_ERR_NOPACK
A Controller Pak has not been inserted in the specified controller. Or some type of PIf error was issued for a reason such as the controller not being inserted. Means such as using osContStartQuery(3P) and osContGetQuery(3P) should be employed to check which of these is the cause.

PFS_ERR_NEW_PACK
A different Controller Pak has been inserted. If this Controller Pak is to be used, call osPfsInitPak (3P) to initialize it.

PFS_ERR_INCONSISTENT
An abnormality is present in the file system management area. This error usually does not occur because osPfsChecker (3P) is called internally when osPfsInitPak (3P) is used to initialize the file system. If this error is returned, the connection may be bad or an abnormality may be present in the Controller Pak itself.

PFS_ERR_CONTRFAIL
Data transmission to or from the controller failed. When a transmission error occurs, the function internally makes up to 3 more transmission attempts. Thus, this error is not often issued. If the error is returned, the controller may not be properly connected, or an abnormality may exist in the Controller Pak or controller connector.

PFS_ERR_INVALID
An incorrect argument was specified for a parameter when the function was called, the specified game note does not exist, or the function Pfs was called without initialization by osPfsInitPak (3P). This error usually is not returned.

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 March 1998