Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRAramPiece.h
Go to the documentation of this file.
1#ifndef JKRARAMPIECE_H
2#define JKRARAMPIECE_H
3
5#include "dolphin/arq.h"
8
9class JKRAramBlock;
11
17public:
18 typedef void (*AsyncCallback)(u32);
19
22
23public:
24 /* 0x00 */ ARQRequest mRequest;
27
29 /* 0x44 */ u32 mDataLength;
30 /* 0x48 */ u32 mSrc;
31 /* 0x4C */ u32 mDst;
33 /* 0x54 */ u32 field_0x54;
36 /* 0x60 */ s32 field_0x60;
39 /* 0x88 */ OSMessage mMessage;
40 /* 0x8C */ void* field_0x8C;
41 /* 0x90 */ void* field_0x90;
42 /* 0x94 */ void* field_0x94;
43};
44
50public:
52 // TODO: fix type
54
55public:
60
61public:
64 static void sendCommand(JKRAMCommand*);
65
67 static BOOL sync(JKRAMCommand*, int);
68 static BOOL orderSync(int, u32, u32, u32, JKRAramBlock*);
69 static void startDMA(JKRAMCommand*);
70 static void doneDMA(u32);
71
72private:
73 static void lock() { OSLockMutex(&mMutex); }
74 static void unlock() { OSUnlockMutex(&mMutex); }
75};
76
77inline BOOL JKRAramPcs(int direction, u32 source, u32 destination, u32 length,
79 return JKRAramPiece::orderSync(direction, source, destination, length, block);
80}
81
82#endif /* JKRARAMPIECE_H */
BOOL JKRAramPcs(int direction, u32 source, u32 destination, u32 length, JKRAramBlock *block)
Definition JKRAramPiece.h:77
void * OSMessage
Definition OSMessage.h:10
void OSUnlockMutex(OSMutex *mutex)
Definition OSMutex.c:88
void OSLockMutex(OSMutex *mutex)
Definition OSMutex.c:62
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRAramPiece.h:16
~JKRAMCommand()
Definition JKRAramPiece.cpp:149
s32 field_0x60
Definition JKRAramPiece.h:36
JSULink< JKRAMCommand > mPieceLink
Definition JKRAramPiece.h:25
OSMessageQueue mMessageQueue
Definition JKRAramPiece.h:38
ARQRequest mRequest
Definition JKRAramPiece.h:24
JKRAramBlock * mAramBlock
Definition JKRAramPiece.h:32
void * field_0x94
Definition JKRAramPiece.h:42
JSULink< JKRAMCommand > field_0x30
Definition JKRAramPiece.h:26
OSMessage mMessage
Definition JKRAramPiece.h:39
u32 field_0x54
Definition JKRAramPiece.h:33
u32 mDst
Definition JKRAramPiece.h:31
void(* AsyncCallback)(u32)
Definition JKRAramPiece.h:18
OSMessageQueue * field_0x5C
Definition JKRAramPiece.h:35
AsyncCallback mCallback
Definition JKRAramPiece.h:34
u32 mDataLength
Definition JKRAramPiece.h:29
void * field_0x8C
Definition JKRAramPiece.h:40
void * field_0x90
Definition JKRAramPiece.h:41
JKRDecompCommand * mDecompCommand
Definition JKRAramPiece.h:37
s32 mTransferDirection
Definition JKRAramPiece.h:28
u32 mSrc
Definition JKRAramPiece.h:30
JKRAMCommand()
Definition JKRAramPiece.cpp:138
Definition JKRAramBlock.h:12
Definition JKRAramPiece.h:49
static OSMutex mMutex
Definition JKRAramPiece.h:51
static JSUList< JKRAMCommand > sAramPieceCommandList
Definition JKRAramPiece.h:53
static void lock()
Definition JKRAramPiece.h:73
static JKRAMCommand * orderAsync(int, u32, u32, u32, JKRAramBlock *, JKRAMCommand::AsyncCallback)
Definition JKRAramPiece.cpp:37
static void sendCommand(JKRAMCommand *)
Definition JKRAramPiece.cpp:24
static BOOL orderSync(int, u32, u32, u32, JKRAramBlock *)
Definition JKRAramPiece.cpp:88
static void startDMA(JKRAMCommand *)
Definition JKRAramPiece.cpp:102
static void doneDMA(u32)
Definition JKRAramPiece.cpp:114
static void unlock()
Definition JKRAramPiece.h:74
static JKRAMCommand * prepareCommand(int, u32, u32, u32, JKRAramBlock *, JKRAMCommand::AsyncCallback)
Definition JKRAramPiece.cpp:9
static BOOL sync(JKRAMCommand *, int)
Definition JKRAramPiece.cpp:64
Definition JKRDecomp.h:13
Definition JSUList.h:96
static u8 block[48]
Definition fstload.c:39
Definition arq.h:24
Definition JKRAramPiece.h:56
s32 field_0x00
Definition JKRAramPiece.h:57
JKRAMCommand * command
Definition JKRAramPiece.h:58
Definition OSMessage.h:12
Definition OSMutex.h:10
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6