diff options
author | Revo <projectrevotpp@hotmail.com> | 2021-01-14 17:18:05 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 17:18:05 -0500 |
commit | c3b81b6ec04d0e29b9bb9cf4c9722daa5f40bfa6 (patch) | |
tree | 2b63a1bd776413c5d9857bc04dc7c068cfdb3a96 /arm9/lib/include/MI_exMemory.h | |
parent | 588288d30b0e3200219aa0943b3ff5aaa13d2387 (diff) | |
parent | 1fc2021e29935b1b4930203ba7ec1a2b0380d9cb (diff) |
Merge pull request #314 from red031000/master
decompile CTRDG_backup
Diffstat (limited to 'arm9/lib/include/MI_exMemory.h')
-rw-r--r-- | arm9/lib/include/MI_exMemory.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arm9/lib/include/MI_exMemory.h b/arm9/lib/include/MI_exMemory.h index df46b008..aa90a73c 100644 --- a/arm9/lib/include/MI_exMemory.h +++ b/arm9/lib/include/MI_exMemory.h @@ -22,6 +22,14 @@ typedef enum MI_CTRDG_ROMCYCLE2_4 = 1 } MICartridgeRomCycle2nd; +typedef enum +{ + MI_CTRDG_RAMCYCLE_10 = 0, + MI_CTRDG_RAMCYCLE_8 = 1, + MI_CTRDG_RAMCYCLE_6 = 2, + MI_CTRDG_RAMCYCLE_18 = 3 +} MICartridgeRamCycle; + static inline void MIi_SetCardProcessor(MIProcessor proc) { reg_MI_EXMEMCNT = @@ -54,4 +62,14 @@ static inline void MI_SetCartridgeRomCycle2nd(MICartridgeRomCycle2nd c2) reg_MI_EXMEMCNT = (u16)((reg_MI_EXMEMCNT & ~0x10) | (c2 << 4)); } +static inline void MI_SetCartridgeRamCycle(MICartridgeRamCycle c) +{ + reg_MI_EXMEMCNT = (u16)((reg_MI_EXMEMCNT & ~3) | (c << 0)); +} + +static inline MICartridgeRamCycle MI_GetCartridgeRamCycle(void) +{ + return (MICartridgeRamCycle)((reg_MI_EXMEMCNT & 3) >> 0); +} + #endif //POKEDIAMOND_MI_EXMEMORY_H |