SSBM Decomp
Toggle main menu visibility
Loading...
Searching...
No Matches
ar.h
Go to the documentation of this file.
1
#ifndef _DOLPHIN_AR_H_
2
#define _DOLPHIN_AR_H_
3
4
#include <
dolphin/types.h
>
5
6
struct
ARQRequest
;
7
8
typedef
void (*
ARQCallback
)(
struct
ARQRequest
*);
9
10
struct
ARQRequest
11
{
12
/* 0x00 */
struct
ARQRequest
*
next
;
13
/* 0x04 */
u32
owner
;
14
/* 0x08 */
u32
type
;
15
/* 0x0C */
u32
priority
;
16
/* 0x10 */
u32
source
;
17
/* 0x14 */
u32
dest
;
18
/* 0x18 */
u32
length
;
19
/* 0x1C */
ARQCallback
callback
;
20
};
21
22
#define ARQ_DMA_ALIGNMENT 32
23
24
#define ARAM_DIR_MRAM_TO_ARAM 0x00
25
#define ARAM_DIR_ARAM_TO_MRAM 0x01
26
27
#define ARStartDMARead(mmem, aram, len) \
28
ARStartDMA(ARAM_DIR_ARAM_TO_MRAM, mmem, aram, len)
29
#define ARStartDMAWrite(mmem, aram, len) \
30
ARStartDMA(ARAM_DIR_MRAM_TO_ARAM, mmem, aram, len)
31
32
typedef
struct
ARQRequest
ARQRequest
;
33
34
#define ARQ_TYPE_MRAM_TO_ARAM ARAM_DIR_MRAM_TO_ARAM
35
#define ARQ_TYPE_ARAM_TO_MRAM ARAM_DIR_ARAM_TO_MRAM
36
37
#define ARQ_PRIORITY_LOW 0
38
#define ARQ_PRIORITY_HIGH 1
39
40
// ar.c
41
ARQCallback
ARRegisterDMACallback
(
ARQCallback
callback
);
42
u32
ARGetDMAStatus
(
void
);
43
void
ARStartDMA
(
u32
type
,
u32
mainmem_addr,
u32
aram_addr,
u32
length
);
44
u32
ARAlloc
(
u32
length
);
45
u32
ARFree
(
u32
*
length
);
46
int
ARCheckInit
(
void
);
47
u32
ARInit
(
u32
* stack_index_addr,
u32
num_entries);
48
void
ARReset
(
void
);
49
void
ARSetSize
(
void
);
50
u32
ARGetBaseAddress
(
void
);
51
u32
ARGetSize
(
void
);
52
53
// arq.c
54
void
ARQInit
(
void
);
55
void
ARQReset
(
void
);
56
void
ARQPostRequest
(
struct
ARQRequest
* request,
u32
owner
,
u32
type
,
u32
priority
,
u32
source
,
u32
dest
,
u32
length
,
ARQCallback
callback
);
57
void
ARQRemoveRequest
(
struct
ARQRequest
* request);
58
void
ARQRemoveOwnerRequest
(
u32
owner
);
59
void
ARQFlushQueue
(
void
);
60
void
ARQSetChunkSize
(
u32
size);
61
u32
ARQGetChunkSize
(
void
);
62
63
#endif
ARRegisterDMACallback
ARQCallback ARRegisterDMACallback(ARQCallback callback)
ARQReset
void ARQReset(void)
ARGetBaseAddress
u32 ARGetBaseAddress(void)
ARCheckInit
int ARCheckInit(void)
ARGetSize
u32 ARGetSize(void)
ARQRemoveRequest
void ARQRemoveRequest(struct ARQRequest *request)
ARQRemoveOwnerRequest
void ARQRemoveOwnerRequest(u32 owner)
ARReset
void ARReset(void)
ARQPostRequest
void ARQPostRequest(struct ARQRequest *request, u32 owner, u32 type, u32 priority, u32 source, u32 dest, u32 length, ARQCallback callback)
ARStartDMA
void ARStartDMA(u32 type, u32 mainmem_addr, u32 aram_addr, u32 length)
ARQFlushQueue
void ARQFlushQueue(void)
ARQGetChunkSize
u32 ARQGetChunkSize(void)
ARQCallback
void(* ARQCallback)(struct ARQRequest *)
Definition
ar.h:8
ARQSetChunkSize
void ARQSetChunkSize(u32 size)
ARFree
u32 ARFree(u32 *length)
ARQInit
void ARQInit(void)
ARInit
u32 ARInit(u32 *stack_index_addr, u32 num_entries)
ARAlloc
u32 ARAlloc(u32 length)
ARGetDMAStatus
u32 ARGetDMAStatus(void)
ARSetSize
void ARSetSize(void)
types.h
u32
unsigned long u32
Definition
types.h:9
callback
static void callback(HSD_GObj *gobj)
Definition
ftdonkeyspeciallw.c:89
ARQRequest
Definition
ar.h:11
ARQRequest::next
struct ARQRequest * next
Definition
ar.h:12
ARQRequest::owner
u32 owner
Definition
ar.h:13
ARQRequest::callback
ARQCallback callback
Definition
ar.h:19
ARQRequest::priority
u32 priority
Definition
ar.h:15
ARQRequest::length
u32 length
Definition
ar.h:18
ARQRequest::source
u32 source
Definition
ar.h:16
ARQRequest::dest
u32 dest
Definition
ar.h:17
ARQRequest::type
u32 type
Definition
ar.h:14
extern
dolphin
include
dolphin
ar.h
Generated by
1.17.0