INDEXSTN-2 | STN-3 | STN-4 | STN-5 | STN-6 | STN-9 | STN-18

STN-5

Read retry on Sega Saturn CD-ROM


 issue number:
STN-5
 date of issue:
94/10/07
 media:
○ Communication ● CD-ROM ○ Cartridge ○ Other
 connection:
● Program ○ Hard ○ Manual ○ Tools ○ Game ○ Bug ○ Other
 Information distinction:
● New regulations ○ Change ○ Addition
 importance:
● Strict adherence ○ Recommendation ○ Reference ○ Other
 Attachment:
○ None ● Yes
 Subject supplement:

Contents

When creating a Sega Saturn CD-ROM, be sure to perform a read retry in consideration of data errors.

■ Explanation

Although the CD-ROM has high error correction capability, uncorrectable errors may occur due to drive deterioration, disk scratches, eccentricity, dust on the disk, etc.
Therefore, in consideration of data error, be sure to perform read retry as well as "How to increase the number of ECC" (see attached document).
However, please note that the cause of the error etc. may not be clarified by performing read retry at the time of debugging.


Attachment

How to set ECC / retry count

■ Purpose

If an error occurs when reading the CD-ROM data, the default setting will not retry and the reading will be aborted.
→ [Return error status]

■ Setting method

The number of retries is set with the CDC_CdInit function. The settings will take effect if you make them before the desired CD playback. Actually, once it is set, the setting is valid until it is reset or soft reset, so it is usually appropriate to execute it at the beginning of the program (initialization, etc.).

◆ Caution
When you execute the CDC_CdInit function, the CD drive will be in the <PAUSE> state. Therefore, if you change the number of retries during CD playback, the settings will be changed. It will be in a state.

◆ Program example
	#include "sega_cdc.h"
	#define ECC 5 / * ECC repeat count: 5 times * /
	#define RETRY 0x0f / * Number of retries: 15 times * /

	/ * ECC / retry count setting (initialization flag, standby time are default values) * /
	CDC_CdInit (0,0, ECC, RETRY);

◆ Reference For the CDC_CdInit () function
  • "PROGRAMMER'S GUIDE VOL.1" CD Communication Interface User's Manual
  • STN-19 : How to initialize the CD block when using GFS

    ◆ Other
    If the CD drive status becomes <ERROR>, seek to the FAD where the data can be read correctly and play again.
    To find out the current FAD, issue the pause command once and then get the CD status information. Many times in the same place If it becomes, there may be irreparable scratches, so there is no choice but to skip it.

    ■ Sample program

    #include "sega_cdc.h"
    
    #define STS_MSK 0x0f / * Mask pattern for CD status * /
    
    Sint32 recovPlay (Sint32 fad);
    Sint32 waitStat (Sint32 sts);
    
    / * Restoration processing of CD playback (restart playback from the specified fad) * /
    Sint32 recovPlay (Sint32 fad)
    {
    	Sint32 Ret;
    	CdcPos pos;
    	CdcPly ply;
    	
    	/ * Seek to the desired position * /
    	CDC_POS_PTYPE (& pos) = CDC_PTYPE_FAD;
    	CDC_POS_FAD (& pos) = fad;
    	ret = CDC_CdSeek (& pos);
    	if (ret! = CDC_ERR_OK) {
    		return NG;
    	}
    	
    	/ * Wait until it is ready * /
    	ret = waitStat (CDC_ST_PAUSE);
    	if (ret! = OK) {
    		return ret;
    	}
    	
    	/ * Resume CD playback * /
    	CDC_PLY_STYPE (& ply) = CDC_PTYPE_NOCHG;
    	CDC_PLY_ETYPE (& ply) = CDC_PTYPE_NOCHG;
    	CDC_PLY_PMODE (& ply) = CDC_PM_NOCHG;
    	ret = CDC_CdPlay (& ply);
    	if (ret! = CDC_ERR_OK) {
    		return NG;
    	}
    	return OK;
    }
    
    / * Wait until the specified drive status is reached * /
    Sint32 waitStat (Sint32 sts)
    {
    	Sint32 ret;
    	Sint32 stwk;
    	CdcStat stat;
    	
    	while (TRUE) {/ * Actually, the upper limit of the number of loops is required * /
    		/ * Get regular response * /
    		ret = CDC_GetPeriStat (& stat);
    		if (ret == CDC_ERR_PERI) {
    			continue; continue;
    		}
    		if (ret! = CDC_ERR_OK) {
    			return NG;
    		}
    		stwk = (CDC_STAT_STATUS (& stat) & STS_MSK);
    		if (stwk == sts) {
    			brake;
    		}
    	}
    	return OK;
    }
     
    

  • that's all
    INDEXSTN-2 | STN-3 | STN-4 | STN-5 | STN-6 | STN-9 | STN-18
    Copyright SEGA ENTERPRISES, LTD., 1997