データ構造 | |
| struct | tPERSONAL_DATA |
| User's DS settings. [詳細] | |
| struct | __argv |
| argv structure [詳細] | |
マクロ定義 | |
| #define | REG_DISPSTAT (*(vu16*)0x04000004) |
| LCD status register. | |
| #define | DISP_IN_VBLANK BIT(0) |
| The display currently in a vertical blank. | |
| #define | DISP_IN_HBLANK BIT(1) |
| The display currently in a horizontal blank. | |
| #define | DISP_YTRIGGERED BIT(2) |
| Current scanline and DISP_Y match. | |
| #define | DISP_VBLANK_IRQ BIT(3) |
| Interrupt on vertical blank. | |
| #define | DISP_HBLANK_IRQ BIT(4) |
| Interrupt on horizontal blank. | |
| #define | DISP_YTRIGGER_IRQ BIT(5) |
| Interrupt when current scanline and DISP_Y match. | |
| #define | REG_VCOUNT (*(vu16*)0x4000006) |
| Current display scanline. | |
| #define | HALT_CR (*(vuint16*)0x04000300) |
| Halt control register. | |
| #define | REG_POWERCNT *(vu16*)0x4000304 |
| Power control register. | |
| #define | POWER_LCD BIT(0) |
| #define | POWER_2D_A BIT(1) |
| #define | POWER_MATRIX BIT(2) |
| #define | POWER_3D_CORE BIT(3) |
| #define | POWER_2D_B BIT(9) |
| #define | POWER_SWAP_LCDS BIT(15) |
| #define | POWER_ALL_2D (POWER_LCD |POWER_2D_A |POWER_2D_B) |
| Enables power to all hardware required for 2D video. | |
| #define | POWER_ALL (POWER_ALL_2D | POWER_3D_CORE | POWER_MATRIX) |
| Enables power to all hardware required for 3D video. | |
| #define | REG_KEYINPUT (*(vuint16*)0x04000130) |
| Key input register. | |
| #define | REG_KEYCNT (*(vuint16*)0x04000132) |
| Key input control register. | |
| #define | PersonalData ((PERSONAL_DATA*)0x27FFC80) |
| Default location for the user's personal data (see PERSONAL_DATA). | |
| #define | libnds_argv ((struct __argv *)0x027FFF70) |
| Default location for the libnds argv structure. | |
| #define | argvMagic 0x5f617267 |
型定義 | |
| typedef struct tPERSONAL_DATA | PERSONAL_DATA |
関数 | |
| static void | SetYtrigger (int Yvalue) |
| static void | powerON (int on) |
| Turns on specified hardware. | |
| static void | powerSET (int on) |
| Turns on only the specified hardware. | |
| static void | powerOFF (int off) |
| Turns off the specified hardware. | |
| static void | lcdSwap (void) |
| Switches the screens. | |
| static void | lcdMainOnTop (void) |
| Forces the main core to display on the top. | |
| static void | lcdMainOnBottom (void) |
| Forces the main core to display on the bottom. | |
These definitions are usually only touched during the initialization of the program.
| #define argvMagic 0x5f617267 |
| #define DISP_HBLANK_IRQ BIT(4) |
Interrupt on horizontal blank.
| #define DISP_IN_HBLANK BIT(1) |
The display currently in a horizontal blank.
| #define DISP_IN_VBLANK BIT(0) |
The display currently in a vertical blank.
| #define DISP_VBLANK_IRQ BIT(3) |
Interrupt on vertical blank.
| #define DISP_YTRIGGER_IRQ BIT(5) |
Interrupt when current scanline and DISP_Y match.
| #define DISP_YTRIGGERED BIT(2) |
Current scanline and DISP_Y match.
| #define HALT_CR (*(vuint16*)0x04000300) |
Halt control register.
Writing 0x40 to HALT_CR activates GBA mode. HALT_CR can only be accessed via the BIOS.
| #define libnds_argv ((struct __argv *)0x027FFF70) |
Default location for the libnds argv structure.
| #define PersonalData ((PERSONAL_DATA*)0x27FFC80) |
Default location for the user's personal data (see PERSONAL_DATA).
| #define POWER_2D_A BIT(1) |
| #define POWER_2D_B BIT(9) |
| #define POWER_3D_CORE BIT(3) |
| #define POWER_ALL (POWER_ALL_2D | POWER_3D_CORE | POWER_MATRIX) |
Enables power to all hardware required for 3D video.
| #define POWER_ALL_2D (POWER_LCD |POWER_2D_A |POWER_2D_B) |
Enables power to all hardware required for 2D video.
| #define POWER_LCD BIT(0) |
| #define POWER_MATRIX BIT(2) |
| #define POWER_SWAP_LCDS BIT(15) |
| #define REG_DISPSTAT (*(vu16*)0x04000004) |
LCD status register.
| #define REG_KEYCNT (*(vuint16*)0x04000132) |
Key input control register.
| #define REG_KEYINPUT (*(vuint16*)0x04000130) |
Key input register.
On the ARM9, the hinge "button," the touch status, and the X and Y buttons cannot be accessed directly.
| #define REG_POWERCNT *(vu16*)0x4000304 |
Power control register.
This register controls what hardware should be turned on or off.
| #define REG_VCOUNT (*(vu16*)0x4000006) |
Current display scanline.
| typedef struct tPERSONAL_DATA PERSONAL_DATA |
| static void lcdMainOnBottom | ( | void | ) | [inline, static] |
| static void lcdMainOnTop | ( | void | ) | [inline, static] |
| static void lcdSwap | ( | void | ) | [inline, static] |
| static void powerOFF | ( | int | off | ) | [inline, static] |
| static void powerON | ( | int | on | ) | [inline, static] |
Turns on specified hardware.
This function should only be called after powerSET.
| on | What to power on. |
00089 { REG_POWERCNT |= on;}
| static void powerSET | ( | int | on | ) | [inline, static] |
Turns on only the specified hardware.
Use this function to power on basic hardware types you wish to use throughout your program.
| on | What to power on. |
00097 { REG_POWERCNT = on;}
| static void SetYtrigger | ( | int | Yvalue | ) | [inline, static] |
00063 { 00064 REG_DISPSTAT = (REG_DISPSTAT & 0x007F ) | (Yvalue << 8) | (( Yvalue & 0x100 ) >> 2) ; 00065 }
1.5.4