USB DVD Device Support
Home › Forums › Development › USB DVD Device Support
- This topic is empty.
-
AuthorPosts
-
February 3, 2011 at 4:19 am #28309rodriesKeymaster
I committed a change for this, maybe it’s fixed now?
February 3, 2011 at 7:47 am #28310AnonymousInactiveThanks Tantric, I’ll test your fix as soon I can… real-life duties are a common problem!!!
February 3, 2011 at 9:50 pm #28305AnonymousInactiveHi 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.February 3, 2011 at 10:01 pm #28306rodriesKeymasterYes, please if you could do up a patch and attach it on the tracker, that would be excellent! Thank you! 😎
February 4, 2011 at 2:42 am #28304rodriesKeymasterclava, 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.
February 4, 2011 at 9:28 am #28311AnonymousInactiveHi 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.
February 4, 2011 at 10:38 am #28312aka107ParticipantI’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 usBut if you have any doubt just ask
February 4, 2011 at 11:13 am #28313AnonymousInactive… 😎 …
February 5, 2011 at 5:18 pm #28314AnonymousInactiveHi 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.
February 5, 2011 at 9:17 pm #28315AnonymousInactiveYet 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.
February 6, 2011 at 3:34 pm #28316AnonymousInactive– 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 useFebruary 6, 2011 at 9:00 pm #28317rodriesKeymasterThis looks great, some quality code. Committed the devoptab to libogc for now, then I’ll review the rest. 😀
February 6, 2011 at 10:45 pm #28318rodriesKeymasterOk I’ve committed some more code, but it’ll probably need some further changes. Please review.
February 7, 2011 at 8:49 am #28319AnonymousInactive@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.February 7, 2011 at 12:33 pm #28320aka107Participant@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 viewhttp://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 -
AuthorPosts
- You must be logged in to reply to this topic.