#include <nds/jtypes.h>
Data Structures | |
| struct | DecompressionStream |
| struct | UnpackStruct |
Defines | |
| #define | COPY_MODE_HWORD (0) |
| #define | COPY_MODE_WORD (1<<26) |
| #define | COPY_MODE_COPY (0) |
| #define | COPY_MODE_FILL (1<<24) |
Typedefs | |
| typedef struct DecompressionStream | TDecompressionStream |
| typedef struct UnpackStruct | TUnpackStruct |
| typedef struct UnpackStruct * | PUnpackStruct |
Functions | |
| void | swiSoftReset (void) |
| reset the DS. | |
| void | swiDelay (uint32 duration) |
| delay | |
| void | swiIntrWait (int waitForSet, uint32 flags) |
| wait for interrupt(s) to occur | |
| void | swiWaitForVBlank (void) |
| Wait for vblank interrupt. | |
| int | swiDivide (int numerator, int divisor) |
| int | swiRemainder (int numerator, int divisor) |
| void | swiDivMod (int numerator, int divisor, int *result, int *remainder) |
| void | swiCopy (const void *source, void *dest, int flags) |
| void | swiFastCopy (const void *source, void *dest, int flags) |
| int | swiSqrt (int value) |
| uint16 | swiCRC16 (uint16 crc, void *data, uint32 size) |
| int | swiIsDebugger (void) |
| void | swiUnpackBits (uint8 *source, uint32 *destination, PUnpackStruct params) |
| void | swiDecompressLZSSWram (void *source, void *destination) |
| int | swiDecompressLZSSVram (void *source, void *destination, uint32 toGetSize, TDecompressionStream *stream) |
| int | swiDecompressHuffman (void *source, void *destination, uint32 toGetSize, TDecompressionStream *stream) |
| void | swiDecompressRLEWram (void *source, void *destination) |
| int | swiDecompressRLEVram (void *source, void *destination, uint32 toGetSize, TDecompressionStream *stream) |
| void | swiWaitForIRQ (void) |
| wait for any interrupt | |
| void | swiSetHaltCR (uint32 data) |
| void | swiDecodeDelta8 (void *source, void *destination) |
| void | swiDecodeDelta16 (void *source, void *destination) |
| #define COPY_MODE_COPY (0) |
| #define COPY_MODE_FILL (1<<24) |
| #define COPY_MODE_HWORD (0) |
| #define COPY_MODE_WORD (1<<26) |
| typedef struct UnpackStruct * PUnpackStruct |
| typedef struct DecompressionStream TDecompressionStream |
| typedef struct UnpackStruct TUnpackStruct |
| swiCopy | ( | const void * | source, | |
| void * | dest, | |||
| int | flags | |||
| ) |
| source | pointer to transfer source | |
| dest | dest = pointer to transfer destination | |
| flags | copy mode and size flags(26) = transfer width (0: halfwords, 1: words) flags(24) = transfer mode (0: copy, 1: fill) flags(20..0) = transfer count (always in words) |
| void swiDecodeDelta16 | ( | void * | source, | |
| void * | destination | |||
| ) |
| void swiDecodeDelta8 | ( | void * | source, | |
| void * | destination | |||
| ) |
| int swiDecompressHuffman | ( | void * | source, | |
| void * | destination, | |||
| uint32 | toGetSize, | |||
| TDecompressionStream * | stream | |||
| ) |
| int swiDecompressLZSSVram | ( | void * | source, | |
| void * | destination, | |||
| uint32 | toGetSize, | |||
| TDecompressionStream * | stream | |||
| ) |
| void swiDecompressLZSSWram | ( | void * | source, | |
| void * | destination | |||
| ) |
| int swiDecompressRLEVram | ( | void * | source, | |
| void * | destination, | |||
| uint32 | toGetSize, | |||
| TDecompressionStream * | stream | |||
| ) |
| void swiDecompressRLEWram | ( | void * | source, | |
| void * | destination | |||
| ) |
| swiDelay | ( | uint32 | duration | ) |
delay
Delays for for a period X + Y*duration where X is the swi overhead and Y is a cycle of of thumb fetches in BIOS memory
loop:
sub r0, #1
bgt loop
| duration | length of delay |
| int swiDivide | ( | int | numerator, | |
| int | divisor | |||
| ) |
| numerator | signed integer to divide | |
| divisor | signed integer to divide by |
| void swiDivMod | ( | int | numerator, | |
| int | divisor, | |||
| int * | result, | |||
| int * | remainder | |||
| ) |
| numerator | signed integer to divide | |
| divisor | signed integer to divide by | |
| result | pointer to integer set to numerator / divisor | |
| remainder | pointer to integer set to numerator % divisor |
| swiFastCopy | ( | const void * | source, | |
| void * | dest, | |||
| int | flags | |||
| ) |
| source | pointer to transfer source | |
| dest | dest = pointer to transfer destination | |
| flags | copy mode and size flags(24) = transfer mode (0: copy, 1: fill) flags(20..0) = transfer count (in words) |
| swiIntrWait | ( | int | waitForSet, | |
| uint32 | flags | |||
| ) |
wait for interrupt(s) to occur
| waitForSet | 0: Return if the interrupt has already occured 1: Wait until the interrupt has been set since the call | |
| flags | interrupt mask to wait for |
| int swiIsDebugger | ( | void | ) |
| int swiRemainder | ( | int | numerator, | |
| int | divisor | |||
| ) |
| numerator | signed integer to divide | |
| divisor | signed integer to divide by |
| void swiSetHaltCR | ( | uint32 | data | ) |
| swiSoftReset | ( | void | ) |
reset the DS.
| int swiSqrt | ( | int | value | ) |
| void swiUnpackBits | ( | uint8 * | source, | |
| uint32 * | destination, | |||
| PUnpackStruct | params | |||
| ) |
| swiWaitForIRQ | ( | void | ) |
wait for any interrupt
| swiWaitForVBlank | ( | void | ) |
Wait for vblank interrupt.
Waits for a vertical blank interrupt
1.5.4