It is currently Thu Mar 28, 2024 10:15 am


All times are UTC [ DST ]


Forum rules


When asking for help, make sure you are using the latest stable version of Daphne with the latest DaphneLoader. "For sale", auction, or ebay links do not belong here. Legal discussion is discouraged.



Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: DaphneLoader for linux can't read file names from DVD
PostPosted: Sat Jan 05, 2008 4:33 am 
Registered User
Registered  User

Joined: Sat Jan 05, 2008 4:15 am
Posts: 6
after two evenings searching the internet for a solution as to why I couldn't validate my DVD's I finally got Dragon's Lair and Dragon's Lair 2 to validate.

What I initially did was put the DVD in the drive and let daphneloader attempt to validate everything. It failed miserably. Something about specifying the directory root and then it exited.

I found a post about renaming the files in the config.xml file to all lower case, tried that, same problem.

I then decided to figure out what daphneloader was looking for so I ran the following command:

strace -f -e trace=file -o /tmp/output ./daphneloader

I quickly discovered that the loader was looking for these files:
Code:
10625 open("/media/video_ts/video_ts.bup", O_RDONLY|O_LARGEFILE) = 446
10625 open("/media/video_ts/video_ts.bup", O_RDONLY|O_LARGEFILE) = 446
.
.
.
10625 open("/media/video_ts/video_ts.bup", O_RDONLY|O_LARGEFILE) = 446
10625 open("/media/video_ts/video_ts.bup", O_RDONLY|O_LARGEFILE) = 446


Notice the filenames are all lower case problem is the DVD's are encoded as iso9660 format which means the file names are all 8x3 UPPERCASE names. WindoZe is not case sensitive with 8x3 filenames but Unix/Linux is.

The solution was to unmount the DVD (umount /media) and then remount the DVD with the following command:

mount -t iso9660 -o ro,check=relaxed /dev/cdrom /media

With check=relaxed, a filename is first converted to lower case before doing the lookup.

lo and behold the validation works, it is slow as molasses but that may be because I am using a USB DVD rom drive.

PA...


Top
Offline Profile  
 
 Post subject:
PostPosted: Tue Jan 08, 2008 6:33 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2127
Location: Salt Lake City,Utah, USA
Great work!

I have come across this problem before. It seems like the only real solution is to read the file names off the DVD and then do a case-insensitive compare to the file names that DaphneLoader is looking for and if there's a match, then load the file, using the name that was read from the DVD.

The reason I haven't done this is because it seems like a lot of work. :(


Top
Offline Profile  
 
 Post subject:
PostPosted: Wed Jan 09, 2008 3:46 pm 
Registered User
Registered  User

Joined: Sat Jan 05, 2008 4:15 am
Posts: 6
Unless I'm missing something the problem appears to be that daphneloader is trying to open a file by specifying the filename in lower case.

Since WindoZe is case insensitive for an 8.3 filename why not make the filename requests as uppercase. You already store the uppercase names in config.xml.

I was going to pull the source down for the 1.0 beta but found that it is not available yet so I couldn't see what's going on. (Then again I haven't programed anything in 20 years other than shell scripts so I'll probably be a little rusty :-))

The only problem with my solution is many (most? all?) current Linux distributions automount the CD/DVD's and normally don't include the "check=relaxed" option when mounting a CD/DVD. This would require the user to manually unmount and then remount the disc to the appropriate options.

Just a thought...


Top
Offline Profile  
 
 Post subject:
PostPosted: Mon Jan 14, 2008 9:26 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2127
Location: Salt Lake City,Utah, USA
pa23 wrote:
Unless I'm missing something the problem appears to be that daphneloader is trying to open a file by specifying the filename in lower case.


I used to have it open the files in upper case, but then my ubuntu wanted everything in lower case, so then I made it convert all the filenames to lowercase, but of course, there are distros out there that are uppercase. Why can't linux just be case insensitive for ISO file systems? :(


Top
Offline Profile  
 
 Post subject:
PostPosted: Tue Jan 15, 2008 2:50 am 
DAPHNE Team
DAPHNE Team

Joined: Mon Feb 12, 2001 1:00 am
Posts: 164
Quote:
I have come across this problem before. It seems like the only real solution is to read the file names off the DVD and then do a case-insensitive compare to the file names that DaphneLoader is looking for and if there's a match, then load the file, using the name that was read from the DVD.


Instead of going to all that trouble couldn't you just try to open the file with a lowercase name, and if that fails try it again in uppercase? I guess that wouldn't work if there is mixed case, but is that possible here?


Top
Offline Profile  
 
 Post subject:
PostPosted: Tue Jan 22, 2008 6:52 pm 
DAPHNE Creator
DAPHNE Creator

Joined: Sat Jan 20, 2001 1:00 am
Posts: 2127
Location: Salt Lake City,Utah, USA
Mark Broadhead wrote:
Quote:
I have come across this problem before. It seems like the only real solution is to read the file names off the DVD and then do a case-insensitive compare to the file names that DaphneLoader is looking for and if there's a match, then load the file, using the name that was read from the DVD.


Instead of going to all that trouble couldn't you just try to open the file with a lowercase name, and if that fails try it again in uppercase? I guess that wouldn't work if there is mixed case, but is that possible here?


That is an excellent suggestion.


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


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 post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net