USB DVD Device Support

Home Forums Development USB DVD Device Support

  • This topic is empty.
Viewing 15 posts - 31 through 45 (of 54 total)
  • Author
    Posts
  • #28321
    Anonymous
    Inactive

    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.

    #28322
    sony
    Participant

    I feel happy when I read this forum 😀 😀
    Continue. Good job !!

    #28323
    aka107
    Participant

    @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

    #28324
    Anonymous
    Inactive

    @rodries wrote:

    You need the usbgecko

    … I know 😉

    About other things I’ll try and give you feedback asap.

    #28325
    aka107
    Participant

    @clava wrote:

    @rodries wrote:

    You need the usbgecko

    … I know 😉

    You know what you need to do to get one 😉
    @clava wrote:

    About other things I’ll try and give you feedback asap.

    ok

    #28326
    Anonymous
    Inactive

    @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.zip

    Attached 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, &sectorsize, &numSectors);
    if(sectorsize>512) return 1;
    return 0;
    }

    The new one does’n detect the device (wakeup issue?)

    #28327
    aka107
    Participant

    @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.zip

    Attached 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, &sectorsize, &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 dvd

    #28328
    Anonymous
    Inactive

    @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, &sectorsize, &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 inserted

    Ok. I have to check the code for detecting the device changes.

    #28329
    checkme2807
    Participant

    I 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!
    Cheers

    #28331
    Anonymous
    Inactive

    @Rodries
    @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 inserted

    What about adding something like this:


    if(__mounted) {
    u32 sectorsize, numSectors;
    if (USBStorage_ReadCapacity(&__usbfd, __lun, &sectorsize, &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.

    #28332
    checkme2807
    Participant

    Clava

    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.
    Cheers

    #28333
    Anonymous
    Inactive

    Hi mugre1975,
    Could you send me a PM with your email address, so I can send you the .dol?

    #28334
    aka107
    Participant

    @clava wrote:

    @Rodries
    @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 inserted

    What about adding something like this:


    if(__mounted) {
    u32 sectorsize, numSectors;
    if (USBStorage_ReadCapacity(&__usbfd, __lun, &sectorsize, &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, &sectorsize, &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 usb1

    Also Tantric has to commit 2 fixes in usbstorage.c I guess he will do it very soon

    #28335
    Anonymous
    Inactive

    @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, &sectorsize, &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 usb1

    I 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.

    #28336
    Anonymous
    Inactive

    @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, &sectorsize, &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, &sectorsize, &numSectors) < 0)
    return false;
    else
    return true;
    } else
    return true;
    }
Viewing 15 posts - 31 through 45 (of 54 total)
  • You must be logged in to reply to this topic.

Login

Lost Password