USB DVD Device Support

Home Forums Development USB DVD Device Support

  • This topic is empty.
Viewing 15 posts - 16 through 30 (of 54 total)
  • Author
    Posts
  • #28309
    rodries
    Keymaster

    I committed a change for this, maybe it’s fixed now?

    #28310
    Anonymous
    Inactive

    Thanks Tantric, I’ll test your fix as soon I can… real-life duties are a common problem!!!

    #28305
    Anonymous
    Inactive

    Hi Tantric,
    there is still a type cast to add to the _ISO9660_read_r() function:

    offset = (u64)file->entry.sector * SECTOR_SIZE + file->offset;

    With this last patch, I’m able to play DVDs from my usb dvd drive, using both dvd and dvdnav!
    If you plan to add iso9660 support for usb devices in wiimc, I can arrange a zip (or a svn patch, if you prefer), with the modified source code.
    Thanks for your help.

    #28306
    rodries
    Keymaster

    Yes, please if you could do up a patch and attach it on the tracker, that would be excellent! Thank you! 😎

    #28304
    rodries
    Keymaster

    clava, I have a problem with your iso9660 patch. It allows the device name to be changed but doesn’t allow the devoptab to be used for multiple mounts. This is a must. libntfs, libext2, libfat all have this. See those implementations (eg: libntfs) to see how to do it. If you need help, you can ask rodries – he likes this kind of work. 😀

    Same goes for the unmount function – it should specify the mount point.

    For now, I’ve committed your iso9660 read fix.

    #28311
    Anonymous
    Inactive

    Hi Tantric,

    Yes, you are right, a single mount point is currently allowed by my modification to the iso9660 code. For instance, it isn’t possible to have both internal wii dvd drive and external usb dvd drive mounted.

    When I patched iso9660, I preferred to add support for usb devices, mantaining as much as possible the old code, to avoid introducing bugs. Now that I have a working solution, I can improve it for allowing multiple mounting points. It shouldn’t be to hard to do, creating a dynamic structure including the global variables and the devop table for each mount point.

    If you can wait, I can try, but I’m not offended if Rodries wants to work on it :D.

    #28312
    aka107
    Participant

    I’m focused in others tasks
    I’m glad that another dev is improving wiimc 😀
    Now you are learning how devoptabs works, so if we have a problem or we want to improve something you can help us

    But if you have any doubt just ask

    #28313
    Anonymous
    Inactive

    … 😎 …

    #28314
    Anonymous
    Inactive

    Hi devs!

    Attached a zip with a new version of the iso9660 code. Now the module supports multiple mounts, so wiimc should be able to handle both internal and external dvds. The zip also include a small test application.

    I tested the code using the attached test app and using a custom version of wiimc. I wasn’t able to test internal and external dvds together because of the d3-2 drive of my wii. Moreoved I reverted usbstorage.c to r4533 because the latest Rodries’ modification doesn’t work with my usb dvd drive (ISI Exception occurred).

    I added 3 functions to iso9660, allowing to specify the mount point (e.g. name=”usb1″) and the disc_interface:
    bool ISO9660_MountEx(const char* name, const DISC_INTERFACE* disc_interface);
    bool ISO9660_UnmountEx(const char* name);
    u64 ISO9660_LastAccessEx(const char* name);

    The old Mount, Unmount and LastAccess functions work with “dvd” as mount name and “&__io_wiidvd” (or &__io_gcdvd) as disc_interface, for backward compatibility.

    I also increased the read buffer from 32k to 64k. I didn’t implemented critical regions, so concurrent accesses to a same mount are not allowed.

    #28315
    Anonymous
    Inactive

    Yet another small fix to iso9660. Dvd and Dvdnav are not robust to read() returning less data than required: added internal read loop. Restored 32k buffer.

    #28316
    Anonymous
    Inactive

    – ISO9660_UnmountEx(), ISO9660_LastAccessEx(): ‘:’ appended to device name, if missing, before calling GetDeviceOpTab(). This also fix the old LastAcces()s and Unmount().
    – ISO9660_MountEx(): now returns false if the mount name is already in use

    #28317
    rodries
    Keymaster

    This looks great, some quality code. Committed the devoptab to libogc for now, then I’ll review the rest. 😀

    #28318
    rodries
    Keymaster

    Ok I’ve committed some more code, but it’ll probably need some further changes. Please review.

    #28319
    Anonymous
    Inactive

    @Tantric wrote:

    Ok I’ve committed some more code, but it’ll probably need some further changes. Please review.

    Great! As soon as possible I’ll review it.

    There are still some open issues I’d like to solve:
    – 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!)
    – Catch the open tray signal for re-mount the device (now I have to unplug/plug the cable when I change DVD)
    – Fix usbstorage.c: I got an exception with the latest Rodries’ modifications (libogc r4575). Any idea?
    – Check types in iso9660: I tested several backupped DVD (4.7G) and they work fine both as dvd and as dvdnav. Commercial DVDs don’t work.

    #28320
    aka107
    Participant

    @clava wrote:

    There are still some open issues I’d like to solve:
    – Read the DVD volume label and show it in the wiimc browser view

    http://en.wikipedia.org/wiki/ISO_9660
    http://www.ecma-international.org/publications/standards/Ecma-119.htm
    @clava wrote:

    – Include the volume label in the restore points filenames (otherwise the vobs are always checked!)

    Good idea
    @clava wrote:

    – Catch the open tray signal for re-mount the device (now I have to unplug/plug the cable when I change DVD)

    bool WIIDVD_DiscPresent()
    {
    uint32_t val;

    DI_GetCoverRegister(&val);
    if(val&0x2)return true;
    return false;
    }
    but I think we detect it in isinserted in devicecallback
    I’ll check it
    @clava wrote:

    – Fix usbstorage.c: I got an exception with the latest Rodries’ modifications (libogc r4575). Any idea?

    I’ll make a usbtest program to detect the bug
    @clava wrote:

    – Check types in iso9660: I tested several backupped DVD (4.7G) and they work fine both as dvd and as dvdnav. Commercial DVDs don’t work.

    Commercial DVDs which don’t work can be encrypted, so sometimes libdvdcss can’t decrypt them
    Try to add this patch to mplayer: http://pastie.org/1536754
    Not tested, I need to do more tests

Viewing 15 posts - 16 through 30 (of 54 total)
  • You must be logged in to reply to this topic.

Login

Lost Password