There are two nearly identical 2D cores in the Nintendo DS. The main core has an additional background mode.
NOTE: SOME OF THIS INFORMATION IS WRONG, BEWARE
Core-specific registers
| Core | Register offset |
| A | 0x04000000 |
| B | 0x04001000 |
| Offset:Width | Mode | Name |
| 0x00:32 | R/W | DISPLAY_CR |
| 0x08:16 | R/W | BG0_CR |
| 0x0A:16 | R/W | BG1_CR |
| 0x0C:16 | R/W | BG2_CR |
| 0x0E:16 | R/W | BG3_CR |
| 0x10:16 | W | BG0_X |
| 0x12:16 | W | BG0_Y |
| 0x14:16 | W | BG1_X |
| 0x16:16 | W | BG1_Y |
| 0x18:16 | W | BG2_X |
| 0x1A:16 | W | BG2_Y |
| 0x1C:16 | W | BG3_X |
| 0x1E:16 | W | BG3_Y |
| 0x20:16 | W | BG2_HDX |
| 0x22:16 | W | BG2_HDY |
| 0x24:16 | W | BG2_VDX |
| 0x26:16 | W | BG2_VDY |
| 0x28:32 | W | BG2_X0 |
| 0x2C:32 | W | BG2_Y0 |
| 0x30:16 | W | BG3_HDX |
| 0x32:16 | W | BG3_HDY |
| 0x34:16 | W | BG3_VDX |
| 0x36:16 | W | BG3_VDY |
| 0x38:32 | W | BG3_X0 |
| 0x3C:32 | W | BG3_Y0 |
| 0x40:16 | W | WIN0_X |
| 0x42:16 | W | WIN1_X |
| 0x44:16 | W | WIN0_Y |
| 0x46:16 | W | WIN1_Y |
| 0x48:16 | R/W | WIN_IN (3f3f) |
| 0x4A:16 | R/W | WIN_OUT (3f3f) |
| 0x4C:16 | W | MOSAIC |
| 0x50:16 | R/W | BLEND_CR (3fff) |
| 0x52:16 | R/W | BLEND_AB (1f1f) |
| 0x54:16 | W | BLEND_Y |
| 0x6C:16 | R/W | BRIGHT_CR (c01f) |
DISPLAY_CONTROL
| bit | name |
| 31 | Extended sprite palette enable |
| 30 | Extended background palette enable |
| 29..24 | ? |
| 23 | ? |
| 22..20 | Extended sprite mode |
| 19..18 | Framebuffer select (extended mode 2) |
| 17..16 | Extended mode |
| 15 | Sprite window enable |
| 14 | Window 1 enable |
| 13 | Window 0 enable |
| 12 | Sprite enable |
| 11 | BG3 enable |
| 10 | BG2 enable |
| 9 | BG1 enable |
| 8 | BG0 enable |
| 7 | Forced blank |
| 6..4 | Sprite mode |
| 3 | 0: BG0 is 2D layer, 1: BG0 is 3D layer |
| 2..0 | Display mode |
Extended Mode:
- 0: Framebuffer
- 1: GBA-style (see display mode)
- 2: acts like framebuffer
- 3: ?
DISP_CR2
| bit | name |
| 31 | Extended sprite palette enable |
| 30 | Extended background palette enable |
| 29..23 | ? |
| 22..20 | Extended sprite mode |
| 19..18 | ? |
| 17..16 | Extended mode |
| 15 | Sprite window enable |
| 14 | Window 1 enable |
| 13 | Window 0 enable |
| 12 | Sprite enable |
| 11 | BG3 enable |
| 10 | BG2 enable |
| 9 | BG1 enable |
| 8 | BG0 enable |
| 7 | Forced blank |
| 6..4 | Sprite mode |
| 3 | ? |
| 2..0 | Display mode |
Extended Mode:
- 0: ?
- 1: GBA-style (see display mode)
- 2: ?
- 3: ?
NOTE: THIS INFORMATION IS POSSIBLY WRONG
Display Mode (ignored unless Extended Mode is 1):
- 0: Mode 0 (4 text layers)
- 1: Mode 1 (2 text layers, 1 rot/scale)
- 2: Mode 2 (2 rot/scale)
- 3: Mode 3 (15 bpp framebuffer, single page)
- 4: Mode 4 (8 bpp indexed framebuffer, double buffered)
- 5: Mode 5 (bg0 is text/3d, bg1 is text, bg2 is extended rot/scale background)
- 6: Mode 6 ?
Extended rot/scale background in mode 5:
Size fields:
BG_BMP16_128x128
BG_BMP16_256x256
BG_BMP16_512x256
BG_BMP16_512x512
Each element in the background is a 16 bit direct-color entry A1B5G5R5. If the top bit is zero, the pixel is transparent, otherwise it is opaque.
Differences to the GBA:
- Alpha bit (modes 3 and 5 were always opaque on GBA)
- Multiple sizes
- Rot/scale registers are *not* set to straight display by default
BRIGHT_CR
| bit | name |
| 15..14 | Mode |
| 13..5 | - |
| 4..0 | Amount |
Mode:
- 00, 11: Amount ignored, middle brightness
- 01: Increase, brightness = middle + amount (0x8 and above are pretty much useless)
- 10: Decrease, brightness = middle - amount (0x8 and above are pretty much useless)
Bits marked as - read as 0, and ignore writes.