Skip to content

Commit

Permalink
Allow setting a new ARAM block array
Browse files Browse the repository at this point in the history
  • Loading branch information
Extrems committed Feb 21, 2025
1 parent b397d95 commit 2812f9e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions libogc/aram.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,17 @@ u32 AR_Init(u32 *stack_idx_array,u32 num_entries)
u32 level;
u32 aram_base = 0x4000;

if(__ARInit_Flag) return aram_base;

_CPU_ISR_Disable(level);

if(__ARInit_Flag) {
if(__ARStackPointer==aram_base) {
__ARFreeBlocks = num_entries;
__ARBlockLen = stack_idx_array;
}
_CPU_ISR_Restore(level);
return aram_base;
}

__ARDmaCallback = NULL;

IRQ_Request(IRQ_DSP_ARAM,__ARHandler);
Expand Down

0 comments on commit 2812f9e

Please sign in to comment.