VDP Sprites: Difference between revisions
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Display Capacity== | ==Display Capacity== | ||
Line 11: | Line 9: | ||
A maximum of 16 sprites and a maximum of 256 pixels will be displayed on each lines. | A maximum of 16 sprites and a maximum of 256 pixels will be displayed on each lines. | ||
The displayed sprites/pixels are the one with the highest [[ | The displayed sprites/pixels are the one with the highest [[VDP_Sprites#Link_/_Priority|priority]]. | ||
===H40 mode=== | ===H40 mode=== | ||
Line 21: | Line 19: | ||
A maximum of 20 sprites and a maximum of 320 pixels will be displayed on each lines. | A maximum of 20 sprites and a maximum of 320 pixels will be displayed on each lines. | ||
The displayed sprites/pixels are the one with the highest [[ | The displayed sprites/pixels are the one with the highest [[VDP_Sprites#Link_/_Priority|priority]]. | ||
==Display Position== | ==Display Position== | ||
Line 31: | Line 29: | ||
The sprite H position is between 0 and 511 but the display area is from 128 to 383 in H32 mode and 128 to 447 in H40 mode. | The sprite H position is between 0 and 511 but the display area is from 128 to 383 in H32 mode and 128 to 447 in H40 mode. | ||
When the sprite H position is 0 this is a special mode. All the sprites on the same line with low [[ | When the sprite H position is 0 this is a special mode. All the sprites on the same line with low [[VDP_Sprites#Link_/_Priority|priority]] will not be displayed. | ||
===Vertical Non-interlace=== | ===Vertical Non-interlace=== | ||
Line 60: | Line 58: | ||
|Unused | |Unused | ||
|4 | |4 | ||
|Horizontal size | |[[VDP_Sprites#Size|Horizontal size]] | ||
|2 | |2 | ||
|Vertical size | |[[VDP_Sprites#Size|Vertical size]] | ||
|2 | |2 | ||
|Unused | |Unused | ||
|1 | |1 | ||
|[[VDP_Sprites# | |[[VDP_Sprites#Link_/_Priority|Link]] | ||
|7 | |7 | ||
}} | }} | ||
Line 76: | Line 74: | ||
|Palette ID | |Palette ID | ||
|2 | |2 | ||
|Vertical Reverse | |||
|1 | |1 | ||
|Horizontal Reverse | |||
|1 | |1 | ||
|Tile ID | |Tile ID | ||
Line 287: | Line 285: | ||
|} | |} | ||
==Link== | ==Link / Priority== | ||
Each sprites entry in the attribute table have a ''link'' property. | |||
This indicated the sprites ID to draw next. | |||
The VDP always starts by the sprites 0 and then follows the link data. The list must be closed by relinking to the sprites 0. (''What happens if not ???'') | |||
Sprite 0 have priority 1, next one priority 2 etc .... | |||
[[Category:Video_system]] |
Latest revision as of 06:35, 12 April 2012
Display Capacity
H32 mode
In H32 mode the VDP can display up to 64 sprites per frame.
There is some limitation on a line basis.
A maximum of 16 sprites and a maximum of 256 pixels will be displayed on each lines.
The displayed sprites/pixels are the one with the highest priority.
H40 mode
In H40 mode the VDP can display up to 80 sprites per frame.
There is some limitation on a line basis.
A maximum of 20 sprites and a maximum of 320 pixels will be displayed on each lines.
The displayed sprites/pixels are the one with the highest priority.
Display Position
The sprite position defined where to start drawing the sprite from the top-left corner.
Horizontal
The sprite H position is between 0 and 511 but the display area is from 128 to 383 in H32 mode and 128 to 447 in H40 mode.
When the sprite H position is 0 this is a special mode. All the sprites on the same line with low priority will not be displayed.
Vertical Non-interlace
The sprite V position is between 0 and 511 but the display area is from 128 to 351 in V28 mode and 128 to 367 in V30 mode.
Vertical Interlace mode 2
The sprite V position is between 0 and 1024 but the display area is from 256 to 703 in V28 mode and 256 to 735 in V30 mode.
Attribute Table
The Sprite attribute table address is defined via the vdp register 0x5.
Each sprites require 4 words.
0 |
| ||||||||||||||||||||||||||||||||||
1 |
| ||||||||||||||||||||||||||||||||||
2 |
| ||||||||||||||||||||||||||||||||||
3 |
|
Size
16 different sprite size are selectable
The relationship between the tile id and the placement follow a top-left to bottom-right order.
V = 0 | V = 1 | V = 2 | V = 3 | |||||||||||||||||||||||||||||||||||||||||
H = 0 |
|
|
|
| ||||||||||||||||||||||||||||||||||||||||
H = 1 |
|
|
|
| ||||||||||||||||||||||||||||||||||||||||
H = 2 |
|
|
|
| ||||||||||||||||||||||||||||||||||||||||
H = 3 |
|
|
|
|
Link / Priority
Each sprites entry in the attribute table have a link property.
This indicated the sprites ID to draw next.
The VDP always starts by the sprites 0 and then follows the link data. The list must be closed by relinking to the sprites 0. (What happens if not ???)
Sprite 0 have priority 1, next one priority 2 etc ....