Japanese
PROGRAMMER'S GUIDEFile system library
Back | ■
file system library

Appendix B

How to deal with errors


We will explain the causes and solutions for the error codes below.

GFS_ERR_CDRD

Cause:
A read error occurred in the CD block.
handle:
If a read error occurs in GFS_NwExecOne or GFS_NwExecServer , GFS_ERR_CDRD is returned as the function value, but if you call the server function as is, recovery processing will be performed. Completion return type access only returns GFS_ERR_CDRD and does not perform recovery processing. In this case, try loading the file again.
If read errors occur frequently, check the CD-ROM hardware and media.

GFS_ERR_CDNODISC

Cause:
CD-ROM is not set.
handle:
Insert the CD-ROM and try again.

GFS_ERR_CDROM

Cause:
A non-CD-ROM disc is inserted.
handle:
Please insert the correct CD-ROM and try again.

GFS_ERR_DIRTBL

Cause:
The contents of the directory management structure are invalid.
handle:
Before calling GFS_Init and GFS_LoadDir , check whether any values have been forgotten or invalid values have been set for each member of the directory management structure.

GFS_ERR_OPENMAX

Cause:
The maximum open count value is invalid.
handle:
Check whether the maximum open number specified in the GFS_Init call does not exceed the range of 1 to 24.

GFS_ERR_DIR

Cause:
The specified file is not a directory.
handle:
Check the correspondence between the file identifier and the file.

GFS_ERR_CDBFS

Cause:
An attempt was made to use the CD block file system even though the use has not been declared.
handle:
If you use the CD block file system, call GFS_Init with NULL specified as the address of the directory management area.
If you do not use a CD block file system, do not specify NULL for GFS_LoadDir and GFS_SetDir .

GFS_ERR_NONAME

Cause:
Filenames cannot be handled in the current directory.
handle:
Specify the directory management area with GFS_DIR_NAME set in GFS_DIRTBL_TYPE and call GFS_Init or GFS_LoadDir .

GFS_ERR_NEXIST

Cause:
The specified file name does not exist.
handle:
Please check whether the current directory setting or file name specification is correct.

GFS_ERR_FID

Cause:
The file identifier specification is invalid.
handle:
Check whether the specified file identifier does not exceed the range of GFS_DIR_NDIR of the directory management structure set for the current directory.

GFS_ERR_HNDL

Cause:
Invalid file handle.
handle:
Make sure that you have not forgotten to set the GFS_Open function value to the variable that stores the file handle, and that you have not destroyed the contents of that variable.

GFS_ERR_SEEK

Cause:
Seek position is invalid.
handle:
Check the seek position calculated from the reference position and offset.

GFS_ERR_ORG

Cause:
The reference position of GFS_Seek is invalid.
handle:
Please confirm that the reference position is one of GFS_SEEK_SET, GFS_SEEK_CUR, or GFS_SEEK_END .

GFS_ERR_NUM

Cause:
The number of bytes was specified as negative.
handle:
Check the number of bytes specified in GFS_ByteToSct .

GFS_ERR_OFS

Cause:
Offset is invalid.
handle:
Check the read start sector position specified by GFS_Load .

GFS_ERR_FBUSY

Cause:
Processing remains for the specified file handle.
handle:
Either modify the program to access the target file again after it has finished accessing it, or reconsider the file structure.

GFS_ERR_PARA

Cause:
Invalid parameter.
handle:
Make sure each of the following functions is given the correct arguments.

GFS_ERR_BUSY

Cause:
An attempt was made to perform multiple processing.
handle:
See 6.3 Multiprocessing .

GFS_ERR_NOHNDL

Cause:
There is no free space on the file handle.
handle:
Increase the maximum number of files that can be opened simultaneously with GFS_lnit , or reduce the number of files that can be opened simultaneously.

GFS_ERR_FATAL

Cause:
CD drive<FATAL> condition.
handle:

  1. For GFS_Init , GFS_LodDir , please run again.

  2. While reading a file, close the file, open it again, and read it again.

  3. If an error occurs even after repeated executions, there may be a malfunction. Please display the message or go to multiplayer.


GFS_ERR_PUINUSE

Cause:
GFS_CdMovePickup was called during pickup operation.
handle:
Please call GFS_CdMovePikup when no file is being accessed.

GFS_ERR_ALIGN

Cause:
The file being read into is not aligned on a word boundary.
handle:
Align the read area on word boundaries.

GFS_ERR_TMOUT

Cause:
No response was received from CD Block within the given time.
handle:
There may be a hardware problem.

GFS_ERR_CDOPEN

Cause:
CD drive tray is open.
handle:
Call SYS_EXECDMP() to return to multiplayer.

Even when the DCHG bit (bit5) of the CD block interrupt factor register (HIRQREQ) is 1, the tray is treated as open.
During development, please check that the CD status is not open and clear the DCHG bit before calling GFS_Init .
In the retail version, the BOOT ROM clears the DCHG flag, so applications should not clear it.


GFS_ERR_BFUL

Cause:
When the eject mode is GFS_GMODE_RESIDENT , the CD buffer becomes full and reading is aborted.
handle:
When the retrieval mode is GFS_GMODE_RESIDENT, adjust the access order and read amount so that the CD buffer does not become full.

Back | ■
PROGRAMMER'S GUIDEFile system library
Copyright SEGA ENTERPRISES, LTD., 1997