/dev/di: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
m fixed a few typos i made
SpamBot (talk | contribs)
No edit summary
Line 18: Line 18:
  ios_ioctl( di_fd, inbuf[0x00] ,inbuf, 0x20, dst, size);
  ios_ioctl( di_fd, inbuf[0x00] ,inbuf, 0x20, dst, size);


  DVDLowUnencryptedRead
  DVDLowUnencryptedRead (Only works up to a certain offset)
  ((u32*)inbuf)[0x00] = 0x8D000000;
  ((u32*)inbuf)[0x00] = 0x8D000000;
  ((u32*)inbuf)[0x01] = size;
  ((u32*)inbuf)[0x01] = size;
Line 38: Line 38:
  ((u32*)inbuf)[0x00] = 0x70000000;
  ((u32*)inbuf)[0x00] = 0x70000000;
  ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, dst, 0x20);
  ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, dst, 0x20);
DVDLowRequestError
((u32*)inbuf)[0x00] = 0xE0000000;
ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, outbuf, 0x20);
Actual DVD error code is returned in ((u32*)outbuf)[0x00].
Identical to the error codes found in yagcd (so far).

Revision as of 15:45, 21 March 2008

Through /dev/di you can control the DVD.

The inbuf size of all /dev/di IOS cmds must be 0x20

The first entry of the inbuf should(!) be the DI cmd, Starlet fixes it if it doesn't match.


DVDLowGetCoverStatus
ios_ioctl( di_fd, 0x88, inbuf, 0x20, outbuf, 0x20);
DVDLowRequestError
ios_ioctl( di_fd, 0x88, inbuf, 0x20, outbuf, 0x20);
DVDLowRead (Only works after DVDOpenPartition)
((u32*)inbuf)[0x00] = 0xD0000000;
((u32*)inbuf)[0x01] = size;
((u32*)inbuf)[0x02] = offset;
ios_ioctl( di_fd, inbuf[0x00] ,inbuf, 0x20, dst, size);
DVDLowUnencryptedRead (Only works up to a certain offset)
((u32*)inbuf)[0x00] = 0x8D000000;
((u32*)inbuf)[0x01] = size;
((u32*)inbuf)[0x02] = offset;
ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, dst, size);
DVDLowStopMotor
((u32*)inbuf)[0x00] = 0xE3000000;
((u32*)inbuf)[0x01] = 0;	// optional, unknown
((u32*)inbuf)[0x02] = 0;	// optional, unknown
ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, outbuf, 0x20);
DVDLowReset
((u32*)inbuf)[0x00] = 0x8A000000;
((u32*)inbuf)[0x01] = 0x80000000; // not sure about that
ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, outbuf, 0x20);
DVDLowReadDiskID
((u32*)inbuf)[0x00] = 0x70000000;
ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, dst, 0x20);
DVDLowRequestError
((u32*)inbuf)[0x00] = 0xE0000000;
ios_ioctl( di_fd, inbuf[0x00], inbuf, 0x20, outbuf, 0x20);
Actual DVD error code is returned in ((u32*)outbuf)[0x00].
Identical to the error codes found in yagcd (so far).