Scrolling; Figure 35 - Offset Settings Registers - Nintendo GAME BOY ADVANCE Programming Manual

Hide thumbs Also See for GAME BOY ADVANCE:
Table of Contents

Advertisement

42
6.1.7.1
Operations Used in BG Rotation/Scaling Processing
1. Using software, the user determines the results of the rotation/scaling operation for the left-upper coor-
dinate of the display screen and sets this as the starting point of the BG data reference in registers
BG2X_L, BG2X_H, BG2Y_L, BG2Y_H, BG3X_L, BG3X_H, BG3Y_L, and BG3Y_H. The set value is a
signed fixed-point number (8 bits for fractional portion, 19 bits for integer portion, and 1 bit for sign, for
a total of 28 bits).
The BG data reference direction is set in BG2PA, BG2PB, BG2PC, BG2PD, BG3PA, BG3PB, BG3PC,
and BG3PD. The set value is a signed fixed-point number (8 bits for fractional portion, 7 bits for integer
portion, and 1 bit for sign, for a total of 16 bits).
2. The image processing circuit sums the increases in the x direction (dx, dy) in relation to the BG data
reference starting point set in the above registers, and calculates the x-coordinate.
3. When the line is advanced, the increases in the y direction (d
reference starting point, and the coordinate of the rendering starting point for the next line is calcu-
lated. The processing in step 2) is then performed.
4. However, if a register for the BG data reference starting point is rewritten during an H-blanking interval,
the y-direction summation for that register is not calculated. The CPU uses this mode to change the
center coordinate and the rotation/scaling parameters for each line.
6.1.7.2
Area Overflow Processing
When the display screen overflows the boundaries of the virtual screen due to a rotation/scaling operation,
this BG control register can be used to select whether the area of the screen into which the overflow
occurs is transparent or wraps around the display screen.
For information on BG control, see
6.1.8
BG Scrolling
For each text BG screen, the offset on the display screen can be specified in 1-pixel increments. Offset
register is only valid for Text BG. In order to offset display Scaling/Rotation BG and Bitmap Mode BG set
the BG Reference Starting Point. See
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
 Address
Register 
010h
BG0HOFS
014h
BG1HOFS
018h
BG2HOFS
01Ch
BG3HOFS
 Address
Register 
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
012h
BG0VOFS
016h
BG1VOFS
01Ah
BG2VOFS
01Eh
BG3VOFS
 AGB-06-0001-002-B13
Released: May 27, 2005
Game Boy Advance Programming Manual
"6.1.1 BG
Control" on page 25.
"6.1.7 BG Rotation and Scaling

Figure 35 - Offset Settings Registers

x, d
y) are summed in relation to the
µ
µ
Features" on page 40.
 Attributes Initial Value
W
H offset
 Attributes Initial Value
W
V offset
© 1999-2005 NINTENDO
May 25, 2005
0000h
0000h

Advertisement

Table of Contents
loading

Table of Contents