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: |
![]() | When creating a Sega Saturn CD-ROM, be sure to perform a read retry in consideration of data errors. |
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.
#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);
#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; }