NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
dvd_broadway.h
1#ifndef RVL_SDK_DVD_BROADWAY_H
2#define RVL_SDK_DVD_BROADWAY_H
3#include <types.h>
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#define DVD_LOW_OFFSET(x) ((x) >> 2)
9#define DVD_LOW_SPEED(x) (((x) & 3) << 16)
10
11// Forward declarations
12typedef struct DVDDiskID DVDDiskID;
13typedef struct DVDDriveInfo DVDDriveInfo;
14typedef struct ESPTicket ESPTicket;
15typedef struct ESPTmd ESPTmd;
16typedef struct OSAlarm OSAlarm;
17
18typedef enum {
19 DVD_INTTYPE_TC = (1 << 0), // Transaction callback?
20 DVD_INTTYPE_DE = (1 << 1), // Drive error
21 DVD_INTTYPE_CVR = (1 << 2), // Something with DVD cover
22 DVD_INTTYPE_BR = (1 << 3), // Break requested
23 DVD_INTTYPE_TIME = (1 << 4), // Time out
24 DVD_INTTYPE_SERR = (1 << 5), // Security error
25 DVD_INTTYPE_VERR = (1 << 6), // Verify error
26 DVD_INTTYPE_ARGS = (1 << 7), // Bad arguments
27} DVDLowIntType;
28
29// DICVR - DI Cover Register (via DVDLowGetCoverRegister)
30#define DVD_DICVR_CVR (1 << 0)
31#define DVD_DICVR_CVRINTMASK (1 << 1)
32#define DVD_DICVR_CVRINT (1 << 2)
33
34typedef void (*DVDLowCallback)(u32 intType);
35
36BOOL DVDLowInit(void);
37BOOL DVDLowReadDiskID(DVDDiskID* out, DVDLowCallback callback);
38BOOL DVDLowOpenPartition(u32 offset, const ESPTicket* ticket, u32 certsSize,
39 const void* certs, ESPTmd* tmd,
40 DVDLowCallback callback);
41BOOL DVDLowClosePartition(DVDLowCallback callback);
42BOOL DVDLowUnencryptedRead(void* dst, u32 size, u32 offset,
43 DVDLowCallback callback);
44BOOL DVDLowStopMotor(BOOL eject, BOOL kill, DVDLowCallback callback);
45BOOL DVDLowInquiry(DVDDriveInfo* out, DVDLowCallback callback);
46BOOL DVDLowRequestError(DVDLowCallback callback);
47BOOL DVDLowSetSpinupFlag(BOOL enable);
48BOOL DVDLowReset(DVDLowCallback callback);
49BOOL DVDLowAudioBufferConfig(BOOL enable, u32 size, DVDLowCallback callback);
50BOOL DVDLowSetMaximumRotation(u32 speed, DVDLowCallback callback);
51BOOL DVDLowRead(void* dst, u32 size, u32 offset, DVDLowCallback callback);
52BOOL DVDLowSeek(u32 offset, DVDLowCallback callback);
53u32 DVDLowGetCoverRegister(void);
54BOOL DVDLowPrepareCoverRegister(DVDLowCallback callback);
55u32 DVDLowGetImmBufferReg(void);
56BOOL DVDLowUnmaskStatusInterrupts(void);
57BOOL DVDLowMaskCoverInterrupt(void);
58BOOL DVDLowClearCoverInterrupt(DVDLowCallback callback);
59BOOL __DVDLowTestAlarm(const OSAlarm* alarm);
60
61#ifdef __cplusplus
62}
63#endif
64#endif
Definition esp.h:24