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

■6.4 Coefficient table control

A rotating scroll screen can have rotation parameters used when calculating display coordinates in VRAM or color RAM as a coefficient table separate from the rotation parameter table. By reading this coefficient table line by line or dot by dot, various image expressions can be created.
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 coefficient table data is required for each line, store the coefficient table in VRAM. 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.

If you need coefficient table data for each dot, store the coefficient table in either VRAM or color RAM. When storing in VRAM, specify at least one bank as a coefficient table using the rotation data bank specification bit in the RAM control register. At that time, specify the VRAM address for reading the stored coefficient table data in KAst, DKAst, DKAx and coefficient table address offset register in the rotation parameter table. Also, when storing the coefficient table in color RAM, store it in the latter half of color RAM (100800H to 100FFFH). At this time, specify the color RAM address for reading the stored coefficient table data to 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 to use the data read from the coefficient table as a parameter.

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

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

If mode 2 is specified, the kx read from the rotation parameter table is used as is, but the data read from the coefficient table is used for ky.

If mode 3 is specified, the X-direction viewpoint coordinate Xp that has been rotated according to the data read from the rotation parameter table will be invalidated, and the data read from the coefficient table will be used as Xp.

◆Line color screen data
Coefficient data can be used not only as rotation parameters but also as part of line color screen data. In this case, the upper 4 bits of data read from the line color screen table are added to the 7 bits of data that are part of the coefficient data. Line color screen data using the coefficient table is shown in Figure 6.6.

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

If the rotation parameter mode is specified as mode 0 , a line color screen based on the coefficient table of rotation parameter A will be used.

If mode 1 is specified, a line color screen based on the coefficient table of rotation parameter B will be used.

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

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

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

◆Bit configuration of coefficient table data
The data size on the coefficient table can be selected as either 1 word or 2 words, and the data structure changes depending on the coefficient data size and coefficient data mode. Figure 6.7 shows the bit configuration of 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
 10
 09
 08
 07
 06
 05
 04
 03
 02
 01
 00
 transparent
 Line color screen data (7bit)
 sign
 Integer part (7bit)
 +2H
 15
 14
 13
 12
 11
 10
 09
 08
 07
 06
 05
 04
 03
 02
 01
 00
 Decimal part (16bit)
●Coefficient data size: 1 word
 +0H
 15
 14
 13
 12
 11
 10
 09
 08
 07
 06
 05
 04
 03
 02
 01
 00
 transparent
 sign
 Integer part (4bit)
 Decimal part (10bit)

■Coefficient data mode 3
●Coefficient data size: 2 words
 +0H
 15
 14
 13
 12
 11
 10
 09
 08
 07
 06
 05
 04
 03
 02
 01
 00
 transparent
 Line color screen data (7bit)
 sign
 Upper integer part (7bit)
 +2H
 15
 14
 13
 12
 11
 10
 09
 08
 07
 06
 05
 04
 03
 02
 01
 00
 Lower integer part (8bit)
 Decimal part (8bit)
●Coefficient data size: 1 word
 +0H
 15
 14
 13
 12
 11
 10
 09
 08
 07
 06
 05
 04
 03
 02
 01
 00
 transparent
 sign
 Integer part (12bit)
 Decimal part

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

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

Table 6.3 Address values indicated by the least significant bit of coefficient parameter data by coefficient data size
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 coefficient data is normally used as the transparency bit, and dots with coefficient data where this bit is 1 are forced to be transparent dots. However, in RBG0, if 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 rotation parameter A is displayed, and when it is 1, the image specified by 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 transparency bit. The most significant bit of coefficient data for RBG1 is always used as the transparency bit.
Table 6.4 shows the processing using the most significant bit value of coefficient data.

Table 6.4 Image processing using the most significant bit value of coefficient data for RBG0
 Rotation parameters
mode
 rotate
parameters
 most significant bit
function
 most significant bit
value
     Image processing
0 A transparent 0 Display the image obtained using that coefficient data
1 Force dots using that coefficient data to become transparent dots
B do not use
1 A do not use
B transparent 0 Display the image obtained using that coefficient data
1 Force dots using that coefficient data to become transparent dots
2 A Parameter switching 0 Display the image obtained using that coefficient data
1 Disable its coefficient data and display the image obtained by rotation parameter B
B transparent 0 Display the image obtained using that coefficient data
1 Force dots using that coefficient data to become transparent dots
3 A, B transparent 0 Display the image obtained using that coefficient data
1 Force dots using that coefficient data to become transparent dots


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