diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:45:02 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2023-02-01 18:50:25 -0400 |
commit | 9fa0a7f1da1b70bee995f53c6c96c43189018772 (patch) | |
tree | 114548896790eaff23cdca84a025281de86bbb51 /include/dolphin/ar.h | |
parent | 2ba3289286bbfcf9fcc13fd135d976058d8b6c2e (diff) |
global: Import Dolphin SDK
This version comes from the Metroid Prime decompilation project.
https://github.com/PrimeDecomp/prime
Diffstat (limited to 'include/dolphin/ar.h')
-rw-r--r-- | include/dolphin/ar.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/include/dolphin/ar.h b/include/dolphin/ar.h new file mode 100644 index 0000000..db0adaf --- /dev/null +++ b/include/dolphin/ar.h @@ -0,0 +1,45 @@ +#ifndef _DOLPHIN_AR +#define _DOLPHIN_AR + +#include "types.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define AR_STACK_INDEX_ENTRY_SIZE sizeof(u32) + +#define ARAM_DIR_MRAM_TO_ARAM 0x00 +#define ARAM_DIR_ARAM_TO_MRAM 0x01 + +#define AR_CLEAR_INTERNAL_ALL 0x00 +#define AR_CLEAR_INTERNAL_USER 0x01 +#define AR_CLEAR_EXPANSION 0x02 + +typedef void (*ARCallback)(void); + +ARCallback ARRegisterDMACallback(ARCallback callback); +u32 ARGetDMAStatus(void); +void ARStartDMA(u32 type, u32 mainmem_addr, u32 aram_addr, u32 length); +u32 ARInit(u32* stack_index_addr, u32 num_entries); +u32 ARGetBaseAddress(void); +BOOL ARCheckInit(void); +void ARReset(void); +u32 ARAlloc(u32 length); +u32 ARFree(u32* length); +u32 ARGetSize(void); +u32 ARGetInternalSize(void); +void ARSetSize(void); +void ARClear(u32 flag); + +void __ARClearInterrupt(void); +u16 __ARGetInterruptStatus(void); + +#define ARStartDMARead(mmem, aram, len) ARStartDMA(ARAM_DIR_ARAM_TO_MRAM, mmem, aram, len) +#define ARStartDMAWrite(mmem, aram, len) ARStartDMA(ARAM_DIR_MRAM_TO_ARAM, mmem, aram, len) + +#ifdef __cplusplus +} +#endif + +#endif // _DOLPHIN_AR |