DVD.pdf

(149 KB) Pobierz
Revolution SDK
Optical Disc Drive Library (DVD)
Version 1.01
© 2006-2009 Nintendo
CONFIDENTIAL
RVL-06-0041-001-C
Released: March 27, 2009
Optical Disc Drive Library (DVD)
Revolution SDK
RVL-06-0041-001-C
Released: March 27, 2009
2
© 2006-2009 Nintendo
CONFIDENTIAL
Revolution SDK
Optical Disc Drive Library (DVD)
Contents
Overview....................................................................................................................................... 6
Main Features............................................................................................................................... 7
2.1 Size..................................................................................................................................... 7
2.2 Read Speed........................................................................................................................ 7
2.3 File System ......................................................................................................................... 7
2.4 Error Handling..................................................................................................................... 7
3 Discs............................................................................................................................................. 8
3.1 Disc Structure ..................................................................................................................... 8
3.2 Disc ID ................................................................................................................................ 8
4 Simple Demo .............................................................................................................................. 10
5 How to Use APIs ........................................................................................................................ 12
5.1 Initialization ....................................................................................................................... 12
5.2 Open ................................................................................................................................. 12
5.3 Read ................................................................................................................................. 12
5.3.1 Synchronous Read ................................................................................................. 13
5.3.2 Asynchronous Read................................................................................................ 13
5.4 Close................................................................................................................................. 17
5.5 Get Size ............................................................................................................................ 17
5.6 Change Directory.............................................................................................................. 17
6 Error Handling ............................................................................................................................ 18
6.1 Disc Drive Device Driver Error Processing Policy ............................................................ 18
6.2 Error Checking.................................................................................................................. 18
6.2.1 No Disk Error (DVD_STATE_NO_DISK) ................................................................ 20
6.2.2 Wrong Disk Error (DVD_STATE_WRONG_DISK) ................................................. 20
6.2.3 Retry Error (DVD_STATE_RETRY)........................................................................ 21
6.2.4 Fatal Error (DVD_STATE_FATAL) ......................................................................... 21
6.3 State Diagram................................................................................................................... 21
6.4 Disc Check by the Application during Restart................................................................... 22
6.5 Emulating Errors ............................................................................................................... 22
7 File System................................................................................................................................. 24
7.1 FST Size ........................................................................................................................... 24
7.2 FST Location .................................................................................................................... 24
7.3 Tips to Reduce FST Size and Speed ............................................................................... 24
7.4 Character Set Usable for File/Directory Names................................................................ 25
8 Directory Access Support Functions .......................................................................................... 26
8.1 Open Directory.................................................................................................................. 26
8.2 Read Directory.................................................................................................................. 26
8.3 Close Directory ................................................................................................................. 27
8.4 Sample Code for Accessing a Directory ........................................................................... 27
8.5 Tell Directory..................................................................................................................... 27
8.6 Seek Directory .................................................................................................................. 28
8.7 Rewind Directory .............................................................................................................. 28
9 Multiple Disc Games (Reference Information)............................................................................ 30
9.1 Disc Exchange Processing Pattern .................................................................................. 30
9.2 Disc Specification during Exchange ................................................................................. 30
9.2.1 Wildcard Use Restriction (excluding Game Version) .............................................. 31
9.2.2 Wildcard Use Restriction (Game Version) .............................................................. 31
9.3 Disc Exchange Procedure ................................................................................................ 32
9.4 Error Handling and Messages During Disc Exchange...................................................... 32
9.5 Multiple Disc Emulation .................................................................................................... 32
9.6 Multiple Disc Functions ..................................................................................................... 32
9.7 Cautions Regarding Multiple Disc Games ........................................................................ 33
10 Optical Disc Drive FAQs............................................................................................................. 35
© 2006-2009 Nintendo
CONFIDENTIAL
3
RVL-06-0041-001-C
Released: March 27, 2009
1
2
Optical Disc Drive Library (DVD)
Revolution SDK
Code Examples
Code 4–1 Read File Demo ............................................................................................................... 10
Code 5–1 The DVDInit Function ....................................................................................................... 12
Code 5–2 The DVDOpen Function ................................................................................................... 12
Code 5–3 The DVDRead Function ................................................................................................... 13
Code 5–4 The DVDReadAsync Function ......................................................................................... 13
Code 5–5 Asynchronous File Read .................................................................................................. 15
Code 5–6 Example of Illegal Code ................................................................................................... 16
Code 5–7 Legal Code, Option 1 ....................................................................................................... 16
Code 5–8 Legal Code, Option 2 ....................................................................................................... 17
Code 5–9 DVDClose() ...................................................................................................................... 17
Code 5–10 DVDGetLength()............................................................................................................. 17
Code 5–11 DVDChangeDir() ............................................................................................................ 17
Code 6–1 Function to Acquire Disc Drive Status.............................................................................. 18
Code 6–2 Error Handling .................................................................................................................. 20
Code 6–3 The DVDCheckDiskAsync Function................................................................................. 22
Code 8–1 The DVDOpenDir Function .............................................................................................. 26
Code 8–2 The DVDReadDir Function............................................................................................... 26
Code 8–3 The DVDCloseDir Function .............................................................................................. 27
Code 8–4 Sample Code for Accessing a Directory........................................................................... 27
Code 8–5 The DVDTellDir Function ................................................................................................. 27
Code 8–6 The DVDSeekDir Function ............................................................................................... 28
Code 8–7 The DVDRewindDir Function ........................................................................................... 28
Code 10–1 FAQ Code Sample ......................................................................................................... 35
Equations
Equation 7-1 Calculating FST File Size ............................................................................................ 24
Equation 7-2 Calculating FST Directory Size.................................................................................... 24
Figures
Figure 2–1 Applications Use Filenames to Retrieve Data From the Wii Disc ..................................... 7
Figure 6–1 State Transition Diagram ............................................................................................... 21
Tables
Table 6–1 Error Messages Returned by the Disc Drive Status Get Functions ................................. 19
Table 6–2 Emulation with Each Development Device ...................................................................... 23
RVL-06-0041-001-C
Released: March 27, 2009
4
© 2006-2009 Nintendo
CONFIDENTIAL
Revolution SDK
Optical Disc Drive Library (DVD)
Revision History
Version
1.01
Date
Revised
2009/02/17
2.1
Item
Description
Transferred content from the Optical Disc
Guidelines and re-edited them.
Updated the total capacity of the optical
disc to be the total capacity that the
developer can use.
Added Chapter 3, Discs
Revised the text.
Revised By
3
5.3.1
5.4
6.4
Added information regarding the disc
check when the application initiates a
restart.
Added an explanation about FST size
restrictions.
Added “Multiple Disc Games (Reference
Information).”
First release by Nintendo of America Inc.
-
7.1
7.2
9
1.00
2006/03/01
-
© 2006-2009 Nintendo
CONFIDENTIAL
5
RVL-06-0041-001-C
Released: March 27, 2009
Zgłoś jeśli naruszono regulamin