Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
dvd.h
Go to the documentation of this file.
1#ifndef DVD_H
2#define DVD_H
3
4#include "dolphin/types.h"
5
6#ifdef __cplusplus
7extern "C" {
8#endif
9
24
25
32
33typedef struct DVDDirectory {
34 /* 0x0 */ u32 entry_number;
35 /* 0x4 */ u32 location;
36 /* 0x8 */ u32 next;
38
39typedef struct DVDDirectoryEntry {
40 /* 0x0 */ u32 entry_number;
41 /* 0x4 */ BOOL is_directory;
42 /* 0x8 */ char* name;
44
45typedef struct DVDDiskID {
46 /* 0x00 */ char game_name[4];
47 /* 0x04 */ char company[2];
48 /* 0x06 */ u8 disk_number;
49 /* 0x07 */ u8 game_version;
50 /* 0x08 */ u8 is_streaming;
52 /* 0x0A */ u8 padding[22];
54
55struct DVDFileInfo;
56struct DVDCommandBlock;
57typedef void (*DVDCBCallback)(s32 result, struct DVDCommandBlock* block);
58typedef void (*DVDCallback)(s32 result, struct DVDFileInfo* info);
59
60typedef struct DVDCommandBlock {
61 /* 0x00 */ struct DVDCommandBlock* next;
62 /* 0x04 */ struct DVDCommandBlock* prev;
63 /* 0x08 */ u32 command;
64 /* 0x0C */ s32 state;
65 /* 0x10 */ u32 offset;
66 /* 0x14 */ u32 length;
67 /* 0x18 */ void* buffer;
70 /* 0x24 */ DVDDiskID* disk_id;
72 /* 0x2C */ void* user_data;
74
75typedef struct DVDFileInfo {
77 /* 0x30 */ u32 start_address;
78 /* 0x34 */ u32 length;
81
82typedef struct DVDDriveInfo {
83 /* 0x00 */ u16 revision_level;
84 /* 0x02 */ u16 device_code;
85 /* 0x04 */ u32 release_date;
86 /* 0x08 */ u8 padding[24];
88
95
107
108#define DVD_MIN_TRANSFER_SIZE 32
109
111
112void DVDInit(void);
120int DVDConvertPathToEntrynum(const char*);
122BOOL DVDCheckDisk(void);
123BOOL DVDChangeDir(const char* dirname);
125BOOL DVDOpenDir(const char*, DVDDirectory* dir);
127BOOL DVDReadAbsAsyncPrio(DVDCommandBlock* block, void* addr, s32 length, s32 offset,
128 DVDCBCallback callback, s32 prio);
129BOOL DVDReadAbsAsyncForBS(DVDCommandBlock* block, void* addr, s32 length, s32 offset,
130 DVDCBCallback callback);
134void DVDReset(void);
136void DVDResume(void);
141
143
144#ifdef __cplusplus
145};
146#endif
147
148#endif /* DVD_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
static SECTION_RODATA u8 const id1[14+2]
Definition d_a_npc_seirei.cpp:756
static SECTION_RODATA u8 const id2[14+2]
Definition d_a_npc_seirei.cpp:781
BOOL DVDOpenDir(const char *, DVDDirectory *dir)
Definition dvdfs.c:399
void(* DVDOptionalCommandChecker)(DVDCommandBlock *block, void(*cb)(u32 intType))
Definition dvd.h:110
BOOL DVDReadAbsAsyncForBS(DVDCommandBlock *block, void *addr, s32 length, s32 offset, DVDCBCallback callback)
Definition dvd.c:1059
DVDCommandBlock * __DVDPopWaitingQueue(void)
Definition dvdqueue.c:74
BOOL DVDClose(DVDFileInfo *fileinfo)
Definition dvdfs.c:226
void(* DVDCallback)(s32 result, struct DVDFileInfo *info)
Definition dvd.h:58
BOOL DVDCheckDisk(void)
Definition dvd.c:1340
void DVDReset(void)
Definition dvd.c:1112
s32 DVDGetCommandBlockStatus(const DVDCommandBlock *block)
Definition dvd.c:1121
BOOL DVDReadAbsAsyncPrio(DVDCommandBlock *block, void *addr, s32 length, s32 offset, DVDCBCallback callback, s32 prio)
Definition dvd.c:1044
s32 DVDGetDriveStatus(void)
Definition dvd.c:1139
void DVDResume(void)
Definition dvd.c:1175
BOOL DVDReadPrio(DVDFileInfo *fileinfo, void *, s32, s32, s32)
Definition dvdfs.c:343
BOOL DVDReadDiskID(DVDCommandBlock *block, DVDDiskID *diskID, DVDCBCallback callback)
Definition dvd.c:1074
BOOL DVDChangeDir(const char *dirname)
Definition dvdfs.c:296
int DVDConvertPathToEntrynum(const char *)
Definition dvdfs.c:86
BOOL DVDSetAutoInvalidation(BOOL autoInval)
Definition dvd.c:1167
BOOL DVDReadDir(DVDDirectory *dir, DVDDirectoryEntry *entry)
Definition dvdfs.c:422
static BOOL DVDCancelAsync(DVDCommandBlock *block, DVDCBCallback callback)
Definition dvd.c:1192
DVDDiskID * DVDGetCurrentDiskID(void)
Definition dvd.c:1333
BOOL DVDFastOpen(long, DVDFileInfo *fileinfo)
s32 DVDCancel(DVDCommandBlock *block)
Definition dvd.c:1291
BOOL DVDCompareDiskID(DVDDiskID *id1, DVDDiskID *id2)
Definition dvdidutils.c:5
BOOL DVDOpen(const char *filename, DVDFileInfo *fileinfo)
Definition dvdfs.c:201
BOOL DVDCancelStreamAsync(DVDCommandBlock *block, DVDCBCallback callback)
Definition dvd.c:1088
DVDResult
Definition dvd.h:26
@ DVD_RESULT_IGNORED
Definition dvd.h:29
@ DVD_RESULT_GOOD
Definition dvd.h:27
@ DVD_RESULT_CANCELED
Definition dvd.h:30
@ DVD_RESULT_FATAL_ERROR
Definition dvd.h:28
void(* DVDCBCallback)(s32 result, struct DVDCommandBlock *block)
Definition dvd.h:57
DVDState
Definition dvd.h:10
@ DVD_STATE_RETRY
Definition dvd.h:21
@ DVD_STATE_BUSY
Definition dvd.h:12
@ DVD_STATE_WRONG_DISK
Definition dvd.h:17
@ DVD_STATE_NO_DISK
Definition dvd.h:15
@ DVD_STATE_CANCELED
Definition dvd.h:20
@ DVD_STATE_END
Definition dvd.h:11
@ DVD_STATE_MOTOR_STOPPED
Definition dvd.h:18
@ DVD_STATE_COVER_CLOSED
Definition dvd.h:14
@ DVD_STATE_COVER_OPEN
Definition dvd.h:16
@ DVD_STATE_WAITING
Definition dvd.h:13
@ DVD_STATE_IGNORED
Definition dvd.h:19
@ DVD_STATE_FATAL_ERROR
Definition dvd.h:22
BOOL DVDInquiryAsync(DVDCommandBlock *block, DVDDriveInfo *info, DVDCBCallback callback)
Definition dvd.c:1097
void DVDInit(void)
Definition dvd.c:131
void __DVDPrepareResetAsync(DVDCBCallback callbac)
Definition dvd.c:1433
BOOL DVDReadAsyncPrio(DVDFileInfo *fileinfo, void *, long, long, DVDCallback, long)
BOOL DVDCloseDir()
Definition dvdfs.c:438
static u8 block[48]
Definition fstload.c:39
static void cb(s32 result, DVDCommandBlock *block)
Definition fstload.c:15
Definition dvd.h:89
void * appLoaderFunc2
Definition dvd.h:92
u32 appLoaderLength
Definition dvd.h:90
void * appLoaderFunc3
Definition dvd.h:93
void * appLoaderFunc1
Definition dvd.h:91
Definition dvd.h:96
u32 FSTMaxLength
Definition dvd.h:100
u32 FSTPosition
Definition dvd.h:98
u32 bootFilePosition
Definition dvd.h:97
void * FSTAddress
Definition dvd.h:101
u32 userLength
Definition dvd.h:103
u32 padding0
Definition dvd.h:105
u32 FSTLength
Definition dvd.h:99
u32 userPosition
Definition dvd.h:102
Definition dvd.h:60
void * user_data
Definition dvd.h:72
void * buffer
Definition dvd.h:67
struct DVDCommandBlock * next
Definition dvd.h:61
u32 offset
Definition dvd.h:65
u32 transferred_size
Definition dvd.h:69
u32 current_transfer_size
Definition dvd.h:68
u32 command
Definition dvd.h:63
DVDCBCallback callback
Definition dvd.h:71
s32 state
Definition dvd.h:64
struct DVDCommandBlock * prev
Definition dvd.h:62
u32 length
Definition dvd.h:66
DVDDiskID * disk_id
Definition dvd.h:70
Definition dvd.h:39
char * name
Definition dvd.h:42
u32 entry_number
Definition dvd.h:40
BOOL is_directory
Definition dvd.h:41
Definition dvd.h:33
u32 next
Definition dvd.h:36
u32 entry_number
Definition dvd.h:34
u32 location
Definition dvd.h:35
Definition dvd.h:45
char company[2]
Definition dvd.h:47
u8 game_version
Definition dvd.h:49
char game_name[4]
Definition dvd.h:46
u8 disk_number
Definition dvd.h:48
u8 streaming_buffer_size
Definition dvd.h:51
u8 is_streaming
Definition dvd.h:50
u8 padding[22]
Definition dvd.h:52
Definition dvd.h:82
u16 revision_level
Definition dvd.h:83
u32 release_date
Definition dvd.h:85
u8 padding[24]
Definition dvd.h:86
u16 device_code
Definition dvd.h:84
Definition dvd.h:75
u32 start_address
Definition dvd.h:77
DVDCommandBlock block
Definition dvd.h:76
u32 length
Definition dvd.h:78
DVDCallback callback
Definition dvd.h:79
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8