issue number: | STN-5 | ||||||
---|---|---|---|---|---|---|---|
date of issue: | 94/10/07 | ||||||
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: |
When creating a CD-ROM for Sega Saturn, be sure to perform a read retry in consideration of data errors. |
Although CD-ROMs have a high level of error correction ability, uncorrectable errors may occur due to drive deterioration, disc scratches, eccentricity, dust attached to the disc, etc.
Therefore, in consideration of data errors, be sure to perform read retries in addition to "How to increase the number of ECCs" (see attached document) .
However, please note that when debugging, etc., by performing a read retry, the cause of an error may not be known.
#include "sega_cdc.h" #define ECC 5 /* ECC repetition count: 5 times */ #define RETRY 0x0f /* Number of retries: 15 times */ /* Setting ECC/retry count (initialization flag, standby time are default values) */ CDC_CdInit(0,0,ECC,RETRY);
#include "sega_cdc.h" #define STS_MSK 0x0f /* CD status mask pattern */ Sint32 recovPlay(Sint32 fad); Sint32 waitStat(Sint32 sts); /* CD playback recovery process (resume playback from specified fad) */ Sint32 recovPlay(Sint32 fad) { Sint32 Ret; CdcPos pos; CdcPly ply; /* Seek to destination */ CDC_POS_PTYPE(&pos) = CDC_PTYPE_FAD; CDC_POS_FAD(&pos) = fad; ret = CDC_CdSeek(&pos); if (ret != CDC_ERR_OK) { return NG; } /*<PAUSE> Wait until the state */ 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 */ Sint32 waitStat(Sint32 sts) { Sint32 ret; Sint32 stwk; CdcStat stat; while (TRUE) { /* We actually 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_STAT_STATUS(&stat) & STS_MSK); if (stwk == sts) { brake; } } return OK; }