-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
97 changed files
with
30,026 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include <revolution/aralt.h> | ||
#include <revolution/os.h> | ||
#include <cstring> | ||
|
||
static u32 __ARH_BaseAdr; | ||
|
||
static ARCallback __AR_Callback; | ||
|
||
#ifndef NON_MATCHING | ||
// for some reason has _savegpr | ||
void ARStartDMA(u32 type, u32 ram_addr, u32 aram_addr, u32 len) { | ||
OSDisableScheduler(); | ||
|
||
if (type == 0) { | ||
aram_addr += __ARH_BaseAdr; | ||
DCInvalidateRange((u32*)ram_addr, len); | ||
memcpy((u32*)aram_addr, (u32*)ram_addr, len); | ||
DCFlushRange((u32*)aram_addr, len); | ||
} | ||
else if (type == 1) { | ||
ram_addr += __ARH_BaseAdr; | ||
DCFlushRange((u32*)ram_addr, len); | ||
memcpy((u32*)aram_addr, (u32*)ram_addr, len); | ||
DCFlushRange((u32*)aram_addr, len); | ||
} | ||
|
||
OSEnableScheduler(); | ||
|
||
if (__AR_Callback) { | ||
(*__AR_Callback)(); | ||
} | ||
} | ||
#endif |
Oops, something went wrong.