Tech Specs
|
If you want to learn ARM get the Cheatsheet! it has all the ARM7 commands, it covers the commands, and options like Bitshifts and conditions as well as the bytecode structure of the commands! |
Hello World on the GameBoy Advance - ARM Assembly Lesson H2 |
Hello World on the GameBoy Advance with ARM Thumb Assembly - Lesson H4 [GBA] |
Moving a sprite on RiscOS - Simple ARM Assembly Lesson S1 |
Sprite moving on the GameBoy Advance - Arm Assembly Lesson S2 |
Lesson S4 - Sprite moving on the GameBoy Advance (Thumb) [GBA] |
From | To | Purpose |
0x00000000 |
0x00003FFF |
BIOS - System ROM (16 KBytes) |
0x00004000 | 0x01FFFFFF | Not used |
0x02000000 | 0x0203FFFF | WRAM - On-board Work RAM (256 KBytes) 2 Wait |
0x02040000 | 0x02FFFFFF | Not used |
0x03000000 | 0x03007FFF | WRAM - On-chip Work RAM (32 KBytes) |
0x03008000 | 0x03FFFFFF | Not used |
0x04000000 | 0x040003FE | I/O Registers |
0x04000400 | 0x04FFFFFF | Not used |
0x05000000 | 0x050003FF | BG/OBJ Palette RAM (1 Kbyte) |
0x05000400 | 0x05FFFFFF | Not used |
0x06000000 | 0x06017FFF | VRAM - Video RAM (96 KBytes) |
0x06018000 | 0x06FFFFFF | Not used |
0x07000000 | 0x070003FF | OAM - OBJ Attributes (1 Kbyte) |
0x07000400 | 0x07FFFFFF | Not used |
0x08000000 | 0x09FFFFFF | Game Pak ROM/FlashROM (max 32MB) - Wait State 0 |
0x0A000000 | 0x0BFFFFFF | Game Pak ROM/FlashROM (max 32MB) - Wait State 1 |
0x0C000000 | 0x0DFFFFFF | Game Pak ROM/FlashROM (max 32MB) - Wait State 2 |
0x0E000000 | 0x0E00FFFF | Game Pak SRAM (max 64 KBytes) - 8bit Bus width |
0x0E010000 | 0x0FFFFFFF | Not used |
0x10000000 | 0xFFFFFFFF | Not used (upper 4bits of address bus unused) |
Port | Name | Description | Bits | Details |
0x4000060
|
SOUND1CNT_L | Channel 1 Sweep register | ---------TTTDSSS | S=sweep shift D=direction T=Time |
0x4000062 | SOUND1CNT_H | Channel 1 Duty/Length/Envelope (NR11 | VVVVDSSSWWLLLLLL | L=length W=wave pattern duty S=envelope Step D= env direction V=Volume |
0x4000064 | SOUND1CNT_X | Channel 1 Frequency/Control | IL---FFFFFFFFFFF | I=Init sound L=no loop F=Frequency |
0x4000068 | SOUND2CNT_L | Channel 2 Duty/Length/Envelope (NR21 | VVVVDSSSWWLLLLLL | L=length W=wave pattern duty S=envelope Step D= env direction V=Volume |
0x400006C | SOUND2CNT_H | Channel 2 Frequency/Control | IL---FFFFFFFFFFF | I=Init sound L=no loop F=Frequency |
0x4000070 | SOUND3CNT_L | Channel 3 Stop/Wave RAM select (NR30) | -------PBD----- | D=Dimension
B=Bank P=Play (1=on 0=off) |
0x4000072 | SOUND3CNT_H | Channel 3 Length/Volume | FVV-----LLLLLLLL | L=sound Length V=volume F=Force |
0x4000074 | SOUND3CNT_X | Channel 3 Frequency/Control | IL---FFFFFFFFFFF | I=Init sound L=no loop F=Frequency |
0x4000078 | SOUND4CNT_L | Channel 4 Length/Envelope | VVVVDSSS--LLLLLL | L=length S=envelope Step D= env direction V=Volume |
0x400007C | SOUND4CNT_H | Channel 4 Frequency/Control | IL------SSSSCRRR | R=dividing Ration, C=Counter S=shify clock freq L+no Loop I=Init sound |
0x4000080 | SOUNDCNT_L | Control Stereo/Volume/Enable | LLLLRRRR-lll-rrr | LR=Channel on lr=master vol(7=max) |
0x4000082 | SOUNDCNT_H | Control Mixing/DMA Control | BBBBAAAA-ba-VV | |
0x4000084 | SOUNDCNT_X | Control Sound on/off | M---4321 | M=Master ON 1234 (Read) = Sound on flag |
0x4000088 | BIOS SOUNDBIAS | Sound PWM Control | AA----BBBBBBBBB- | A=Amplitude B=Bios |
0x4000090 | WAVE_RAM | 16 Bytes | 1111222233334444 | 4 bit sample data |
0x40000A0 | FIFO_A | Channel A FIFO | ----DDDD----DDDD | D=Wawave Data |
0x40000A4 | FIFO_B | Channel B FIFO | ----DDDD----DDDD | D=Wawave Data |
Port | Name | Description | Bits | Details |
0x4000000 | DISPCNT | LCD Control | Owwddddd Bmhfcbbb | |
0x4000002 | - | Undocumented - Green Swap | ||
0x4000004 | DISPSTAT | General LCD Status (STAT | LYC) | |
0x4000006 | VCOUNT | Vertical Counter (LY) | ||
0x4000008 | BG0CNT | BG0 Control | ||
0x400000A | BG1CNT | BG1 Control | ||
0x400000C | BG2CNT | BG2 Control | ||
0x400000E | BG3CNT | BG3 Control | ||
0x4000010 | BG0HOFS | BG0 X-Offset | ||
0x4000012 | BG0VOFS | BG0 Y-Offset | ||
0x4000014 | BG1HOFS | BG1 X-Offset | ||
0x4000016 | BG1VOFS | BG1 Y-Offset | ||
0x4000018 | BG2HOFS | BG2 X-Offset | ||
0x400001A | BG2VOFS | BG2 Y-Offset | ||
0x400001C | BG3HOFS | BG3 X-Offset | ||
0x400001E | BG3VOFS | BG3 Y-Offset | ||
0x4000020 | BG2PA | BG2 Rotation/Scaling Parameter A (dx) | ||
0x4000022 | BG2PB | BG2 Rotation/Scaling Parameter B (dmx) | ||
0x4000024 | BG2PC | BG2 Rotation/Scaling Parameter C (dy) | ||
0x4000026 | BG2PD | BG2 Rotation/Scaling Parameter D (dmy) | ||
0x4000028 | BG2X | BG2 Reference Point X-Coordinate | ||
0x400002C | BG2Y | BG2 Reference Point Y-Coordinate | ||
0x4000030 | BG3PA | BG3 Rotation/Scaling Parameter A (dx) | ||
0x4000032 | BG3PB | BG3 Rotation/Scaling Parameter B (dmx) | ||
0x4000034 | BG3PC | BG3 Rotation/Scaling Parameter C (dy) | ||
0x4000036 | BG3PD | BG3 Rotation/Scaling Parameter D (dmy) | ||
0x4000038 | BG3X | BG3 Reference Point X-Coordinate | ||
0x400003C | BG3Y | BG3 Reference Point Y-Coordinate | ||
0x4000040 | WIN0H | Window 0 Horizontal Dimensions | ||
0x4000042 | WIN1H | Window 1 Horizontal Dimensions | ||
0x4000044 | WIN0V | Window 0 Vertical Dimensions | ||
0x4000046 | WIN1V | Window 1 Vertical Dimensions | ||
0x4000048 | WININ | Inside of Window 0 and 1 | ||
0x400004A | WINOUT | Inside of OBJ Window & Outside of Windows | ||
0x400004C | MOSAIC | Mosaic Size | ||
0x400004E | Not used | |||
0x4000050 | BLDCNT | Color Special Effects Selection | ||
0x4000052 | BLDALPHA | Alpha Blending Coefficients | ||
0x4000054 | BLDY | Brightness (Fade-In/Out) Coefficient | ||
0x4000056 | Not used | |||
0x40000B0 | DMA0SAD | DMA 0 Source Address | ||
0x40000B4 | DMA0DAD | DMA 0 Destination Address | ||
0x40000B8 | DMA0CNT_L | DMA 0 Word Count | ||
0x40000BA | DMA0CNT_H | DMA 0 Control | ||
0x40000BC | DMA1SAD | DMA 1 Source Address | ||
0x40000C0 | DMA1DAD | DMA 1 Destination Address | ||
0x40000C4 | DMA1CNT_L | DMA 1 Word Count | ||
0x40000C6 | DMA1CNT_H | DMA 1 Control | ||
0x40000C8 | DMA2SAD | DMA 2 Source Address | ||
0x40000CC | DMA2DAD | DMA 2 Destination Address | ||
0x40000D0 | DMA2CNT_L | DMA 2 Word Count | ||
0x40000D2 | DMA2CNT_H | DMA 2 Control | ||
0x40000D4 | DMA3SAD | DMA 3 Source Address | ||
0x40000D8 | DMA3DAD | DMA 3 Destination Address | ||
0x40000DC | DMA3CNT_L | DMA 3 Word Count | ||
0x40000DE | DMA3CNT_H | DMA 3 Control | ||
0x40000E0 | Not used | |||
0x4000100 | TM0CNT_L | Timer 0 Counter/Reload | ||
0x4000102 | TM0CNT_H | Timer 0 Control | ||
0x4000104 | TM1CNT_L | Timer 1 Counter/Reload | ||
0x4000106 | TM1CNT_H | Timer 1 Control | ||
0x4000108 | TM2CNT_L | Timer 2 Counter/Reload | ||
0x400010A | TM2CNT_H | Timer 2 Control | ||
0x400010C | TM3CNT_L | Timer 3 Counter/Reload | ||
0x400010E | TM3CNT_H | Timer 3 Control | ||
0x4000110 | Not used | |||
0x4000120 | SIODATA32 | SIO Data (Normal-32bit Mode; shared with below) | ||
0x4000120 | SIOMULTI0 | SIO Data 0 (Parent) (Multi-Player Mode) | ||
0x4000122 | SIOMULTI1 | SIO Data 1 (1st Child) (Multi-Player Mode) | ||
0x4000124 | SIOMULTI2 | SIO Data 2 (2nd Child) (Multi-Player Mode) | ||
0x4000126 | SIOMULTI3 | SIO Data 3 (3rd Child) (Multi-Player Mode) | ||
0x4000128 | SIOCNT | SIO Control Register | ||
0x400012A | SIOMLT_SEND | SIO Data (Local of MultiPlayer; shared below) | ||
0x400012A | SIODATA8 | SIO Data (Normal-8bit and UART Mode) | ||
0x400012C | Not used | |||
0x4000130 | KEYINPUT | Key Status | ||
0x4000132 | KEYCNT | Key Interrupt Control | ||
0x4000134 | RCNT | SIO Mode Select/General Purpose Data | ||
0x4000136 | IR | Ancient - Infrared Register (Prototypes only) | ||
0x4000138 | Not used | |||
0x4000140 | JOYCNT | SIO JOY Bus Control | ||
0x4000142 | Not used | |||
0x4000150 | JOY_RECV | SIO JOY Bus Receive Data | ||
0x4000154 | JOY_TRANS | SIO JOY Bus Transmit Data | ||
0x4000158 | JOYSTAT | SIO JOY Bus Receive Status | ||
0x400015A | Not used | |||
0x4000200 | IE | Interrupt Enable Register | ||
0x4000202 | IF | Interrupt Request Flags / IRQ Acknowledge | ||
0x4000204 | WAITCNT | Game Pak Waitstate Control | ||
0x4000206 | Not used | |||
0x4000208 | IME | Interrupt Master Enable Register | ||
0x400020A | Not used | |||
0x4000300 | POSTFLG | Undocumented - Post Boot Flag | ||
0x4000301 | HALTCNT | Undocumented - Power Down Control | ||
0x4000302 | Not used | |||
0x4000410 | ? | Undocumented - Purpose Unknown / Bug ??? 0FFh | ||
0x4000411 | Not used | |||
0x4000800 | ? | Undocumented - Internal Memory Control (R/W) | ||
0x4000804 | Not used | |||
0x4xx0800 | ? | Mirrors of 0x4000800 (repeated each 64K) |
H Byte | L Byte | ||||||||||||||||
VRAM Address | F | E | D | C | B | A | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | Details |
7000000h | S | S | C | M | T | T | D | R | Y | Y | Y | Y | Y | Y | Y | Y | Y=Ypos S=Shape (Square /HRect / Vrect)
C=Colors(16/256) M=Mosiac T=Transparent D=Disable/Doublesize R=Rotation |
7000002h | S | S | V | H | R | R | R | X | X | X | X | X | X | X | X | X | X=Xpos S=Obj Size (8x8,16x16,32x32,64x64)
VH=V/HFlip R=Rotation parameter |
7000004h | C | C | C | C | P | P | T | T | T | T | T | T | T | T | T | T | T=Tile Number C=Color palette (16 color mode) P=Priority |
7000006h | Unused by sprite |
On the GBA and NDS In some modes, Layers BG2 and
BG3 can be rotated and scaled. The control of this is performed
by registers 4001020h-400103Ch
For the mathematically challenged
(Like me) I've created a spreadsheet which helps calculate the
correct values for the effect you want... get it Here
|
NDS Example: |
Address | Function
|
Name | Bits | Default |
0x4001020 |
BG2PA | BG2 Rotation/Scaling Parameter A (dx) | SIIIIIIIFFFFFFFF | 0x0100 |
0x4001022 | BG2PB | BG2 Rotation/Scaling Parameter B (dmx) | SIIIIIIIFFFFFFFF | 0x0000 |
0x4001024 | BG2PC | BG2 Rotation/Scaling Parameter C (dy) | SIIIIIIIFFFFFFFF | 0x0000 |
0x4001026 | BG2PD | BG2 Rotation/Scaling Parameter D (dmy) | SIIIIIIIFFFFFFFF | 0x0100 |
0x4001028 | BG2X | BG2 Reference Point X-Coordinate | ----SIIIIIIIIIIIIIIIIIIIFFFFFFFF | 0x00000000 |
0x400102C | BG2Y | BG2 Reference Point Y-Coordinate | ----SIIIIIIIIIIIIIIIIIIIFFFFFFFF | 0x00000000 |
0x4001030 | BG3PA | BG3 Rotation/Scaling Parameter A (dx) | SIIIIIIIFFFFFFFF | 0x0100 |
0x4001032 | BG3PB | BG3 Rotation/Scaling Parameter B (dmx) | SIIIIIIIFFFFFFFF | 0x0000 |
0x4001034 | BG3PC | BG3 Rotation/Scaling Parameter C (dy) | SIIIIIIIFFFFFFFF | 0x0000 |
0x4001036 | BG3PD | BG3 Rotation/Scaling Parameter D (dmy) | SIIIIIIIFFFFFFFF | 0x0100 |
0x4001038 | BG3X | BG3 Reference Point X-Coordinate | ----SIIIIIIIIIIIIIIIIIIIFFFFFFFF | 0x00000000 |
0x400103C | BG3Y | BG3 Reference Point Y-Coordinate | ----SIIIIIIIIIIIIIIIIIIIFFFFFFFF | 0x00000000 |