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 

LIBCDVD - does it work for DVD-ROM disks?

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



Joined: 08 May 2004
Posts: 92
Location: Czech Republic

PostPosted: Sat May 08, 2004 11:33 pm    Post subject: LIBCDVD - does it work for DVD-ROM disks? Reply with quote

I've tested the libcdvd 1.15 example program. It works, but only when CD-ROM is inserted. When the DVD-ROM (original of course, for example demo disk included in ps2 mag, or game) is inserted, the directory structure is empty (black screen, or the TOC is not cleared and the old directory strucutre remains on the screen). When some CD-ROM ps1 or ps2 disk is inserted then it works correctly.
The disk was changed by regular method - eject button (not the cog swap).
I'm using independence exploit on non-moded ps2 and naplink 1.1.
Any Idea how to access DVD-ROM using libcdvd on non moded machine?

Ole
Back to top
View user's profile Send private message
ole



Joined: 08 May 2004
Posts: 92
Location: Czech Republic

PostPosted: Sun May 09, 2004 8:29 pm    Post subject: Solved! Reply with quote

Found the reason of that malfunction.
TOC size and DIR size is not allways padded to 2048 bytes (sometimes is less) and it results in bad sector_size computation (CachedDirInfo.sector_num = CDVolDesc.rootToc.tocSize>>11; // gives a result 0).
This simlpification (>>11) gives incorrect sector size and is used in about 3 places in the cdvd_iop.c source code.
I changed this formula to something like that:

Code:
int getSectorCount(int dirSize) {
   int result = dirSize / 2048;
   if ((dirSize % 2048 ) > 0) {
      result++;
   }
   return result;
}

and finaly LIBCDVD works just fine with the DVD-ROMs.

Ole
Back to top
View user's profile Send private message
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