Japanese
FAQSGL programming related
BackForward
FAQ/SGL programming related

CD access



I want to perform detailed CD access using SGL.

Q)
I cannot find a function (obtaining sector size, number of sectors, etc.) equivalent to SBL's GFS_GetFileSize() in the SGL CD-ROM library. What should we do to achieve this?

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

These functions can be used in the current SGL, but if you find it necessary to use SGL's slCd* functions midway through, initialize SGL's internal variables with slCdInit, and when returning, It is necessary to reinitialize it using SBL's initialization functions such as GFS_Init/STM_Init/CDC_CdInit.


What if I want to read data multiple times?

Q)
If I want to open multiple files, is there a way other than calling the slCdOpen function for each file?

Also, if you have a file that you want to read data from many times, you can read it again without closing it (for example, when reading data into the same area alternately and processing it), or seek to a location in the file and read any byte. Is there a way to read numbers?

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


What is CDKEY?

Q)
I don't really understand CDKEY, where should I read the manual?

A)
CDKEY is described in SGL's TUTORIAL, but each sector has a subheader to identify the CD-ROM's multitrack format. The information in this subheader is CDKEY, which allows you to determine the type of sector information.

Since MODE 1 is a single sector, 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