About GD Rom Drive reading a CD Rom

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

About GD Rom Drive reading a CD Rom

Post by Newbie »

Hi everybody,

Some days ago, I start using KOS CD Rom access routines but a question "ring" my mind :
GD Rom drive is CLV or CAV ? (I have seen contradictory information about that on the net).

I have seen several time that GD Rom speed is 12X :

- Is it always 12X ?
- Is it the max value ?
- Could it be possible to set the speed ?

Thanks for your attention.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: About GD Rom Drive reading a CD Rom

Post by BlueCrab »

It is CAV. 12x is the max, and it is indeed possible to set other speeds -- but not using the high-level interface, as far as I know.

That said, there's usually very little reason to set it below the default, which (generally speaking here) is the maximum supported by the inserted medium in the drive.
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

Re: About GD Rom Drive reading a CD Rom

Post by Newbie »

Thanks.

Reading some articles about GD Rom structure, I have a question :

It seems that on a GD Rom the sectors have the usual logical size (in bytes) but not the same length (in pits) depending the zone they are located in disc.

So I want to know, in a regular CD Rom (80 minutes / 700 MB), are the sectors physically the same length even if they are located in different areas (like inner and outer edge) ?

Because, if Dreamcast drive is CAV and sectors have the same physical length : it will mean that the console read not the same amount of data when the drive seeks in inner and outer edge for a same rotation at constant time interval ....

Those assumptions are important because it will be mandatory to push all data on a CD Rom to the edge to optimize access time and seek time.

Thanks for help.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: About GD Rom Drive reading a CD Rom

Post by BlueCrab »

Yes, it is faster to have the data pushed to the outer edge of a disc for reading it. That's why people have used dummy files (very large blank files placed at the beginning of the disc) to do just that on various releases.
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

Re: About GD Rom Drive reading a CD Rom

Post by Newbie »

Thanks again.

I have some more questions but it will be only "CD Rom related" topic (not Dreamcast), is there a specific discussion room I can post in http://dcemulation.org or if not another forum web site ?

Thanks.
|darc|
DCEmu Webmaster
DCEmu Webmaster
Posts: 16373
Joined: Wed Mar 14, 2001 6:00 pm
Location: New Orleans, LA
Has thanked: 103 times
Been thanked: 90 times
Contact:

Re: About GD Rom Drive reading a CD Rom

Post by |darc| »

I don't think it would be a problem just asking the question in this thread.
It's thinking...
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

Re: About GD Rom Drive reading a CD Rom

Post by Newbie »

Ok so some questions about CD Rom :

Reading ECMA specifications, it seems that all datas are located in the "Program area".

I see on Wikipedia that a 700 M Bytes / 80 Minutes CD ROM holds 360000 sectors.

Are all those sectors located only in the Program area or is it located in a region starting from "Lead In area" and finishing in "Lead Out Area" ?

By the way, I want to compute a theoric sector length.

By making division between total spiral length and sector numbers, if I use only "Program area" length, I obtain something around 15 millimeters : it's huge ... Perhaps the length is not occupied by only sectors but sync datas too reducing my theoric sector length ?

Finally are those equations correct using 12X CAV drive :
12X = 12 * 1X = 12 * 200 RPM = 12 * 150 KiB/s

Thanks.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5652
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: About GD Rom Drive reading a CD Rom

Post by BlueCrab »

If I'm not mistaken, the lead-in and lead-out are part of that total sector count, since you will have one lead-in/lead-out per session on the disc.

Sectors contain more than just the 2048 bytes of data that is in them, including subcodes, so each physical sector is actually 2352 bytes long.

Your theoretical sector length doesn't seem too far off, based on what I remember, but obviously it's not something I really have looked into.

As for your equations, they seem fine to me, but once again, I'm no expert on the topic.
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

Re: About GD Rom Drive reading a CD Rom

Post by Newbie »

Thanks
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

Re: About GD Rom Drive reading a CD Rom

Post by Newbie »

Using CD ROM sector read function in KOS, is it possible to read all sector on the CD Rom ?
I try to read sector 0 to test but the function return me an error type SYSTEM ERROR (3).

Thanks for help
User avatar
Newbie
Insane DCEmu
Insane DCEmu
Posts: 171
Joined: Sat Jul 27, 2013 1:16 pm
Has thanked: 0
Been thanked: 0

Re: About GD Rom Drive reading a CD Rom

Post by Newbie »

Well,

I ask about a reading scenario sector with a specific number on a bootable DC disc (a two or more session disc) using KOS sector read function.

First is the sector number a relative or absolute addressing number ?

For example, if I ask for sector 14598, is it the 14599 th sector of the entire disk returned or the 14599 th sector of the current session ?

Then, if it is a relative number what session is used to ? Is there a mean to select the session from where the sector is returned ?

Thanks.
Post Reply