1 =====================================================================
2 == libdi by Team Twiizers.
5 =====================================================================
7 libdi is a threadsafe library that allows you to access the DVD drive
8 in your Wii, regardless of a modchip being installed or not.
14 To install the lib, simply type
19 This will install the lib into your libogc.
25 Usage is fairly self-explanatory, aside from DI_Init. You can set
26 a callback using DI_SetCallback, which will be called upon completion
27 of the disc initialization. This callback runs in the regular callback
28 context. You MUST call DI_Init as the first thing in your program, it
29 wreaks massive havoc on the system, as it saves the context, launches
30 a channel, and restores the context. This will break most libs, and
31 probably video inits as well.
33 After this initial init, you call DI_Mount to spin the drive up. There is
34 no need for unmounting, you can just eject the disc any time you want.
35 Remounting with DI_Mount is necessary however. Calling DI_Mount is also
36 helpful as a last resort for failing reads.
38 Async reads are implemented in the lib using the standard async ioctls.
39 You can pass an ipccallback function, of which the usrdata will be filled
40 with the buffer you pass. Async reads do not have the advantage of auto-retries.
41 You will have to check wether a read succeeds or not in your callback.
43 Sync reads do have auto-retry, and the lib will try up to MAX_RETRY amount
44 of times before it gives up. Dirty discs can need up to 10 retries
45 before data is actually properly read. By default MAX_RETRY is set to 16.
47 Most of the functions in this lib are universal and can be used on modchipped
48 or non-modchipped drives alike. Some exceptions are:
50 DI_ReadDVDConfig Will only work on non-modchipped drives.
51 DI_ReportKey Will only work on non-modchipped drives.
52 DI_ReadDVDUnencrypted Will only work on original discs.
53 DI_ClosePartition Will only work on original discs.
54 DI_OpenPartition Will only work on original discs.
55 DI_ReadDiscID Will only work on original discs.
57 If you've been reading through the source, you've probably noticed by now the
58 peculiar function DI_KillDrive. DI_KillDrive will not actually kill your drive
59 as to be useless. It merely crashes it in such a way that it will not respond
60 to any DI commands, it will not eject your disc, and it will not take in any discs
61 until the next DI_Reset. DI_Mount might fail if used after this function!
62 I have included this function because people might have a use for it. Like it
63 says in the source, I am not responsible if someone's drive does actually die
64 from usage of this function.
69 Currently, if you do a DI_Init(), and then return to HBC without a disc ever being inserted,
70 your program will hang until a disc is inserted. If anyone has a nice solution, I'd