USB DVD Device Support
Home › Forums › Development › USB DVD Device Support
- This topic is empty.
-
AuthorPosts
-
February 8, 2011 at 10:09 pm #28321AnonymousInactive
Attached the code for:
– Read the DVD volume label and show it in the wiimc browser view
– Include the volume label in the restore points filenames (otherwise the vobs are always checked!)[Edit]
new ‘restore_points’ format:
tt@rodries
Thx for the hints.
About the open try signal, I need to catch the usb dvd notification.
About the usbstorage exception, latest rev. of usbstorage works in the console test app but it does’t work in wiimc
About commercial DVD, I try the fix for decrypt but it does not seem to work. I’d like to log the iso9660 function call.February 9, 2011 at 7:53 am #28322sonyParticipantI feel happy when I read this forum 😀 😀
Continue. Good job !!February 9, 2011 at 10:56 am #28323aka107Participant@clava wrote:
About the open try signal, I need to catch the usb dvd notification.
Ugg, I forgot it
Maybe a scsi command like http://en.wikipedia.org/wiki/SCSI_Test_Unit_Ready_Command
http://www.t10.org/lists/2op.htm Check this, I think you need
TEST UNIT READY and REQUEST SENSE (it’s in usbstorage.c __usbstorage_clearerrors function)
can you execute usb test with and without dvd inserted and post results?
http://www.wiimc.org/files/USB%20Test%201.12.zip
@clava wrote:About the usbstorage exception, latest rev. of usbstorage works in the console test app but it does’t work in wiimc
I can try to find the problem if you send to me your wiimc.elf & the codedump number (a photo or only the numbers in the section under “STACK DUMP”)
@clava wrote:About commercial DVD, I try the fix for decrypt but it does not seem to work. I’d like to log the iso9660 function call.
You need the usbgecko
February 9, 2011 at 11:02 am #28324AnonymousInactive@rodries wrote:
You need the usbgecko
… I know 😉
About other things I’ll try and give you feedback asap.
February 9, 2011 at 11:41 am #28325aka107ParticipantFebruary 10, 2011 at 10:39 pm #28326AnonymousInactive@rodries wrote:
Ugg, I forgot it
Maybe a scsi command like http://en.wikipedia.org/wiki/SCSI_Test_Unit_Ready_Command
http://www.t10.org/lists/2op.htm Check this, I think you need
TEST UNIT READY and REQUEST SENSE (it’s in usbstorage.c __usbstorage_clearerrors function)
can you execute usb test with and without dvd inserted and post results?
http://www.wiimc.org/files/USB%20Test%201.12.zipAttached a zip with the logs.
@rodries wrote:I can try to find the problem if you send to me your wiimc.elf & the codedump number (a photo or only the numbers in the section under “STACK DUMP”)
Unfortunately the STACK DUMP section was empty… so I debugged the code…
The problem seem to be in the __cycle() function. I restored the condition on ETIMEOUT for the assignment to retval, and this solve the issue:
if (retval < 0) {
if (__usbstorage_reset(dev) == USBSTORAGE_ETIMEDOUT)
retval = USBSTORAGE_ETIMEDOUT;
}
Moreover I restored your old USBStorage_IsDVD() function:
s32 USBStorage_IsDVD()
{
u32 sectorsize,numSectors;
if(!__mounted)
return 0;
USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors);
if(sectorsize>512) return 1;
return 0;
}
The new one does’n detect the device (wakeup issue?)
February 11, 2011 at 8:50 am #28327aka107Participant@clava wrote:
@rodries wrote:
Ugg, I forgot it
Maybe a scsi command like http://en.wikipedia.org/wiki/SCSI_Test_Unit_Ready_Command
http://www.t10.org/lists/2op.htm Check this, I think you need
TEST UNIT READY and REQUEST SENSE (it’s in usbstorage.c __usbstorage_clearerrors function)
can you execute usb test with and without dvd inserted and post results?
http://www.wiimc.org/files/USB%20Test%201.12.zipAttached a zip with the logs.
Thks
Seems that the only way to detect if the dvd is inserted is calling to USBStorage_ReadCapacity
So if you use my old USBStorage_IsDVD then it will return 0 if dvd is not inserted
@clava wrote:@rodries wrote:
I can try to find the problem if you send to me your wiimc.elf & the codedump number (a photo or only the numbers in the section under “STACK DUMP”)
Unfortunately the STACK DUMP section was empty… so I debugged the code…
The problem seem to be in the __cycle() function. I restored the condition on ETIMEOUT for the assignment to retval, and this solve the issue:
if (retval < 0) {
if (__usbstorage_reset(dev) == USBSTORAGE_ETIMEDOUT)
retval = USBSTORAGE_ETIMEDOUT;
}
Uggh, my fault I’ll tell to Tantric to restore it
@clava wrote:
Moreover I restored your old USBStorage_IsDVD() function:
s32 USBStorage_IsDVD()
{
u32 sectorsize,numSectors;
if(!__mounted)
return 0;
USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors);
if(sectorsize>512) return 1;
return 0;
}
The new one does’n detect the device (wakeup issue?)
The new one is using a specific function to detect media type, maybe we can use both methods, anyway a dvd must return 2048 sector size.
You have to do the tests, it’s your decision because you are the only one with a usb dvdFebruary 11, 2011 at 9:16 am #28328AnonymousInactive@rodries wrote:
The new one is using a specific function to detect media type, maybe we can use both methods, anyway a dvd must return 2048 sector size. You have to do the tests, it’s your decision because you are the only one with a usb dvd
Rodries, If you don’t see other drawback, i’d suggest to restore the old DVD detection function (adding the __mounted condition):
s32 USBStorage_IsDVD()
{
u32 sectorsize,numSectors;
if(!__mounted)
return 0;
USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors);
if(sectorsize>512) return 1;
return 0;
}
@rodries wrote:
Seems that the only way to detect if the dvd is inserted is calling to USBStorage_ReadCapacity
So if you use my old USBStorage_IsDVD then it will return 0 if dvd is not insertedOk. I have to check the code for detecting the device changes.
February 11, 2011 at 11:03 pm #28329checkme2807ParticipantI have an external DVDR Drive (Samsung), already posted the log on the USB test thread, but in case you find it useful I attached it to this reply.
I did the test without a disc in the drive, don’t know if I shoud try it again with a disc inside, let me know and I’ll get it done.
Thanks for keeping up!
CheersFebruary 13, 2011 at 9:24 pm #28331AnonymousInactiveSeems that the only way to detect if the dvd is inserted is calling to USBStorage_ReadCapacity
So if you use my old USBStorage_IsDVD then it will return 0 if dvd is not insertedWhat about adding something like this:
if(__mounted) {
u32 sectorsize, numSectors;
if (USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors) < 0)
return false;
else
return true;
}
at the beginning of __usbstorage_IsInserted()? It works in wiimc 😀
@mugre1975
the latest svn revision supports external usb dvd readers. There are still some open issues (e.g. disc change detection or wrong advancement bar when setting “Skip to Main Title”) but it works… at least with my HP usb dvd reader.
If you’re interested, you can download wiimc and libogc source code, and build the latest svn revision. Alternatively, you can send me a p.m. with your email address so I can send you the custom build of the latest wiimc revision.February 14, 2011 at 12:20 pm #28332checkme2807ParticipantClava
I’m actually a newbie in Linux, I’ve been doing some experiments with Whiite Linux (I’ve even compiled my own kernel with external USB drive support!), and Xine, hoping to achieve what you’re about to with WiiMC: External DVD playback through Wii. But I had no luck (Xine goes too slow and I’m still figuring out how to set it up).
Anyway, all of this is kinda off topic, what I’m trying to say is that I’ll gladly take your version to perform some tests of my own with original and backup movies and give you feedback if you wish to.
I’m no coder so I’ll try to help whatever else way I can.
CheersFebruary 14, 2011 at 5:16 pm #28333AnonymousInactiveHi mugre1975,
Could you send me a PM with your email address, so I can send you the .dol?February 14, 2011 at 6:06 pm #28334aka107Participant@clava wrote:
Seems that the only way to detect if the dvd is inserted is calling to USBStorage_ReadCapacity
So if you use my old USBStorage_IsDVD then it will return 0 if dvd is not insertedWhat about adding something like this:
if(__mounted) {
u32 sectorsize, numSectors;
if (USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors) < 0)
return false;
else
return true;
}
at the beginning of __usbstorage_IsInserted()? It works in wiimc 😀
uhmm, I think we can add another condition to check only if the usb device is a dvd, only for security
if(__mounted && __usbfd.sector_size[__lun]==2048) { //mounted and a dvd
u32 sectorsize, numSectors;
if (USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors) < 0)
return false;
else
return true;
}
Can you test it using a ios different from ios58?
I want to be sure that works with usb1 and not only with usb2
__mounted is handled in a different way in usb1Also Tantric has to commit 2 fixes in usbstorage.c I guess he will do it very soon
February 14, 2011 at 10:04 pm #28335AnonymousInactive@rodries wrote:
uhmm, I think we can add another condition to check only if the usb device is a dvd, only for security
if(__mounted && __usbfd.sector_size[__lun]==2048) { //mounted and a dvd
u32 sectorsize, numSectors;
if (USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors) < 0)
return false;
else
return true;
}
Ok, it is safer, calls ReadCapacity() only if necessary, and works (tested!).
@rodries wrote:
Can you test it using a ios different from ios58?
I want to be sure that works with usb1 and not only with usb2
__mounted is handled in a different way in usb1I tested IOS61 calling IOS_ReloadIOS(61) at the beginnig of the wiimc’s main (is it right?). Unfortunately I got an exception when I connected the usb dvd device. Next days I’ll try to catch the stack dump.
February 14, 2011 at 10:37 pm #28336AnonymousInactive@clava wrote:
@rodries wrote:
uhmm, I think we can add another condition to check only if the usb device is a dvd, only for security
if(__mounted && __usbfd.sector_size[__lun]==2048) { //mounted and a dvd
u32 sectorsize, numSectors;
if (USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors) < 0)
return false;
else
return true;
}
Ok, it is safer, calls ReadCapacity() only if necessary, and works (tested!).
… it works but I fear we changed the right execution flow!
The right code should be:
if(__mounted) {
if (__usbfd.sector_size[__lun]==2048) {
// dvd requires further checks
u32 sectorsize, numSectors;
if (USBStorage_ReadCapacity(&__usbfd, __lun, §orsize, &numSectors) < 0)
return false;
else
return true;
} else
return true;
}
-
AuthorPosts
- You must be logged in to reply to this topic.