forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TOC reading

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development
View previous topic :: View next topic  
Author Message
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Thu Sep 01, 2005 2:54 am    Post subject: TOC reading Reply with quote

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
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Mon Sep 05, 2005 7:30 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
evilo



Joined: 22 Apr 2004
Posts: 230

PostPosted: Mon Sep 05, 2005 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Sat Sep 10, 2005 12:34 pm    Post subject: Reply with quote

This issue you're running into is probably what keeps VCDs from working on the PS2 as well.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PS2 Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group