| View previous topic :: View next topic |
| Author |
Message |
evilo

Joined: 22 Apr 2004 Posts: 230
|
Posted: Thu Sep 01, 2005 2:54 am Post subject: TOC reading |
|
|
Hi all,
I'm trying to read a cd TOC without using the CdGetToc() functions,
so concretely, instead of doing :
| Quote: |
unsigned char raw_toc[1024];
CdGetToc(raw_toc);
|
that is actually working, i'm doing :
| Quote: |
unsigned char raw_toc[2352];
cd_read_mode_t mode;
mode.trycount = 32;
mode.spindlctrl = CdSpinNom;
mode.datapattern = CdSecS2048;
mode.pad = 0;
CdDiskReady(0);
// read first sector at sector 0
CdReadCdda(0, 1, &raw_toc[0], &mode);
CdSync(0);
|
I then ouptut the buffer content, but it always return blank after the call to CdReadCdda. Ah and yes, I'm using CdReadCdda because I'm reading from a CDDA disc (so CdRead doesn't work with that type of disc).
Anyone has an idea of what's wrong here, and how it could be achieved properly ?
thanks beforehand,
evilo |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Mon Sep 05, 2005 7:30 am Post subject: |
|
|
| The TOC isn't part of the normal CD data. CDDA reads the data in tracks identified by the TOC. It won't read the TOC itself. Drives have a special command to do that, and the only access to that special command on the PS2 is with CdGetTOC(). |
|
| Back to top |
|
 |
evilo

Joined: 22 Apr 2004 Posts: 230
|
Posted: Mon Sep 05, 2005 9:04 am Post subject: |
|
|
hi JF,
yes that's what Pixel explained me also... I just thougth it was at sector 0... I was wrong..
I wanted to do that for people swapping, as CDDA tracks are not working for them (in neocd), so I was thinking to do that to "manually" get the TOC of the CD currently present in the tray and get back the tracks informations (instead of having the "cached" TOC),
no luck !
Thank you,
evilo |
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Sat Sep 10, 2005 12:34 pm Post subject: |
|
|
| This issue you're running into is probably what keeps VCDs from working on the PS2 as well. |
|
| Back to top |
|
 |
|