Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
JKRAramStream.h
Go to the documentation of this file.
1#ifndef JKRARAMSTREAM_H
2#define JKRARAMSTREAM_H
3
5
7
13public:
14 enum Type {
16 READ = 1,
17 WRITE = 2,
18 };
19
21
22public:
23 /* 0x00 */ Type mType;
24 /* 0x04 */ u32 mAddress;
25 /* 0x08 */ u32 mSize;
26 /* 0x0C */ u32 field_0x0c;
28 /* 0x14 */ u32 mOffset;
29 /* 0x18 */ u32* mReturnSize;
30 /* 0x1C */ u8* mTransferBuffer;
32 /* 0x24 */ JKRHeap* mHeap;
33 /* 0x28 */ bool mAllocatedTransferBuffer;
34 /* 0x29 */ u8 padding_0x29[3];
35 /* 0x2C */ u32 field_0x2c;
37 /* 0x50 */ OSMessage mMessage;
38 /* 0x54 */ u32 field_0x54;
39 /* 0x58 */ u32 field_0x58;
40};
41
46class JKRAramStream : public JKRThread {
47private:
49 virtual ~JKRAramStream();
50
51 /* vt[03] */ void* run(void); /* override */
52
53public:
54 static JKRAramStream* create(s32);
55
56 static s32 readFromAram(void);
60 static void setTransBuffer(u8*, u32, JKRHeap*);
61
62private:
64 static OSMessage sMessageBuffer[4];
66
67 static u8* transBuffer;
68 static u32 transSize;
70};
71
73 return JKRAramStream::create(priority);
74}
75
76inline JKRAramStreamCommand* JKRStreamToAram_Async(JSUFileInputStream *stream, u32 addr, u32 size, u32 offset, void (*callback)(u32), u32* returnSize) {
77 return JKRAramStream::write_StreamToAram_Async(stream, addr, size, offset, returnSize);
78}
79
80#endif /* JKRARAMSTREAM_H */
JKRAramStreamCommand * JKRStreamToAram_Async(JSUFileInputStream *stream, u32 addr, u32 size, u32 offset, void(*callback)(u32), u32 *returnSize)
Definition JKRAramStream.h:76
JKRAramStream * JKRCreateAramStreamManager(s32 priority)
Definition JKRAramStream.h:72
void * OSMessage
Definition OSMessage.h:10
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRAramStream.h:12
u32 mOffset
Definition JKRAramStream.h:28
OSMessage mMessage
Definition JKRAramStream.h:37
Type mType
Definition JKRAramStream.h:23
u32 field_0x0c
Definition JKRAramStream.h:26
u32 field_0x54
Definition JKRAramStream.h:38
u32 field_0x58
Definition JKRAramStream.h:39
u32 field_0x2c
Definition JKRAramStream.h:35
Type
Definition JKRAramStream.h:14
@ UNKNOWN
Definition JKRAramStream.h:15
@ READ
Definition JKRAramStream.h:16
@ WRITE
Definition JKRAramStream.h:17
u32 mTransferBufferSize
Definition JKRAramStream.h:31
OSMessageQueue mMessageQueue
Definition JKRAramStream.h:36
u32 mSize
Definition JKRAramStream.h:25
JKRHeap * mHeap
Definition JKRAramStream.h:32
bool mAllocatedTransferBuffer
Definition JKRAramStream.h:33
u8 * mTransferBuffer
Definition JKRAramStream.h:30
u8 padding_0x29[3]
Definition JKRAramStream.h:34
u32 * mReturnSize
Definition JKRAramStream.h:29
JSUFileInputStream * mStream
Definition JKRAramStream.h:27
u32 mAddress
Definition JKRAramStream.h:24
JKRAramStreamCommand()
Definition JKRAramStream.cpp:221
Definition JKRAramStream.h:46
static JKRAramStreamCommand * write_StreamToAram_Async(JSUFileInputStream *, u32, u32, u32, u32 *)
Definition JKRAramStream.cpp:150
static u8 * transBuffer
Definition JKRAramStream.h:67
static JKRAramStream * create(s32)
Definition JKRAramStream.cpp:12
static JKRAramStream * sAramStreamObject
Definition JKRAramStream.h:63
static OSMessage sMessageBuffer[4]
Definition JKRAramStream.h:23
static s32 writeToAram(JKRAramStreamCommand *)
Definition JKRAramStream.cpp:68
void * run(void)
Definition JKRAramStream.cpp:42
static JKRHeap * transHeap
Definition JKRAramStream.h:69
static s32 readFromAram(void)
Definition JKRAramStream.cpp:62
static JKRAramStreamCommand * sync(JKRAramStreamCommand *, BOOL)
Definition JKRAramStream.cpp:175
virtual ~JKRAramStream()
Definition JKRAramStream.cpp:39
static void setTransBuffer(u8 *, u32, JKRHeap *)
Definition JKRAramStream.cpp:202
static u32 transSize
Definition JKRAramStream.h:68
static OSMessageQueue sMessageQueue
Definition JKRAramStream.h:31
Definition JKRHeap.h:16
Definition JKRThread.h:23
Definition JSUFileStream.h:12
Definition OSMessage.h:12
int BOOL
Definition types.h:27
unsigned long u32
Definition types.h:10
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8