libnds
|
New WRAM utilities. More...
Macros | |
#define | NWRAM_BASE 0x03000000 |
Base address of NWRAM. | |
Enumerations | |
enum | NWRAM_A_SLOT_MASTER { NWRAM_A_SLOT_MASTER_ARM9 = 0 , NWRAM_A_SLOT_MASTER_ARM7 = 1 } |
Possible owners of NWRAM A slots. More... | |
enum | NWRAM_B_SLOT_MASTER { NWRAM_B_SLOT_MASTER_ARM9 = 0 , NWRAM_B_SLOT_MASTER_ARM7 = 1 , NWRAM_B_SLOT_MASTER_DSP_CODE = 2 } |
Possible owners of NWRAM C slots. More... | |
enum | NWRAM_BLOCK { NWRAM_BLOCK_A = 0 , NWRAM_BLOCK_B = 1 , NWRAM_BLOCK_C = 2 } |
Available NWRAM blocks. More... | |
enum | NWRAM_BLOCK_IMAGE_SIZE { NWRAM_BLOCK_IMAGE_SIZE_32K = 0 , NWRAM_BLOCK_IMAGE_SIZE_64K , NWRAM_BLOCK_IMAGE_SIZE_128K , NWRAM_BLOCK_IMAGE_SIZE_256K } |
Possible image sizes of a NWRAM block. More... | |
enum | NWRAM_C_SLOT_MASTER { NWRAM_C_SLOT_MASTER_ARM9 = 0 , NWRAM_C_SLOT_MASTER_ARM7 = 1 , NWRAM_C_SLOT_MASTER_DSP_DATA = 2 } |
Possible owners of NWRAM C slots. More... | |
Functions | |
u32 | nwramGetBlockAddress (NWRAM_BLOCK block) |
Returns the address of a NWRAM block that has been mapped to a CPU. | |
static bool | nwramIsAvailable (void) |
Checks whether NWRAM is available to be used. | |
int | nwramMapWramASlot (int slot, NWRAM_A_SLOT_MASTER master, int offset, bool enable) |
Maps a slot of WRAM slot A to the specified CPU. | |
int | nwramMapWramBSlot (int slot, NWRAM_B_SLOT_MASTER master, int offset, bool enable) |
Maps a slot of WRAM slot B to the specified CPU. | |
int | nwramMapWramCSlot (int slot, NWRAM_C_SLOT_MASTER master, int offset, bool enable) |
Maps a slot of WRAM slot C to the specified CPU. | |
void | nwramSetBlockMapping (NWRAM_BLOCK block, u32 start, u32 length, NWRAM_BLOCK_IMAGE_SIZE imageSize) |
Maps a NWRAM block to a CPU to the specified address and length. | |
New WRAM utilities.
enum NWRAM_A_SLOT_MASTER |
enum NWRAM_B_SLOT_MASTER |
enum NWRAM_BLOCK |
enum NWRAM_C_SLOT_MASTER |
u32 nwramGetBlockAddress | ( | NWRAM_BLOCK | block | ) |
Returns the address of a NWRAM block that has been mapped to a CPU.
block | One of NWRAM_BLOCK. |
|
inlinestatic |
Checks whether NWRAM is available to be used.
It is possible to be in an execution state where NWRAM isn't available even in DSi mode.
int nwramMapWramASlot | ( | int | slot, |
NWRAM_A_SLOT_MASTER | master, | ||
int | offset, | ||
bool | enable | ||
) |
Maps a slot of WRAM slot A to the specified CPU.
slot | Slot index (0 to 3). |
master | Owner of the slot (ARM7, ARM9 or DSP). |
offset | Offset of the slot. |
enable | true to enable the slot, false to disable it. |
int nwramMapWramBSlot | ( | int | slot, |
NWRAM_B_SLOT_MASTER | master, | ||
int | offset, | ||
bool | enable | ||
) |
Maps a slot of WRAM slot B to the specified CPU.
slot | Slot index (0 to 3). |
master | Owner of the slot (ARM7, ARM9 or DSP). |
offset | Offset of the slot. |
enable | true to enable the slot, false to disable it. |
int nwramMapWramCSlot | ( | int | slot, |
NWRAM_C_SLOT_MASTER | master, | ||
int | offset, | ||
bool | enable | ||
) |
Maps a slot of WRAM slot C to the specified CPU.
slot | Slot index (0 to 3). |
master | Owner of the slot (ARM7, ARM9 or DSP). |
offset | Offset of the slot. |
enable | true to enable the slot, false to disable it. |
void nwramSetBlockMapping | ( | NWRAM_BLOCK | block, |
u32 | start, | ||
u32 | length, | ||
NWRAM_BLOCK_IMAGE_SIZE | imageSize | ||
) |
Maps a NWRAM block to a CPU to the specified address and length.
block | One of NWRAM_BLOCK. |
start | The base address. Only 0x3000000 to 0x3800000 available. |
length | Length of the block. |
imageSize | Size of the block. |