Nintendo 1504166 Programming Manual - Page 60

Character Data Mapping, VRAM 2-Dimensional Mapping for OBJ Characters

Page 60 highlights

AGB Programming Manual Rendering Functions 6.3.2 Character Data Mapping With OBJ character data, the basic character is 8 x 8 dots, and characters between 8 x 8 and 64 x 64 dots can be handled (total of 12 types). The base address of OBJ character data is a fixed VRAM base address. The OBJ character data capacity allocated is either 32 Kbytes or 16 Kbytes, depending on the BG mode (see 5.1.2 "VRAM Memory Map"). There are 2 types of mapping to the character area, and they can be specified in bit [d06] of the DISPCNT register. OBJ is managed by character numbers that are divided by 32 bytes starting with OBJ character database address. 32 bytes is the required capacity to define 1 basic character of 16 colors x 16 palettes. 64 bytes is the required capacity to define 1 basic character of 256 colors x 1 palette. 1) VRAM 2-Dimensional Mapping for OBJ Characters Setting the DISPCNT register bit [d06] to 0 results in the 2-dimensional mapping mode shown in the following figure. Basic Character 8x8 dots (16 colors/16 palettes) 32x32 dots 000H (16 colors/16 palettes) 020H 001H 021H 002H 022H 003H 023H 004H 024H 005H 025H 006H 007H 026H 027H 008H 028H 040H 041H 042H 043H 044H 045H 046H 047H 048H 060H 061H 062H 063H 064H 065H 066H 067H 068H 64x64 dots 080H (16 colors/16 palettes) 0A0H 081H 0A1H 082H 0A2H 083H 0A3H 084H 0A4H 085H 0A5H 086H 0A6H 087H 0A7H 088H 0A8H 0C0H 0C1H 0C2H 0C3H 0C4H 0C5H 0C6H 0C7H 0C8H 0E0H 0E1H 0E2H 0E3H 0E4H 0E5H 0E6H 0E7H 0E8H 100H 101H 102H 103H 104H 105H 106H 107H 108H 120H 121H 122H 123H 124H 125H 126H 127H 128H 140H 141H 142H 143H 144H 145H 146H 147H 148H 160H 161H 162H 163H 164H 165H 166H 167H 168H 01BH 01CH 01DH 01EH 01FH 03BH 03CH 03DH 03EH 03FH 05BH 05CH 05DH 05EH 05FH 8x16 dots (16 colors/16 palettes) 07BH 07CH 07DH 07EH 07FH 09BH 09CH 09DH 09EH 09FH 0BBH 0BCH 0BDH 0BEH 0BFH 16x16 dots (256 colors/1 palette) 0DBH 0DCH 0DDH 0DEH 0DFH 0FB H 0FCH 0FDH 0FE H 0FFH 11BH 11CH 11DH 11EH 11FH 13BH 13CH 13DH 13EH 13FH 15BH 15CH 15DH 15EH 15FH 17BH 17CH 17DH 17EH 17FH Character mapping area (character no.in hexadecimal notation) Character name ©1999 - 2001 Nintendo of America Inc. 60 D.C.N. AGB-06-0001-002B4

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171

AGB Programming Manual
Rendering Functions
©1999 - 2001 Nintendo of America Inc.
60
D.C.N. AGB-06-0001-002B4
6.3.2 Character Data Mapping
With OBJ character data, the basic character is 8 x 8 dots, and characters
between 8 x 8 and 64 x 64 dots can be handled (total of 12 types).
The
base address of OBJ character data is a fixed VRAM base address.
The
OBJ character data capacity allocated is either 32 Kbytes or 16 Kbytes,
depending on the BG mode (see 5.1.2 "VRAM Memory Map").
There are 2 types of mapping to the character area, and they can be
specified in bit [d06] of the DISPCNT register.
OBJ is managed by character numbers that are divided by 32 bytes
starting with OBJ character database address.
32 bytes is the required
capacity to define 1 basic character of 16 colors x 16 palettes.
64 bytes is
the required capacity to define 1 basic character of 256 colors x 1 palette.
1) VRAM 2-Dimensional Mapping for OBJ Characters
Setting the DISPCNT register bit [d06] to 0 results in the 2-dimensional
mapping mode shown in the following figure.
000
H
001
H
002
H
003
H
020
H
021
H
022
H
044
H
040
H
041
H
042
H
043
H
004
H
024
H
025
H
005
H
023
H
045
H
060
H
061
H
062
H
063
H
080
H
081
H
082
H
0A4
H
0A0
H
0A1
H
0A2
H
0A3
H
064
H
084
H
085
H
065
H
083
H
0A5
H
0C0
H
0C1
H
0C2
H
0C3
H
0E0
H
0E1
H
0E2
H
104
H
100
H
101
H
102
H
103
H
0C4
H
0E4
H
0E5
H
0C5
H
0E3
H
105
H
120
H
121
H
122
H
123
H
140
H
141
H
142
H
164
H
160
H
161
H
162
H
163
H
124
H
144
H
145
H
125
H
143
H
165
H
006
H
047
H
046
H
028
H
008
H
026
H
048
H
087
H
066
H
0A7
H
0A6
H
067
H
088
H
068
H
086
H
0A8
H
0E7
H
0C6
H
107
H
106
H
0C7
H
0E8
H
0C8
H
0E6
H
108
H
147
H
126
H
167
H
166
H
127
H
148
H
128
H
146
H
168
H
01B
H
05B
H
03B
H
07B
H
01D
H
01C
H
01E
H
05D
H
03C
H
07D
H
07C
H
05E
H
05C
H
07E
H
01F
H
05F
H
07F
H
09B
H
0DB
H
0BB
H
0FB
H
09D
H
09C
H
09E
H
0DD
H
0BC
H
0FD
H
0FC
H
0BD
H
0DE
H
0BE
H
0DC
H
0FE
H
09F
H
0DF
H
0BF
H
0FF
H
11B
H
15B
H
13B
H
17B
H
11D
H
11C
H
11E
H
15D
H
13C
H
17D
H
17C
H
13D
H
15E
H
13E
H
15C
H
17E
H
11F
H
15F
H
13F
H
17F
H
32x32 dots
(16 colors/16 palettes)
64x64 dots
(16 colors/16 palettes)
8x16 dots
(16 colors/16 palettes)
16x16 dots
(256 colors/1 palette)
Basic Character
8x8 dots
(16 colors/16 palettes)
Character mapping area (character no.in hexadecimal notation)
Character name
027
H
03D
H
03E
H
03F
H
007
H