RetroArch
aram.h
Go to the documentation of this file.
1 /*-------------------------------------------------------------
2 
3 aram.h -- ARAM subsystem
4 
5 Copyright (C) 2004
6 Michael Wiedenbauer (shagkur)
7 Dave Murphy (WinterMute)
8 
9 This software is provided 'as-is', without any express or implied
10 warranty. In no event will the authors be held liable for any
11 damages arising from the use of this software.
12 
13 Permission is granted to anyone to use this software for any
14 purpose, including commercial applications, and to alter it and
15 redistribute it freely, subject to the following restrictions:
16 
17 1. The origin of this software must not be misrepresented; you
18 must not claim that you wrote the original software. If you use
19 this software in a product, an acknowledgment in the product
20 documentation would be appreciated but is not required.
21 
22 2. Altered source versions must be plainly marked as such, and
23 must not be misrepresented as being the original software.
24 
25 3. This notice may not be removed or altered from any source
26 distribution.
27 
28 -------------------------------------------------------------*/
29 
30 
31 #ifndef __ARAM_H__
32 #define __ARAM_H__
33 
40 #include <gctypes.h>
41 
42 
48 #define AR_MRAMTOARAM 0
49 #define AR_ARAMTOMRAM 1
62 #define AR_ARAMINTALL 0
63 #define AR_ARAMINTUSER 1
70 #ifdef __cplusplus
71  extern "C" {
72 #endif /* __cplusplus */
73 
74 
81 typedef void (*ARCallback)(void);
82 
83 
95 
96 
104 
105 
147 u32 AR_Init(u32 *stack_idx_array,u32 num_entries);
148 
149 
167 void AR_StartDMA(u32 dir,u32 memaddr,u32 aramaddr,u32 len);
168 
169 
181 
182 
191 u32 AR_Free(u32 *len);
192 
193 
202 void AR_Clear(u32 flag);
203 
204 
213 
214 
223 void AR_Reset();
224 
225 
232 u32 AR_GetSize();
233 
234 
242 
243 
251 
252 
257 #define AR_StartDMARead(maddr,araddr,tlen) \
258  AR_StartDMA(AR_ARAMTOMRAM,maddr,araddr,tlen);
259 
260 
265 #define AR_StartDMAWrite(maddr,araddr,tlen) \
266  AR_StartDMA(AR_MRAMTOARAM,maddr,araddr,tlen);
267 
268 #ifdef __cplusplus
269  }
270 #endif /* __cplusplus */
271 
272 #endif //__ARAM_H__
u32 AR_GetDMAStatus()
Get current status of DMA.
Definition: aram.c:88
u32 AR_Init(u32 *stack_idx_array, u32 num_entries)
Initializes ARAM subsystem.
Definition: aram.c:97
Data type definitions.
GLenum GLsizei len
Definition: glext.h:7389
void(* ARCallback)(void)
function pointer typedef for the user's ARAM interrupt callback
Definition: aram.h:81
u32 AR_GetInternalSize()
Get the size of the internal ARAM memory.
Definition: aram.c:214
typedef void(__stdcall *PFN_DESTRUCTION_CALLBACK)(void *pData)
void callback(s32 result, dvdcmdblk *block)
Definition: dvd.c:2293
BOOL AR_CheckInit()
Get the ARAM subsystem initialization flag.
Definition: aram.c:194
ARCallback AR_RegisterCallback(ARCallback callback)
Register the given function as a DMA callback.
Definition: aram.c:76
u32 AR_Free(u32 *len)
Free a block from ARAM.
Definition: aram.c:160
void AR_StartDMA(u32 dir, u32 memaddr, u32 aramaddr, u32 len)
Initiates a DMA between main memory and ARAM.
Definition: aram.c:123
void AR_Reset()
Clears the ARAM subsystem initialization flag.
Definition: aram.c:199
void AR_Clear(u32 flag)
Clear ARAM memory.
Definition: aram.c:174
u32 AR_Alloc(u32 len)
Allocate a block of memory from ARAM having len bytes.
Definition: aram.c:145
unsigned int BOOL
Definition: gctypes.h:51
uint32_t u32
32bit unsigned integer
Definition: gctypes.h:19
u32 AR_GetSize()
Get the total size - in bytes - of ARAM as calculated during AR_Init()
Definition: aram.c:204
u32 AR_GetBaseAddress()
Get the baseaddress of ARAM memory.
Definition: aram.c:209