Difference between revisions of "HID Registers"

From 3dbrew
Jump to navigation Jump to search
(Created page with "== Registers == {| class="wikitable" border="1" ! NAME ! PHYSICAL ADDRESS ! PROCESS ADDRESS ! WIDTH |- | REG_HID??? | 0x10146000 | 0x1EC46000 |}")
 
m
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Registers ==
+
= Registers =
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
NAME
+
Old3DS
PHYSICAL ADDRESS
+
Name
PROCESS ADDRESS
+
Address
WIDTH
+
Width
 +
!  Used by
 
|-
 
|-
| REG_HID???
+
| style="background: green" | Yes
 +
| [[#HID_PAD|HID_PAD]]
 
| 0x10146000
 
| 0x10146000
| 0x1EC46000
+
| 2
 +
| Boot9, Boot11, Kernel11, TwlBg, HID Services, dlp Services
 +
|-
 +
| style="background: green" | Yes
 +
| [[#HID_PAD_CNT|HID_PAD_CNT]]
 +
| 0x10146002
 +
| 2
 +
| TwlBg
 +
|}
 +
 
 +
==HID_PAD==
 +
Each bit in this register refers to a particular key. Each bit is set if the corresponding key is '''not''' pressed, and unset if it's pressed.
 +
 
 +
{| class="wikitable" border="1"
 +
!  Bit
 +
!  Key
 +
|-
 +
| 0
 +
| A
 +
|-
 +
| 1
 +
| B
 +
|-
 +
| 2
 +
| Select
 +
|-
 +
| 3
 +
| Start
 +
|-
 +
| 4
 +
| Right
 +
|-
 +
| 5
 +
| Left
 +
|-
 +
| 6
 +
| Up
 +
|-
 +
| 7
 +
| Down
 +
|-
 +
| 8
 +
| R
 +
|-
 +
| 9
 +
| L
 +
|-
 +
| 10
 +
| X
 +
|-
 +
| 11
 +
| Y
 +
|}
 +
 
 +
==HID_PAD_CNT==
 +
{| class="wikitable" border="1"
 +
!  Bit
 +
!  Key
 +
|-
 +
| 0
 +
| A
 +
|-
 +
| 1
 +
| B
 +
|-
 +
| 2
 +
| Select
 +
|-
 +
| 3
 +
| Start
 +
|-
 +
| 4
 +
| Right
 +
|-
 +
| 5
 +
| Left
 +
|-
 +
| 6
 +
| Up
 +
|-
 +
| 7
 +
| Down
 +
|-
 +
| 8
 +
| R
 +
|-
 +
| 9
 +
| L
 +
|-
 +
| 10
 +
| X
 +
|-
 +
| 11
 +
| Y
 +
|-
 +
| 12-13
 +
| Unused.
 +
|-
 +
| 14
 +
| Enable IRQ 0x5B. 1 = enable.
 +
|-
 +
| 15
 +
| IRQ condition (0 = OR, 1 = AND).
 
|}
 
|}
 +
This is the same as on GBA/DS(i).

Latest revision as of 13:41, 20 January 2021

Registers[edit]

Old3DS Name Address Width Used by
Yes HID_PAD 0x10146000 2 Boot9, Boot11, Kernel11, TwlBg, HID Services, dlp Services
Yes HID_PAD_CNT 0x10146002 2 TwlBg

HID_PAD[edit]

Each bit in this register refers to a particular key. Each bit is set if the corresponding key is not pressed, and unset if it's pressed.

Bit Key
0 A
1 B
2 Select
3 Start
4 Right
5 Left
6 Up
7 Down
8 R
9 L
10 X
11 Y

HID_PAD_CNT[edit]

Bit Key
0 A
1 B
2 Select
3 Start
4 Right
5 Left
6 Up
7 Down
8 R
9 L
10 X
11 Y
12-13 Unused.
14 Enable IRQ 0x5B. 1 = enable.
15 IRQ condition (0 = OR, 1 = AND).

This is the same as on GBA/DS(i).