bios.h
Nintendo DS Bios functions.
[詳細]
#include "nds/ndstypes.h"
ソースコードを見る。
構成 |
struct | DecompressionStream |
struct | UnpackStruct |
マクロ定義 |
#define | COPY_MODE_HWORD (0) |
#define | COPY_MODE_WORD (1<<26) |
#define | COPY_MODE_COPY (0) |
#define | COPY_MODE_FILL (1<<24) |
型定義 |
typedef struct DecompressionStream | TDecompressionStream |
typedef struct UnpackStruct | TUnpackStruct |
typedef struct UnpackStruct * | PUnpackStruct |
関数 |
void | swiSoftReset (void) |
| reset the DS.
|
void | swiDelay (uint32 duration) |
| delay
|
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) |
説明
Nintendo DS Bios functions.
関数
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) |
- 例:
- Graphics/Sprites/allocation_test/source/main.c.
swiDelay |
( |
uint32 |
duration |
) |
|
delay
Delays for for a period X + Y*duration where X is the swi overhead and Y is a cycle of
loop:
sub r0, #1
bgt loop
of thumb fetches in BIOS memory
- 引数:
-
- 覚え書き:
- Duration should be 1 or more, a duration of 0 is a huge delay
int swiDivide |
( |
int |
numerator, |
|
|
int |
divisor | |
|
) |
| | |
- 引数:
-
| numerator | signed integer to divide |
| divisor | signed integer to divide by |
- 戻り値:
- numerator / divisor
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) |
- 覚え書き:
- Transfers more quickly than swiCopy, but has higher interrupt latency
int swiRemainder |
( |
int |
numerator, |
|
|
int |
divisor | |
|
) |
| | |
- 引数:
-
| numerator | signed integer to divide |
| divisor | signed integer to divide by |
- 戻り値:
- numerator % divisor