2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _DOLPHIN_DVD
|
|
|
|
#define _DOLPHIN_DVD
|
2022-09-10 20:32:26 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct DVDDiskID {
|
|
|
|
char gameName[4];
|
|
|
|
char company[2];
|
|
|
|
u8 diskNumber;
|
|
|
|
u8 gameVersion;
|
|
|
|
u8 streaming;
|
|
|
|
u8 streamingBufSize; // 0 = default
|
|
|
|
u8 padding[22]; // 0's are stored
|
|
|
|
} DVDDiskID;
|
|
|
|
|
2022-09-16 01:17:42 +00:00
|
|
|
typedef struct DVDCommandBlock DVDCommandBlock;
|
|
|
|
|
|
|
|
typedef void (*DVDCBCallback)(s32 result, DVDCommandBlock* block);
|
|
|
|
|
|
|
|
struct DVDCommandBlock {
|
|
|
|
DVDCommandBlock* next;
|
|
|
|
DVDCommandBlock* prev;
|
|
|
|
u32 command;
|
|
|
|
s32 state;
|
|
|
|
u32 offset;
|
|
|
|
u32 length;
|
|
|
|
void* addr;
|
|
|
|
u32 currTransferSize;
|
|
|
|
u32 transferredSize;
|
|
|
|
DVDDiskID* id;
|
|
|
|
DVDCBCallback callback;
|
|
|
|
void* userData;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct DVDFileInfo DVDFileInfo;
|
|
|
|
|
2022-10-08 02:38:36 +00:00
|
|
|
typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);
|
|
|
|
|
|
|
|
struct DVDFileInfo {
|
|
|
|
u32 startAddr;
|
|
|
|
u32 length;
|
|
|
|
DVDCallback callback;
|
|
|
|
};
|
|
|
|
|
2022-12-06 04:11:13 +00:00
|
|
|
void DVDInit();
|
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
void DVDSetAutoFatalMessaging(BOOL);
|
2022-09-16 01:17:42 +00:00
|
|
|
void DVDReset();
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
BOOL DVDPrepareStreamAsync(DVDFileInfo* fInfo, u32 length, u32 offset, DVDCallback callback);
|
|
|
|
s32 DVDPrepareStream(DVDFileInfo* fInfo, u32 length, u32 offset);
|
2022-10-08 02:38:36 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
BOOL DVDCancelStreamAsync(DVDCommandBlock* block, DVDCBCallback callback);
|
|
|
|
s32 DVDCancelStream(DVDCommandBlock* block);
|
2022-10-08 02:38:36 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
BOOL DVDStopStreamAtEndAsync(DVDCommandBlock* block, DVDCBCallback callback);
|
|
|
|
s32 DVDStopStreamAtEnd(DVDCommandBlock* block);
|
2022-10-08 02:38:36 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
BOOL DVDGetStreamErrorStatusAsync(DVDCommandBlock* block, DVDCBCallback callback);
|
|
|
|
s32 DVDGetStreamErrorStatus(DVDCommandBlock* block);
|
2022-10-08 02:38:36 +00:00
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
BOOL DVDGetStreamPlayAddrAsync(DVDCommandBlock* block, DVDCBCallback callback);
|
|
|
|
s32 DVDGetStreamPlayAddr(DVDCommandBlock* block);
|
2022-10-08 02:38:36 +00:00
|
|
|
|
2022-11-24 00:41:55 +00:00
|
|
|
s32 DVDGetDriveStatus();
|
|
|
|
|
2022-09-10 20:32:26 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _DOLPHIN_DVD
|