mfsHInitCasBoot

Syntax

s32 mfsHInitCasBoot(MfsFilehandle,u8 handleNum,u8 *company, u8* game,u8 dest)

Arguments

handle   File handle structure array pointer
handleNum   Number of file handle structures
*company   Company code
*game   Game code
dest   Destination code

Return value

Error

Function

Initializes libraries (for Game Pak booting)

Description

This function initializes the Leo library, MFS low-level library, and MFS high-level library so that the NINTENDO64 Disk Drive (64DD) can be accessed. This function is used when the Game Pak is used for booting.

When an application handles files, it prepares the MfsFileHandle structure array in a buffer for specified file handles. "handle" is the pointer to this buffer. The MfsFileHandle structure pointer is declared as MfsFile. The array size is specified by handleNum. The number of files that the application can open at the same time is equal to the number of file handles specified here.

The Nintendo-issued company code and game code (initial codes) are specified for company and game. Besides being recorded as file attributes, these are used to restrict file access.

"dest," which is the destination code, is used as disk information when the RAM area is formatted. The following values can be specified.

MFS_DESTINATION_JAPAN 0 Japan-oriented
MFS_DESITNATION_US 1 US-oriented

Main errors

MFS_ERR_NO Normal termination
MFS_ERR_DEVICE Device error
An error occurred in LeoC*CreateLeoManager(). Check the variable mfsError. The value returned from LeoC*CreateLeoManager() is stored here.