FAQSGL programming related
BackForward
FAQ / SGL programming related

CD access



I want to access a detailed CD with SGL.

Q)
I can't find the function (acquisition of sector size, number of sectors, etc.) equivalent to GFS_GetFileSize () of SBL in the SGL CD-ROM library. How can we achieve this?

A)
Basically, the functions related to the SGL file system have only basic functions. If you want to perform advanced CD operations, you need to use the CDC / STM / GFS functions provided for SBL because that is not enough.

These functions can be used in the current SGL, but if you need to use the slCd * function group of SGL in the middle, slCdInit initializes the internal variables of SGL, and when you return to the original, It is necessary to reinitialize with the initialization function such as GFS_Init / STM_Init / CDC_CdInit of SBL.


What if I want to read the data many times?

Q)
If you want to open multiple files, is there any other way than calling the slCdOpen function for the number of files?

Also, if there is a file for which you want to read data many times, you can read it again without closing it (such as when reading alternately in the same area for processing), or seek to the location of the file and use any byte. Is there a way to read numbers?

A)
To be honest, the CD function (slCd *) that comes with SGL is very low-performance and is not suitable for complex CD access. (For example, functions such as immediate return and look-ahead)
The GFS library and stream library CDC library, which were originally SBL functions, can be used for the current SGL.
We recommend that you use these functions.


What is a CDKEY?

Q)
I'm not sure about the CDKEY, where should I read the manual?

A)
The CDKEY is described in the SGL STRUCT, but each sector has a subheader to identify the multitrack format of the CD-ROM. The information in this subheader is the CD KEY, and the type of sector information can be determined from this.

Since it is a single sector in MODE 1, the value of CDKEY does not need to be considered as CDKEY_NONE.

reference
"SGL / Tutorial" 12. CD-ROM library


BackForward
FAQSGL programming related
Copyright SEGA ENTERPRISES, LTD ,. 1997