HARDWARE ManualVDP2 User's ManualChapter 6 Rotating scroll screen
BackForward
VDP2 User's Manual / Chapter 6 Rotating Scroll Screen

■ 6.4 Coefficient table control

The rotation scroll screen can have the rotation parameters used when calculating the display coordinates in VRAM or color RAM as a coefficient table separately from the rotation parameter table. Various image representations can be made by reading this coefficient table line by line or dot by dot.
There are two timings when coefficient table data is required, depending on how the display coordinates are calculated.

(1) Required for each line
(2) Required for each dot

If you need coefficient table data line by line, store the coefficient table in VRAM. The VRAM address for reading the stored coefficient table data is specified in the KAst, DKAst, DKAx and coefficient table address offset registers in the rotation parameter table.

If you need coefficient table data dot by dot, store the coefficient table in either VRAM or color RAM. When storing in VRAM, specify at least one bank as the coefficient table by the rotation data bank specification bit of the RAM control register. At that time, the VRAM address for reading the stored coefficient table data is specified in KAst, DKAst, DKAx and the coefficient table address offset register in the rotation parameter table. When storing the coefficient table in color RAM, store it in the latter half of color RAM (100800H to 100FFFH). At that time, specify the color RAM address for reading the stored coefficient table data in KAst, DKAst, and DKAx in the rotation parameter table. However, when reading the coefficient table data, only the lower 10 bits of the calculated coefficient table address integer part are valid.

You can select from the following four coefficient modes as to what parameter to use the data read from the coefficient table.

In mode 0 , kx and ky read from the rotation parameter table are invalid, and the data read from the coefficient table is used as kx and ky.

When mode 1 is specified, the ky read from the rotation parameter table is used as it is, but the data read from the coefficient table is used for kx.

When mode 2 is specified, kx read from the rotation parameter table is used as it is, but ky uses the data read from the coefficient table.

When mode 3 is specified, the viewpoint coordinate Xp in the X direction that has been rotationally transformed according to the data read from the rotation parameter table becomes invalid, and the data read from the coefficient table is used as Xp.

◆ Line color screen data
The coefficient data can be used not only as a rotation parameter, but also as part of the line color screen data at the same time. In this case, the upper 4 bits of the data read from the line color screen table are added to the upper 7 bits of the 7-bit data that is part of the coefficient data. Figure 6.6 shows the line color screen data using the coefficient table.

Figure 6.6 Line color screen data using coefficient data
 
Read from the line color screen table Read from the coefficient table 
Line color screen data 11 bits Upper 4 bits Line color screen data 7 bits ┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐┌─┬─┬─┬─┬─┬ ─┬─┐
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘└─┴─┴─┴─┴─┴─┴─┘
└──┬──┘ └───────────┘ 
│ │ 
└──────┐ ┌──────────┘ 
↓ ↓ 
┌─────┐ ┌───────────┐ 
┌─┬─┬─┬─┬─┬─┬─┬─┬─┬─┬─┐ 
│ │ │ │ │ │ │ │ │ │ │ │ │ │ 
└─┴─┴─┴─┴─┴─┴─┴─┴─┴─┴─┘ 
Line color data after composition 

When the rotation parameter mode is set to mode 0 , the line color screen based on the coefficient table of rotation parameter A is used.

When mode 1 is specified, the line color screen with the coefficient table of rotation parameter B is used.

When mode 2 is specified, the line color screen based on the coefficient table of rotation parameter A is used for both the picture with rotation parameter A and the picture with rotation parameter B.

When mode 3 is specified, the line color screen based on the coefficient table of rotation parameter A is used for the picture with rotation parameter A, and the line color screen with the coefficient table of rotation parameter B is used for the picture with rotation parameter B. .. Also, when displaying RBG1, the line color screen with the coefficient table of rotation parameter A is used for both RBG0 and RBG1.

For details on the line color screen, refer to "7.1 Line color screen".

◆ Bit configuration of coefficient table data
The data size on the coefficient table can be selected from either 1 word or 2 words, and the data structure changes depending on the coefficient data size and the coefficient data mode. Figure 6.7 shows the bit configuration of the coefficient table data.

Figure 6.7 Bit configuration of coefficient table data

■ Coefficient data mode 0-2
● Coefficient data size: 2 words
 + 0H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 Transparent
 Line color screen data (7bit)
 Code
 Integer part (7bit)
 + 2H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 Fractional part (16bit)
● Coefficient data size: 1 word
 + 0H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 Transparent
 Code
 Integer part (4bit)
 Fractional part (10bit)

■ Coefficient data mode 3
● Coefficient data size: 2 words
 + 0H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 Transparent
 Line color screen data (7bit)
 Code
 Integer part upper (7bit)
 + 2H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 Integer part lower (8bit)
 Decimal part (8bit)
● Coefficient data size: 1 word
 + 0H
 15
 14
 13
 12
 11
 Ten
 09 09
 08 08
 07 07
 06 06
 05 05
 04
 03 03
 02 02
 01 01
 00
 Transparent
 Code
 Integer part (12bit)
 Decimal part

◆ Coefficient table start address
The start address of the coefficient table is obtained from the coefficient table address offset register and the coefficient table start address (KAst integer part 16 bits) read from the rotation parameter table. In addition, the coefficient table vertical address increment (DKAst integer part 9 bits) and the coefficient table horizontal address increment (DKAx integer part 9 bits) are also read from the rotation parameter table. The address values of these address offsets, start addresses, and address increments vary depending on the data size of the coefficient table. The least significant bit of each value indicates

The address values are shown in Table 6.3.
For example, 4H in the case of 2 words means that the least significant bit of the KAst integer part represents the address value of 4H, and it can be calculated as follows.

Table 6.3 Coefficient parameter by coefficient data size Address value indicated by the least significant bit of data
Coefficient data size Address value indicated by the least significant bit
Coefficient table address offset register value KAst, △ KAst, △ KAx integer part value
2 words 40000H 4H
1 word 20000H 2H

◆ Most significant bit of coefficient data
The most significant bit of the coefficient data is usually used as a transparent bit, and dots using coefficient data with this bit being 1 are forced to be transparent dots. However, in RBG0, when rotation parameter mode 2 is selected, the most significant bit of the data read from the coefficient table for rotation parameter A is used for switching the rotation parameter. When the most significant bit is 0, the image specified by the rotation parameter A is displayed, and when it is 1, the image specified by the rotation parameter B is displayed. At this time, the most significant bit of the coefficient data read from the coefficient table for rotation parameter B is used as the transparent bit. The most significant bit of the coefficient data for RBG1 is always used as the transparent bit.
Table 6.4 shows the processing using the most significant bit value of the coefficient data.

Table 6.4 Image processing using the most significant bit value of the coefficient data for RBG0
 Rotation parameter mode
 Rotation parameters
 Most significant bit function
 Most significant bit value
     Image processing
0 A Transparent 0 Display the image obtained using the coefficient data
1 Forcibly make dots using the coefficient data transparent dots
B do not use
1 A do not use
B Transparent 0 Display the image obtained using the coefficient data
1 Forcibly make dots using the coefficient data transparent dots
2 A Parameter switching 0 Display the image obtained using the coefficient data
1 The coefficient data is invalidated and the image obtained by rotation parameter B is displayed.
B Transparent 0 Display the image obtained using the coefficient data
1 Forcibly make dots using the coefficient data transparent dots
3 A, B Transparent 0 Display the image obtained using the coefficient data
1 Forcibly make dots using the coefficient data transparent dots


BackForward
HARDWARE Manual VDP2 User's ManualChapter 6 Rotating scroll screen
Copyright SEGA ENTERPRISES, LTD., 1997