@@ -26,6 +26,260 @@ COLOR="#9900CC"> </FONT><FONT COLOR="#0099FF">A</FONT><FONT COLOR="#9900CC"> C<
26
26
27
27
* * *
28
28
29
+ <h2 id =" hardware-register-summary " ><a class =" header " href =" #hardware-register-summary " >
30
+ Hardware Register Summary
31
+ </a ></h2 >
32
+
33
+ | Starting Address | Region name |
34
+ | ------------------| -------------|
35
+ | 0x04000000 | [ Display] ( #hardware-register-summary-display ) |
36
+ | 0x04000060 | [ Sound] ( #hardware-register-summary-sound ) |
37
+ | | - [ Alternative DMG Sound register names] ( #hardware-register-summary-sound-alt ) |
38
+ | 0x040000B0 | [ DMA] ( #hardware-register-summary-dma ) |
39
+ | 0x04000100 | [ Timers] ( #hardware-register-summary-timer ) |
40
+ | 0x04000120 | [ Serial hardware control and data] ( #hardware-register-summary-serial ) |
41
+ | | - [ Normal / SPI mode] ( #hardware-register-summary-serial-spi ) |
42
+ | | - [ Multiplay mode] ( #hardware-register-summary-serial-multiplay ) |
43
+ | | - [ UART mode] ( #hardware-register-summary-serial-uart ) |
44
+ | 0x04000130 | [ Keypad button input and interrupt control] ( #hardware-register-summary-key ) |
45
+ | 0x04000134 | [ Serial port mode and control] ( #hardware-register-summary-rcnt ) |
46
+ | 0x04000140 | [ JOYBUS controller] ( #hardware-register-summary-joybus ) |
47
+ | 0x04000200 | [ Interrupt controller] ( #hardware-register-summary-irq ) |
48
+ | | - [ Cartridge slot waitstate and control] ( #hardware-register-summary-cartcnt ) |
49
+ | 0x04000300 | [ System control] ( #hardware-register-summary-system ) |
50
+
51
+ <h3 id =" hardware-register-summary-display " ><a class =" header " href =" #hardware-register-summary-display " >
52
+ Display
53
+ </a ></h3 >
54
+
55
+ | Address | Name | Size | Description |
56
+ | ------------| ---------------------------| ------| -------------|
57
+ | 0x04000000 | [ DISPCNT] ( #REG_DISPCNT ) | 16 | Display Control |
58
+ | 0x04000002 | | 16 | Stereoscopic mode enable |
59
+ | 0x04000004 | [ DISPSTAT] ( #REG_DISPSTAT ) | 16 | Display Status, display interrupt enable, Line Y Compare (LYC) |
60
+ | 0x04000006 | [ VCOUNT] ( #REG_VCOUNT ) | 16 | Current display scanline position<br >(equivalent to LY on 8-bit Game Boy systems) |
61
+ | 0x04000008 | [ BG0CNT] ( #REG_BGCNT ) | 16 | Background Control |
62
+ | 0x0400000A | [ BG1CNT] ( #REG_BGCNT ) | ^^ | ^^ |
63
+ | 0x0400000C | [ BG2CNT] ( #REG_BGCNT ) | ^^ | ^^ |
64
+ | 0x0400000E | [ BG3CNT] ( #REG_BGCNT ) | ^^ | ^^
65
+ | 0x04000010 | [ BG0HOFS] ( #REG_BGOFS ) | 16 | Background Scrolling |
66
+ | 0x04000012 | [ BG0VOFS] ( #REG_BGOFS ) | ^^ | ^^ |
67
+ | 0x04000014 | [ BG1HOFS] ( #REG_BGOFS ) | ^^ | ^^ |
68
+ | 0x04000016 | [ BG1VOFS] ( #REG_BGOFS ) | ^^ | ^^ |
69
+ | 0x04000018 | [ BG2HOFS] ( #REG_BGOFS ) | ^^ | ^^ |
70
+ | 0x0400001A | [ BG2VOFS] ( #REG_BGOFS ) | ^^ | ^^ |
71
+ | 0x0400001C | [ BG3HOFS] ( #REG_BGOFS ) | ^^ | ^^ |
72
+ | 0x0400001E | [ BG3VOFS] ( #REG_BGOFS ) | ^^ | ^^ |
73
+ | 0x04000020 | [ BG2PA] ( #REG_BGPA ) | 16 | Background Affine parameters for BG2 |
74
+ | 0x04000022 | [ BG2PB] ( #REG_BGPB ) | 16 | ^^ |
75
+ | 0x04000024 | [ BG2PC] ( #REG_BGPC ) | 16 | ^^ |
76
+ | 0x04000026 | [ BG2PD] ( #REG_BGPD ) | 16 | ^^ |
77
+ | 0x04000028 | [ BG2X] ( #REG_BGX ) | 32 | ^^ |
78
+ | 0x0400002C | [ BG2Y] ( #REG_BGY ) | 32 | ^^ |
79
+ | 0x04000030 | [ BG3PA] ( #REG_BGPA ) | 16 | Background Affine parameters for BG3 |
80
+ | 0x04000032 | [ BG3PB] ( #REG_BGPB ) | 16 | ^^ |
81
+ | 0x04000034 | [ BG3PC] ( #REG_BGPC ) | 16 | ^^ |
82
+ | 0x04000036 | [ BG3PD] ( #REG_BGPD ) | 16 | ^^ |
83
+ | 0x04000038 | [ BG3X] ( #REG_BGX ) | 32 | ^^ |
84
+ | 0x0400003C | [ BG3Y] ( #REG_BGY ) | 32 | ^^ |
85
+ | 0x04000040 | [ WIN0H] ( #REG_WINH ) | 16 | Window Bounds |
86
+ | 0x04000042 | [ WIN1H] ( #REG_WINH ) | 16 | ^^ |
87
+ | 0x04000044 | [ WIN0V] ( #REG_WINV ) | 16 | ^^ |
88
+ | 0x04000046 | [ WIN1V] ( #REG_WINV ) | 16 | ^^ |
89
+ | 0x04000048 | [ WININ] ( #REG_WININ ) | 16 | Window display inside of WIN0 and WIN1 |
90
+ | 0x0400004A | [ WINOUT] ( #REG_WINOUT ) | 16 | Window display outside of WIN0 and WIN1,<br >and inside of OBJWIN |
91
+ | 0x0400004C | [ MOSAIC] ( #REG_MOSAIC ) | 16 | Mosaic effect size |
92
+ | 0x04000050 | [ BLDCNT] ( #REG_BLDCNT ) | 16 | Blend mode and target selection |
93
+ | 0x04000052 | [ BLDALPHA] ( #REG_BLDALPHA ) | 16 | Blend alpha coefficients |
94
+ | 0x04000054 | [ BLDY] ( #REG_BLDY ) | 16 | Blend luminance coefficient<br >for lightening and darkening |
95
+
96
+ <h3 id =" hardware-register-summary-sound " ><a class =" header " href =" #hardware-register-summary-sound " >
97
+ Sound
98
+ </a ></h3 >
99
+
100
+ | Address | Name | Size | Description |
101
+ | ------------| --------------------------- | ------| -------------|
102
+ | 0x04000060 | [ SOUND1CNT_L] ( #REG_SOUND1CNT_L ) | 16 | DMG Sound Channel 1 |
103
+ | 0x04000062 | [ SOUND1CNT_H] ( #REG_SOUND1CNT_H ) | 16 | ^^ |
104
+ | 0x04000064 | [ SOUND1CNT_X] ( #REG_SOUND1CNT_X ) | 16 | ^^ |
105
+ | 0x04000068 | [ SOUND2CNT_L] ( #REG_SOUND2CNT_L ) | 16 | DMG Sound Channel 2 |
106
+ | 0x0400006C | [ SOUND2CNT_H] ( #REG_SOUND2CNT_H ) | 16 | ^^ |
107
+ | 0x04000070 | [ SOUND3CNT_L] ( #REG_SOUND3CNT_L ) | 16 | DMG Sound Channel 3 |
108
+ | 0x04000072 | [ SOUND3CNT_H] ( #REG_SOUND3CNT_H ) | 16 | ^^ |
109
+ | 0x04000074 | [ SOUND3CNT_X] ( #REG_SOUND3CNT_X ) | 16 | ^^ |
110
+ | 0x04000078 | [ SOUND4CNT_L] ( #REG_SOUND4CNT_L ) | 16 | DMG Sound Channel 4 |
111
+ | 0x0400007C | [ SOUND4CNT_H] ( #REG_SOUND4CNT_H ) | 16 | ^^ |
112
+ | 0x04000080 | [ SOUNDCNT_L] ( #REG_SOUNDCNT_L ) | 16 | DMG Sound master volume and pan |
113
+ | 0x04000082 | [ SOUNDCNT_H] ( #REG_SOUNDCNT_H ) | 16 | GBA Sound volume mixing <br >and Direct Sound control |
114
+ | 0x04000084 | [ SOUNDCNT_X] ( #REG_SOUNDCNT_X ) | 16 | Sound master enable<br >and DMG Sound channel status |
115
+ | 0x04000088 | [ SOUNDBIAS] ( #REG_SOUNDBIAS ) | 16 | PWM bias and resolution |
116
+ | 0x040000A0 | [ FIFO_A] ( #REG_FIFO ) | 32(!)| Direct Sound FIFO A |
117
+ | 0x040000A4 | [ FIFO_B] ( #REG_FIFO ) | 32(!)| Direct Sound FIFO B |
118
+
119
+ <h4 id =" hardware-register-summary-sound-alt " ><a class =" header " href =" #hardware-register-summary-sound-alt " >
120
+ Alternative DMG Sound register names
121
+ </a ></h4 >
122
+
123
+ | Address | Name | Description |
124
+ | ------------| --------------------------| -------------|
125
+ | 0x04000060 | [ NR10] ( #REG_SOUND1CNT_L ) | DMG Sound Channel 1 |
126
+ | 0x04000062 | [ NR11] ( #REG_SOUND1CNT_H ) | ^^ |
127
+ | 0x04000063 | [ NR12] ( #REG_SOUND1CNT_H ) | ^^ |
128
+ | 0x04000064 | [ NR13] ( #REG_SOUND1CNT_X ) | ^^ |
129
+ | 0x04000065 | [ NR14] ( #REG_SOUND1CNT_X ) | ^^ |
130
+ | 0x04000068 | [ NR21] ( #REG_SOUND2CNT_L ) | DMG Sound Channel 2 |
131
+ | 0x04000069 | [ NR22] ( #REG_SOUND2CNT_L ) | ^^ |
132
+ | 0x0400006C | [ NR23] ( #REG_SOUND2CNT_H ) | ^^ |
133
+ | 0x0400006D | [ NR24] ( #REG_SOUND2CNT_H ) | ^^ |
134
+ | 0x04000070 | [ NR30] ( #REG_SOUND3CNT_L ) | DMG Sound Channel 3 |
135
+ | 0x04000072 | [ NR31] ( #REG_SOUND3CNT_H ) | ^^ |
136
+ | 0x04000073 | [ NR32] ( #REG_SOUND3CNT_H ) | ^^ |
137
+ | 0x04000074 | [ NR33] ( #REG_SOUND3CNT_X ) | ^^ |
138
+ | 0x04000075 | [ NR34] ( #REG_SOUND3CNT_X ) | ^^ |
139
+ | 0x04000078 | [ NR41] ( #REG_SOUND4CNT_L ) | DMG Sound Channel 4 |
140
+ | 0x04000079 | [ NR42] ( #REG_SOUND4CNT_L ) | ^^ |
141
+ | 0x0400007C | [ NR43] ( #REG_SOUND4CNT_H ) | ^^ |
142
+ | 0x0400007D | [ NR44] ( #REG_SOUND4CNT_H ) | ^^ |
143
+ | 0x04000080 | [ NR50] ( #REG_SOUNDCNT_L ) | DMG Sound master volume |
144
+ | 0x04000081 | [ NR51] ( #REG_SOUNDCNT_L ) | DMG Sound channel pan |
145
+ | 0x04000084 | [ NR52] ( #REG_SOUNDCNT_X ) | Sound master enable and channel status |
146
+
147
+
148
+ <h3 id =" hardware-register-summary-dma " ><a class =" header " href =" #hardware-register-summary-dma " >
149
+ DMA
150
+ </a ></h3 >
151
+
152
+ | Address | Name | Size | Description |
153
+ | ------------| ----------------------------------| ------| -------------|
154
+ | 0x040000B0 | [ DMA0SAD] ( #REG_DMA0SAD ) | 32 | DMA Controller 0 |
155
+ | 0x040000B4 | [ DMA0DAD] ( #REG_DMA0DAD ) | 32 | ^^ |
156
+ | 0x040000B8 | [ DMA0CNT_L] ( #REG_DMA0CNT_L ) | 16 | ^^ |
157
+ | 0x040000BA | [ DMA0CNT_H] ( #REG_DMA0CNT_H ) | 16 | ^^ |
158
+ | 0x040000BC | [ DMA1SAD] ( #REG_DMA1SAD ) | 32 | DMA Controller 1 |
159
+ | 0x040000C0 | [ DMA1DAD] ( #REG_DMA0DAD ) | 32 | ^^ |
160
+ | 0x040000C4 | [ DMA1CNT_L] ( #REG_DMA0CNT_L ) | 16 | ^^ |
161
+ | 0x040000C6 | [ DMA1CNT_H] ( #REG_DMA0CNT_H ) | 16 | ^^ |
162
+ | 0x040000C8 | [ DMA2SAD] ( #REG_DMA1SAD ) | 32 | DMA Controller 2 |
163
+ | 0x040000CC | [ DMA2DAD] ( #REG_DMA0DAD ) | 32 | ^^ |
164
+ | 0x040000D0 | [ DMA2CNT_L] ( #REG_DMA0CNT_L ) | 16 | ^^ |
165
+ | 0x040000D2 | [ DMA2CNT_H] ( #REG_DMA0CNT_H ) | 16 | ^^ |
166
+ | 0x040000D4 | [ DMA3SAD] ( #REG_DMA1SAD ) | 32 | DMA Controller 3 |
167
+ | 0x040000D8 | [ DMA3DAD] ( #REG_DMA3DAD ) | 32 | ^^ |
168
+ | 0x040000DC | [ DMA3CNT_L] ( #REG_DMA0CNT_L ) | 16 | ^^ |
169
+ | 0x040000DE | [ DMA3CNT_H] ( #REG_DMA0CNT_H ) | 16 | ^^ |
170
+
171
+
172
+ <h3 id =" hardware-register-summary-timer " ><a class =" header " href =" #hardware-register-summary-timer " >
173
+ Timer
174
+ </a ></h3 >
175
+
176
+ | Address | Name | Size | Description |
177
+ | ------------| ----------------------------------| ------| -------------|
178
+ | 0x04000100 | [ TM0D] ( #REG_TMD ) | 16 | Timer 0 |
179
+ | 0x04000102 | [ TM0CNT] ( #REG_TMCNT ) | 16 | ^^ |
180
+ | 0x04000104 | [ TM1D] ( #REG_TMD ) | 16 | Timer 1 |
181
+ | 0x04000106 | [ TM1CNT] ( #REG_TMCNT ) | 16 | ^^ |
182
+ | 0x04000108 | [ TM2D] ( #REG_TMD ) | 16 | Timer 2 |
183
+ | 0x0400010A | [ TM2CNT] ( #REG_TMCNT ) | 16 | ^^ |
184
+ | 0x0400010C | [ TM3D] ( #REG_TMD ) | 16 | Timer 3 |
185
+ | 0x0400010E | [ TM3CNT] ( #REG_TMCNT ) | 16 | ^^ |
186
+
187
+
188
+ <h3 id =" hardware-register-summary-serial " ><a class =" header " href =" #hardware-register-summary-serial " >
189
+ Serial peripherals
190
+ </a ></h3 >
191
+
192
+ See [ Serial port mode and control] ( #hardware-register-summary-rcnt ) to switch to the correct mode.
193
+
194
+ <h4 id =" hardware-register-summary-serial-spi " ><a class =" header " href =" #hardware-register-summary-serial-spi " >
195
+ Normal / SPI
196
+ </a ></h4 >
197
+
198
+ | Address | Name | Size | Description |
199
+ | ------------| ----------------------------------| ------| -------------|
200
+ | 0x04000128 | [ SCCNT_L] ( #REG_SCCNT_L ) | 16 | Serial peripheral mode, status, and control |
201
+ | 0x0400012A | [ SCCNT_H] ( #REG_SCCNT_H ) | 8 | Serial data send and receive |
202
+
203
+ <h4 id =" hardware-register-summary-serial-multiplay " ><a class =" header " href =" #hardware-register-summary-serial-multiplay " >
204
+ Multiplay
205
+ </a ></h4 >
206
+
207
+ | Address | Name | Size | Description |
208
+ | ------------| ----------------------------------| ------| -------------|
209
+ | 0x04000120 | [ SCD0] ( #REG_SCD ) | 16 | Multiplay received data from master |
210
+ | 0x04000122 | [ SCD1] ( #REG_SCD ) | 16 | Multiplay received data from slave 1 |
211
+ | 0x04000124 | [ SCD2] ( #REG_SCD ) | 16 | Multiplay received data from slave 2 |
212
+ | 0x04000126 | [ SCD3] ( #REG_SCD ) | 16 | Multiplay received data from slave 3 |
213
+ | 0x04000128 | [ SCCNT_L] ( #REG_SCCNT_L ) | 16 | Serial peripheral mode, status, and control |
214
+ | 0x0400012A | [ SCCNT_H] ( #REG_SCCNT_H ) | 16 | Multiplay transmit value |
215
+
216
+ <h4 id =" hardware-register-summary-serial-uart " ><a class =" header " href =" #hardware-register-summary-serial-uart " >
217
+ UART
218
+ </a ></h4 >
219
+
220
+ | Address | Name | Size | Description |
221
+ | ------------| ----------------------------------| ------| -------------|
222
+ | 0x04000128 | [ SCCNT_L] ( #REG_SCCNT_L ) | 16 | Serial peripheral mode, status, and control |
223
+ | 0x0400012A | [ SCCNT_H] ( #REG_SCCNT_H ) | 8 | UART send (W) and receive (R) FIFO |
224
+
225
+
226
+ <h3 id =" hardware-register-summary-key " ><a class =" header " href =" #hardware-register-summary-key " >
227
+ Keypad
228
+ </a ></h3 >
229
+
230
+ | Address | Name | Size | Description |
231
+ | ------------| ----------------------------------| ------| -------------|
232
+ | 0x04000130 | [ KEYINPUT] ( #REG_KEYINPUT ) | 16 | Keypad input |
233
+ | 0x04000132 | [ KEYCNT] ( #REG_KEYCNT ) | 16 | Keypad wake and interrupt control |
234
+
235
+
236
+ <h3 id =" hardware-register-summary-rcnt " ><a class =" header " href =" #hardware-register-summary-rcnt " >
237
+ Serial port (EXT.) control
238
+ </a ></h3 >
239
+
240
+ | Address | Name | Size | Description |
241
+ | ------------| ----------------------------------| ------| -------------|
242
+ | 0x04000134 | [ RCNT] ( #REG_RCNT ) | 16 | Port mode control,<br >GPIO direction and value,<br >GPIO interrupt enable |
243
+
244
+
245
+ <h3 id =" hardware-register-summary-joybus " ><a class =" header " href =" #hardware-register-summary-joybus " >
246
+ JOYBUS
247
+ </a ></h3 >
248
+
249
+ > TODO: JOYBUS is not explored enough yet to be documented here.
250
+
251
+
252
+ <h3 id =" hardware-register-summary-irq " ><a class =" header " href =" #hardware-register-summary-irq " >
253
+ Interrupts
254
+ </a ></h3 >
255
+
256
+ | Address | Name | Size | Description |
257
+ | ------------| ----------------------------------| ------| -------------|
258
+ | 0x04000200 | [ IE] ( #REG_IE ) | 16 | Interrupt enable selection |
259
+ | 0x04000202 | [ IF] ( #REG_IF ) | 16 | Interrupt status and acknowledge |
260
+ | 0x04000208 | [ IME] ( #REG_IME ) | 32 | Interrupt Master Enable |
261
+
262
+
263
+ <h3 id =" hardware-register-summary-cartcnt " ><a class =" header " href =" #hardware-register-summary-cartcnt " >
264
+ Cartridge slot control
265
+ </a ></h3 >
266
+
267
+ | Address | Name | Size | Description |
268
+ | ------------| ----------------------------------| ------| -------------|
269
+ | 0x04000204 | [ WAITCNT] ( #REG_WAITCNT ) | 16 | Cartridge waitstate control,<br >clock output,<br >prefetch enable,<br >and cartridge shape status |
270
+
271
+
272
+ <h3 id =" hardware-register-summary-system " ><a class =" header " href =" #hardware-register-summary-system " >
273
+ System control
274
+ </a ></h3 >
275
+
276
+ | Address | Name | Size | Description |
277
+ | ------------| ----------------------------------| ------| -------------|
278
+ | 0x04000300 | [ HALTCNT] ( #REG_HALTCNT ) | 16 | Low-power mode control<br >and boot flag status |
279
+ | 0x04000800 | | 32 | (Only on AGB, AGS, GBP, and OXY)<br >Test mode control |
280
+
281
+ * * *
282
+
29
283
<h2 id =" graphics-hardware-registers " ><a class =" header " href =" #graphics-hardware-registers " >
30
284
0x04000000 - 0x04000054 - Graphics Hardware Registers
31
285
</a ></h2 >
0 commit comments