Re: Re: USB DVD Device Support
Home › Forums › Development › USB DVD Device Support › Re: Re: USB DVD Device Support
@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 dvd
