/shared2/test2/dvderror.dat

From WiiBrew
Jump to navigation Jump to search

/shared2/test2/dvderror.dat is a file created by Nintendo titles to keep track of disc drive errors. It contains up to 8 error entries, each of which are 128 bytes and contain information about the error and a list of the last 5 commands executed. The first entry (offset 0) appears to be used as a fallback if something goes wrong when seeking for other entries; the second entry (offset 0x80) is used to track what to write next.

Entry format
Offset Size Meaning
0x00 4 Game ID
0x04 1 Disc number
0x05 1 Disc version
0x06 2 padding
0x08 4 Error code
0x0C 4 Time (seconds?)
0x10 4 Value of DISR
0x14 4 Value of DICR (or result from a command on some titles)
0x18 4 Next error slot to write (or tick of execution for a command on some titles)
0x1C 4 Command
0x20 4 Command parameter 1
0x24 4 Command parameter 2
0x28
0x3C
0x50
0x64
4 Command result
0x2C
0x40
0x54
0x68
4 Tick of command execution (value of TBLr register)
0x30
0x44
0x58
0x6C
4 Command
0x34
0x48
0x5C
0x70
4 Command parameter 1
0x38
0x4C
0x60
0x74
4 Command parameter 2
0x78 4 Result of last executed command
0x7C 4 Unused

There are some special error codes, beyond what is returned by DVDLowRequestError:

Code Meaning
0x01234567 Error without error code (e.g. reading error failed)
0x01234568 Timed out (/dev/di return value 0x10)
0x01234569 Security error (/dev/di return value 0x20)
0x0123456A BCA mismatch (used by New Super Mario Bros. Wii)