You are not logged in. | Register | Resend Activation

Bgm Affine Mode

This is used to display zooming and rotation effects. MX, MY, and MP are ignored in this mode, cut the BGMap from 0,0. GX, GY, GP, X, and Y are all used just like the Normal mode. The true Param_Base is equal to (Param_Base ^^ 0xFFF0) * 2 + 0×20000. Each line of the BGMap has an entry in the param_table. Each entry determines how that line is to be shifted, called, and rotated.

Table 1: Affine Param table entry

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
H_SKW (12_BIT FP)
PRLX
V_SCL (12_BIT FP)
H_SCL (6_BIT FP)
V_SCW (6_BIT FP)
(Unknown)
(Unknown)
(Unknown)

H_SKW - Fixed point that defines the horizontal offset to start cutting out the image from the BGMap. This defines both the source X
offset and the horizontal skew. Change it for each line to generate the horizontal skew. True_h_skew = (float)(h_skw/8.0)
V_SCL - Fixed point that defines the vertical offset to start cutting out the image from the BGMap. This defines both the source Y offset
and the vertical scale. Change it for each line to generate the vertical scale. True_v_scale = (float)(v_scl/8.0)
Prlx - Parallax offset for screen X position, true X coordinates are computed by GX-GP-Prlx = True_X for the left screen, and
GX+GP+Prlx = True_X for the right screen.
H_SCL - Fixed point scale factor for horizontal direction true_h_scale = (float)(h_scl/512.0)
V_SCW - Fixed point skew factor for vertical direction true_v_skew = (float)(v_skw/512.0)

The last three entries in the param table, along with the overplain character are unknown.

h_skw = dest_y * y_skew
v_scl = dest_y * y_scale
source_x = h_skw + dest_x * h_scl
source_y = v_scl + dest_x * v_skw

 


Last modified: 10.07.2008