Japanese
INDEX ▲ | STN-6 | STN-9 | STN-19 | STN-21 | STN-22 | STN-23 | STN-24

STN-21

Recovery of GFS_Init,GFS_LoadDir functions


 issue number:
STN-21
 date of issue:
95/01/20
 media:
○Common ●CD-ROM ○Cartridge ○Others
 connection:
●Program ○Hard ○Manual ○Tools ○Game ○ Bug ○Others
 Information distinction:
●New ○Change ○Addition
 importance:
●Strict observance ○Recommended ○Reference ○Others
 attached file:
●No ○ Yes
 Subject supplement:
Target library: GFS Ver1.15

Contents

■Countermeasures

If an error occurs in the GFS_Init or GFS_LoadDir functions, take the following actions.

●For GFS_ERR_CDRD,GFS_ERR_FATAL errors
GFS_Init sets the ECC/read retry count to the maximum to avoid <ERROR> status as much as possible. Also,<FATAL> If this happens, issue a stop command (seek to home position) for recovery.
□If these errors occur, wait until the "PAUSE" state is reached after issuing the pause command as shown in the program example in the attached document, and then try again. The number of times the re-execution can be repeated is 3 or more.
□If an error occurs even after repeated executions, the disc may be scratched and cannot be repaired. Please display the message or switch to multiplayer.

●For GFS_ERR_CDNODISC,GFS_ERR_CDOPEN errors
Please move to multiplayer.

●For other errors
This is an error that should never occur. Please review your program.
There may be a problem with the GFS library or hardware, so if you cannot find the cause, please contact us.
In the retail version, the only option is to move to multiplayer.

■Sample program


#include "sega_cdc.h"
Sint32 recocGfsInit(void);
Sint32 waitStat(Sint32sts);

/*GFS_Init,GFS_LoadDir return processing*/
Sint32 revovGfsInit(void)
{
	Sint32 ret;
	CdcPos pos;
	/*Issue pause command*/
	CDC_POS_PTYPE(&pos) = CDC_PTYPE_NOCHG;
	ret = CDC_CdSeek(&pos);
	if(ret != CDC_ERR_OK){
		return NG;
	}
	/*Wait until "PAUSE" state*/
	ret = waitStat(CDC_ST_PAUSE);
	return ret;
}
/*Wait until the specified drive status is reached*/
Sint32 waitStat(Sint32 sts)
{
	Sint32 ret;
	Sint32 stwk;
	CdcStat stat;

	while (TRUE) { /*Actually, we need an upper limit on the number of loops*/
		/*Get periodic response*/
		ret = CDC_GetPeriStat(&stat);
		if(ret == CDC_ERR_PERI){
			continue;
		}
		if(ret != CDC_ERR_OK){
			return NG;
		}
		stwk = CDC_GET_STC(&stat);
		if(stwk == sts){
			brake;
		}
	}
	return OK;
}
that's all
INDEX ▲ | STN-6 | STN-9 | STN-19 | STN-21 | STN-22 | STN-23 | STN-24
Copyright SEGA ENTERPRISES, LTD., 1997