Home

VDP1 User`s Manual

image

Contents

1. 89 5 EEIE TE 6 scaled sprite draw 120 screen Modes 2 14 37 shadow color calculation 94 shadow MSB ON 97 single interlace 43 TI cone ehem e decree 72 Blcip calls menie e 72 NOX oeste etie dito en eres 72 eem rtr tere 72 specification of coordinates of two points scaled sprite draw command 120 specification of coordinates of two points scaled sprites 6 specification of zoom point scaled sprite draw command 122 specification of zoom point scaled sprites 7 Sprite ICs ified tito abes ra epe 2 subroutines jump call skip call 30 72 system clipping eese 11 system clipping coordinate set command 110 system controller sess 2 system registers 2 23 34 table referencing flow 2 31 tables VRAM 24 59 texture draw 109 textured parts sess eee 5 transfer end status register 52 transfer over 2 53 transparent color code sess 88 transparent pixel disable 88 ruleta s MNA EE RUE 45 TV mode selection
2. 118 NTSC system 9 2 amp 49 37 odd 43 order of priority frame 20 order of priority VRAM 19 original picture 2 4 94 outside drawing mode 84 115 P PAL syStem 9 37 C E R 89 mense ees 4 162 plot trigger 45 plot trigger mode register sss 45 point coordinate data sss 105 polling iei temen E 52 polygon draw command sss 126 polygons encre eher 0 24 10 polyline draw command 7 128 polylines e ees 11 pre clipping 83 last operation table address register 54 pseudo draw continuation sss 56 R read direction 77 read write access 19 referencing of tables sees 31 registers 34 replace 88 9889 esses 94 reset NAE n 23 91
3. 2 22 105 Chapter 7 Commands Table 7 _ 109 Chapter 8 Quick Reference Table 8 1 134 Table 8 2 Gouraud Shading Table sse 141 8 3 Legat exe uu ee e d vus 145 MD COUR 149 Table 8 5 Relationships between Settings and Drawn Pixels 149 Table 8 6 Correspondence between Commands 150 10 Chapter 1 Functions of the VDP1 Contents 11 Vh M EM 2 System Configuration sssssseeeennes 2 Functions of the 3 dao a HU LESE o du dish C 4 Textured Parts ecce nee egest gens 5 Non textured Parts etd 10 12 1 2 Screen Modes eR deemed aae EET eu 14 Screen Modes and Display Areas 14 Rotated Reading of Frame Buffer 15 VDP1 User s Manual 11 VDP1 VDP1 is sprite drawing IC for the SEGA SATURN because the VDP1 uses frame buffer it is much faster is characterized by an increased RAM capacity and can display many more sprites charact
4. 36 TV mode selection register 36 U user clipping see Sabe 113 user clipping coordinate set command 112 user clipping enable 222 84 user clipping mode sss 84 V blank erase write enable bit 36 VOPR 1 VDPI Functions 3 MDDP2 ILE EEUU 2 version number sss 57 vertex coordinate 105 vertical inversion 77 VRAM 2 19 Ww window MSB ON essen 97 word access VRAM sese 19 Z zoom point fixed point 880007 73 VDP1 User s Manual 163
5. 14 Chapter 2 Address Table 2 1 System ll 23 Table 2 2 Tables in VRAM 02 1 11 2 00 24 Chapter 4 System Registers Table 4 1 System Registers 040 02 4 1 0 0 000 34 Table 4 2 Screen 22 222 4 11 1 1 0000 khen 37 Table 4 3 a Example of Use of Frame Buffer Change Mode Fixed at VBE 0 41 Table 4 3 b Example of Use of Frame Buffer Change Mode VBE Is Used 42 Table 4 4 Number of Rasters and Number of 49 Table 4 5 Number of Pixels that Can Be Used in V Blank Erase in Non Interlace Display 50 Chapter 5 Tables Table 5 1 Size of Character Pattern Tables 60 Table 5 2 Gouraud Shading Table sse nnne nnne nns 64 Table 5 3 Relationship between Gouraud Shading Table Settings and Correction Values 65 Chapter 6 Command Tables Table 6 1 Commands ouo 71 Table 6 2 Pixel 92 Table 6 3 CMDCOLR REIS 98 Table 6 4 Example of Relationship of Defined Data and Draw Data to Color Bank 100 Table 6 5 Relationships between Settings and Drawn Pixels 104 Table 6 6 Correspondence between Commands and
6. There are two methods of judging termination of drawing one confirms the fetch status of the end bit with CEF polling and the other uses the interrupt signal When there is no draw end command in or when there is one and it is defined by the jump mode such that it cannot be fetched this bit remains 0 This bit is reset to 0 when the frame buffers are changed or when drawing is started f fetch of the draw terminate command matches when the frame buffer changes CEF and BEF might not become 1 52 Before End Bit Fetch Status BEF bit 0 This register indicates whether or not the end bit draw terminate command has been fetched from the command table in the previous frame When it is 0 it indi cates that the end bit has not been fetched when 1 it indicates that the end bit has been fetched and that drawing is terminated End bit fetch status O0 The end bit in previous frame has not been fetched The end bit in previous frame has been fetched and drawing is terminated VDP1 successively fetches the following command tables and draws them in the frame buffer When the draw terminate command when end bit is 1 is fetched the drawing of one frame is terminated If there are many commands or if there are many pixels to be drawn because of enlargement draw ing may not be terminated in one frame This is referred to as transfer over This bit indicates a transfer
7. 208 0 le drawn 1 02 le actually drawn Setting prohibited prohibited Setting 24 104 2 6 7 CMDXA CMDYD Vertex Coordinate Data The coordinates of clipping areas the point coordinates for drawing sprites and other coordinates are specified by CMDXA CMDYD The coordinates for a maxi mum of four vertex X coordinates Y coordinates can be specified They are defined in the 16 bytes 8 words from the top address 0CH to 1AH of the command table bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Vertex A X coordinates XA Vertex A Y coordinates YA Vertex B X coordinates XA or display X width XB Vertex B Y coordinates YA or display Y width YB Vertex C X coordinates XC Vertex C Y coordinates YC Vertex D X coordinates XD Vertex D Y coordinates YD Note The top bit of the vertex coordinates is a sign bit A negative value is indicated by a complement of two Extend the code with the upper 6 bits Each of the coordinates is specified CMDXA CMDYD with 16 bits A negative value is specified by a complement of 2 The range that can be specified is 1024 to 1023 The upper 5 bits are code extension bits and the same value as bit 10 is written to them The meaning of CMDXA CMDYD differs depending on the command Table 6 6 shows the correspondence between the commands and CMDXA CMDYD For more information refer to the section for each command in chapter 7
8. Color bank mode EE EE EA HA EL S Lookup table mode o ito 2 64 Colrbakmode 808 titi 3 1288 Colorbankmode 808 1 0 0 4 256 Colorbankmode 80 1 oti 5 32 768 RGBmode 1608 Setting prohibited do not set VDP1 User s Manual 147 Color Calculation Bits bits 2 0 Function 2 Gouraud shading enable bit 1 2 original graphic enable bit 1 2 background enable bit E 3 calculation Type of color Usable modes graphic Background ve c4 Not restricted ot restricted restricted RGB iurc crm MEL uM 0 Gouaudshadmg Notresiiciea i RGB PELLE EE Lr do not set 1 1 Gouraud Gouraud shading RGB Not restricted 1 1 1 Gouraud Gouraud shading Notes doesn t matter Original graphic sprite or pixel data to be plotted in non textured color Background pixel data already plotted in the frame buffer 1Original graphic transparent pixels end code is referenced 2Data that has undergone saturation processing after Gouraud calculation is reduced by half 3Background is added to data that has undergone saturation processing after Gouraud calculation is reduced by half MON Bit MSB on bit 15 Processing 0 MSB of pixel data frame buffer is not changed Sets MSB of pixel data in frame buffer to 1 148 5 CMDCOLR Color Control Word bt 15
9. Drawn parts processed first are the farthest from the view point and parts processed last are the closest to the view point VDP1 User s Manual 67 68 Page 68 is blank in the original Japanese document Chapter 6 Command Tables Contents 6 1 CMDCTRL Control Words sese 70 Commands 299 9ME 9e 71 Jump Mode 89 72 Zoom Point 73 Character Read Direction 77 6 2 CMDLINK Link 78 6 3 CMDPMOD Draw Mode 79 High Speed 81 Pre Clipping Disable 83 User Clipping Enable 2 84 User Clipping Mode 84 Mesh cene 85 End 0 86 Transparent Pixel Disable 88 Color Mode 89 22 css 93 MSB ON 97 6 4 CMDCOLR Color Control Word 98 Golor Banhk a iie at ia
10. 4 9 Mode Status Register The mode register MODR indicates the setting of the write only register It is a 16 bit read only register at address 100016H MODR bi 15 14 13 12 11 10 9 8 6 5 4 32 1 0 100016 VER JPTMIJEOSIDIEJDIL FCMIVBE TVM Read only Because the registers at addresses from 100000 to 10000 write only they cannot be read to confirm the settings The settings in write only registers can be confirmed by this register It is mainly used as help information during program development However because these values are the actual system register settings they may be different from the values taken in as internal signals Version Number VER bits 15 12 Indicates the version number of VDP1 The value is 1 0001B Plot trigger Mode PTM1 bit 8 Setting of bit 1 of the plot trigger register 100004H Even Odd Coordinate Select Bit EOS bit 7 Setting of bit 4 of the frame buffer change mode register FBCR 100002H Double Interlace Enable Bit DIE bit 6 Setting of bit 3 of the frame buffer change mode register FBCR 100002H Double Interlace Draw Line DIL bit 5 Setting of bit 2 of the frame buffer change mode register FBCR 100002H Frame Buffer Change Mode Bit FCM bit 4 Setting of bit 1 of the frame buffer change mode register FBCR 100002H VDP1 User s Manual 57 V Blank Erase Write Enable Bit VBE bit 3 Setting of bit 3 of the TV mode
11. 90 Figure 6 12 Example of Drawing in Modes 2 4 91 Figure 6 13 RGB Code Format sss nennen nennen 92 Figure 6 14 Example of Drawing in eren 92 Figure 6 15 Examples of Color Calculation sesssssee eene 96 Fig re 6 16 MSB QON c dictare eit Fata 97 Figure 6 17 Color Bank 7 99 Figure 6 18 Color Lookup Table ssssesesssssseseseeeeee enne nnnm nennen nens 101 Figure 6 19 CMDSIZE AC eL pennae be eet 104 Chapter 7 Commands Figure 7 1 System Clipping 440400400 0 nnns 111 Figure 7 2 User Clipping Settings essent 114 Figure 7 3 User 115 Chapter 8 Quick Reference Figure 8 1 Examples of Character Pattern 140 Figure 8 2 Color Lookup 140 Figure 8 3 Command Table 222022440 4000 5 0 0 142 List of Tables Chapter 1 Functions of the VDP1 Table 1 1 Classification 4 Table 1 2 Screen Modes Display Areas 2 041010 0 00
12. Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part The user clipping enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is speci fied Mesh is enabled end code is disabled and transparent pixel is disabled MSB ON is set to perform shade processing in the VDP2 The color mode that defines the character pattern is set The color bank is speci fied when the color mode is the color bank mode When the color mode is the lookup table mode the address of the color lookup table is defined by dividing by 8H Color calculation is specified Color calculation is enabled in the RGB mode When color calculation is not used replace is specified When Gouraud shading is used the address of the Gouraud shading table is specified by dividing by 8H Gouraud shading processing is enabled in the RGB mode The address of the character pattern table is defined in CMDSRCA by dividing by 8H The horizontal and vertical lengths of the character size defined in the character pattern table are defined A value divisible by 8 is defined for the horizontal size The upper left coordinates of the area to be drawn are defined as vertex A CMDXA CMDYA and the lower right coordinates are defined as vertex C CMDXC CMDYC Enlargement reduction and stretching are possible by the specification of ver
13. Vertex B Vertex B gt Vertex Draw Original Vertex N Graphic Vertex Vertex D Vertex D Rotated Distorted Nene Ke Vertex B Vertex B Vertex A Vertex A Vertex Vertex D Vertex C Vertex D Vertex C Vertex C Vertex D 1 Vertex Pulled Out 1 Vertex Pushed In Vertices Moved Vertex A Vertex C Vertex Vertex B Vertex C Vertex B Vertex D Twisted Figure 1 5 Distorted Sprites Anti aliasing Distorted sprites and polygons contain diagonal lines that may result in pixel drop out aliasing When this happens holes are anti aliased as shown below a Indicates direction of drawing Copied color code E Anti aliasing UR d4 d Figure 1 6 Anti aliasing VDP1 User s Manual 9 Non Textured Parts Non textured parts are different from textured parts in that they do not require an original picture and is not frequently accessed from the VDP1 Polygons Draw a quadrangle by specifying four vertices and filling the enclosed area with a single color The four vertices can be specified as desired The color is specified as a non textured color Polygons contain diagonal lines that may result in pixel dropout aliasing When this occurs holes are anti aliased For this reason some pixels may be written twice and therefore the results of half transparency processing as well as
14. When the end code is enabled ECD 0 it cannot be used for color display and therefore the number of colors that can be used is reduced by one Use caution Use end code disable ECD 1 in the case of sprites reduced in the horizontal direction by HSS 1 Ce pene ee end code is read and end code becomes transparent ee a color of code is expressed 1 amp End code enabled drawing in horizontal direction is disabled when second enlarge end code is read and end code becomes transparent 1 amp End code disabled end code is not processed reduce color of code is expressed 1 1 End code disabled end code is not processed color of code is expressed The relationship between the color mode and the end code is as follows The number of bits of the end code differs depending on the color mode O Color mode 0 16 colors color bank mode 64 colors color bank mode 256 colors color bank mode 86 An example of end code processing is shown below 0123456789 ABCDEF An area surrounded by a bold line is drawn 0123456789 ABCDEF p A t As with this line 2 drawing is not terminated when there are not two end codes in one line CORD Original character pattern Drawing with no inversion left to right NS SN joi cro SH NN NES AWN ALL 5 5 WS N 2 When there 222222 two end codes at either end of a line the line is not drawn S Drawing with horizo
15. 0o 0o Idle at frame change 0 1 Starts drawing when 01B is written 1 0 Starts drawing automatically with frame change Setting prohibited do not set When the plot trigger mode bits are rewritten from 01B to 00B drawing becomes valid from the next frame However when the plot trigger bits are rewritten from 00B or 10B to 01B drawing becomes valid at that point and drawing is started even if drawing is automatically started by 10B When the table is not rewritten the same drawing is performed and therefore the results of color calculation of half transparency change Use the following proce dure to change only the draw start mode without drawing 1 Change the plot trigger mode bits from 10B to 00 2 Change the plot trigger mode bits from 00B to 01B in the next frame VDP1 User s Manual 45 4 4 Erase Write Before rendering data into the frame buffer the VDP1 erases the contents of the frame buffer This erasure is referred to as erase write and it specifies the fill area to be erased and the fill data to be written to that area The three registers related to erase write are the erase write data register the erase write left coordinate register and the erase write right coordinate register Erase Write Data Register The erase write data register EWDR specifies the fill data during erase write It is a 16 bit write only register at address 100006H Its value becomes undefined after powering on or
16. 1E 1F 20H 20 21 26 27 Figure 8 1 Examples of Character Pattern Tables Color Lookup Table 00H 16 bit data color code of 02H 16 bit data color code of 1H 04H 16 bit data color code of 2H 1CH 16 bit data color code of EH 1EH 16 bit data color code of FH Figure 8 2 Color Lookup Table 140 Gouraud Shading Table Table 8 2 Gouraud Shading Table Table address Sprites polygons polylines Table top address Line start vertex Table top address 2 Table top address 4 Table top address 6 VDP1 User s Manual 141 8 3 Command Tables i 14 13 12 11 10 9 8 7 6 5 4 3 2 DCTRL 5 MB F A LINK specification 8H 0 dO qnan SH Color bank color lookup table 8H LSB is set to 00 non textured color DSRCA Character address 8H 08H Character size X 8 Character size Y DSIZE 0AH OCH Code extension Vertex A and X coordinate XA A YA B XB B YB XC C YC D XD D YD 15 1 0 0 DIA Code extension Vertex A and Y coordinate 0EH DXB 1 10H Code extension Vertex DYB 12H Code extension Vertex DXC 1 Code extension Vertex DYC i 16H Code extension Vertex DXD A 18H Code extension Vertex DYD AH Code extension Vertex DGRDA 1CH Gouraud Shading Table 8H 1EH Dummy Skipped during table fetch 20H Succeeding table 40H Succeeding table T 0 4 _ Note The top bit of the vert
17. CMDCTRL 1 eese 70 CMDGRDA iiim 106 CMDLINK o 78 CMDPMOD 4 79 CMDSIZE 188 104 CMDSRCCA e MA BG 103 CMDXA CMDYD 105 COLO en dM 12 color 99 color bank code esses 100 color calculation eese 93 color control 98 color lookup table 26 62 101 color 89 command 25 66 69 command table flow esses 30 71 109 control 70 coordinate set 109 soo Reime 2 current operation table address register 55 D disable end 2 86 disable pre clipping sss 88 VDP1 User s Manual disable transparent pixel 88 display device 2 display range 14 distorted sprite draw command 124 distorted sprites 2 8 DMA burst transfer 23 double 20 43 doub
18. Comm bits 3 0 Indicates the function of the command When the end bit is a terminate command command select is disabled 70 lt Commands are determined by the end bit END bit 15 of CMDCTRL and the command selection bit Comm bits 3 0 The commands set by the end bit and the command selection bit are shown in Table 6 1 The content of the command table in VRAM is determined by the command Table 6 1 Commands mem om 0 Textured draw Normal sprite draw command ofi command Scaled sprite draw command Draw Distorted sprite draw command 1 01 0 commands Non textured draw command EE O Register set Clipping coodinate coordinates E commands set commands Set command for system clipping coordinates 110 Local coordinate set command Bra oc command 777 000 All other codes Setting prohibited do not use VDP1 User s Manual 71 Jump Mode The jump mode specifies the command table to be processed next and how to jump to the table When the jump mode specifies the address and jumps to it the address of the command table prior to jumping is set to a CMDLINK top address 02H of command table 16 bits Jump Mode JP top address 00H of command table bits 14 12 Specifies the jump mode for jumping to the next command table to be processed When the jump mode is skipped bit 14 1 reading of the command table is termi nated there and
19. Inverted horizontall 1 0 Inverted verticall Inverted vertically and horizontall Original graphic Dir 00B Dir 01B Not inverted Inverted horizontally Dir 10B Dir 11B Inverted vertically Inverted vertically amp horizontally Figure 6 4 Character Read Direction VDP1 User s Manual 77 6 2 CMDLINK Link Specification CMDLINK specifies the address of the command table to be processed next when assign or call is specified in the jump mode The specification is made with the 16 bits at the top address 02H of the command table bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 MDLINK 0 0 E 02H Link specification 8H CMDLINK Top Address 02H of Command Table When the command table being processed is completed processing moves to the command table at the address of CMDLINK if the jump mode is set to assign and if it is set to call the command table at the CMDLINK address is called in a subroutine and processing moves to the next command table to be processed A value resulting from dividing the address in VRAM by 8H is specified with 16 bits as the address Because command tables are stored in boundaries of 20H 32 byte units the lower 2 bits of CMDLINK become 00H When the jump mode specifies the next table or specifies return to the main routine this CMDLINK is ignored 78 6 3 CMDPMOD Draw Mode Word CMDPMOD enables or disables clipping specifies mesh processing and the trans parent code specifies
20. Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part The user clipping enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is speci fied Mesh is enabled When mesh is enabled the entire sprite may not be drawn depending on the position and shape of the polyline e MSB ON is set to perform shade or window processing in the VDP2 The color mode is set to 000B The color code is set to non textured color CMDCOLR 128 e Color calculation is specified Color calculation is enabled when the non textured color is in the RGB mode When color calculation is not used replace is specified When Gouraud shading is used the address of the Gouraud shading table is specified by dividing by 8H Gouraud shading processing is enabled when the non textured color is in the RGB mode When half transparency processing is performed on polylines two lines overlap at each point As a result half transparency is applied twice thus causing original picture 3 4 background 1 4 When shadow processing is performed on polylines two lines overlap at each point As a result shadow is applied twice thus causing one half the luminance The upper left coordinates of the quadrangle to be drawn are defined as vertex A CMDXA CMDYA the upper right coordinates are defined as vertex B CMDXB CMDYB
21. Table 6 6 Correspondence between Commands and CMDXA CMDYD Command CMDXA CMDXB CMDXC CMDXD CMDYA CMDYB CMDYC CMDYD Normal sprite draw command Vetex A Scaled sprite draw for two points Vertex A command two methods Specify fixed point Zoom point Display width coordinates Distorted sprite draw command Polygon draw command Vertex A Vertex B Vertex C Vertex D Polyline draw command Vertex A Vertex B Vertex C Vertex D Linedraw command Vertex A VetexB _ coordinates coordinates System clipping coordinate set Lower right p command coordinates 7 7j E 5 Local coordinate set command Local coordinates Note indicates unused VDP1 User s Manual 105 6 8 CMDGRDA Gouraud Shading Table 1 Specifies the address of the Gouraud shading table 2 The Gouraud shading table address is valid when Gouraud shading processing is specified for color calculation and is specified with 16 bits at the top address 1CH of the command table bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CMDGRDA 41CH Gouraud shading table 8H 3 The address of the Gouraud shading table is divided by 8H and is specified with 16 bits 4 The Gouraud shading table is a table for Gouraud shading processing and it defines the amount of change in the luminances of and B at four vertices two points for lines The size of the table is 8H bytes 4 w
22. When there are 8 bits pixel frame buffer rotation or high resolution the lower 8 bits of the 16 bits are written to the frame buffer The upper 8 bits are ignored Because the draw pixel data is color bank code color calculation cannot be performed bt 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 00H 1 2022 t 3 4 02H 4 5 6 7 Mode 1 This mode is the lookup table mode which uses a color lookup table One pixel is represented by 4 bits 16 colors can be drawn The character data is the same as in mode 0 The data for 1 color of the 16 bit 16 colors stored in the color lookup table is selected with 4 bits and written to the frame buffer When there are 8 bits pixel frame buffer rotation or high resolution the lower 8 bits of the 16 bits are written to the frame buffer The address of the color lookup table is written to the lookup table address top address 06H of command table also used as color bank word Either color bank code or RGB code can be specified as the color code of the lookup table However RGB code is prohibited when there are 8 bits per pixel Original picture with 8 horizontal pixels 00H O 1 2 3 4 5 6 7 02H 04H gt 8 9 A BIC D E lt 06H Figure 6 11 Example of Drawing in Modes 0 and 1 90 Mode 2 Mode 3 Mode 4 Mode 2 mode 3 and mode 4 are respectively 64 color 128 color and 256 color palette bank modes Colors are represented by palette code and a color bank
23. is 0H ZP 0H 100 50 L 140 80 2 5 2 7 1 00 50 140 50 120 50 60 50 100 80 i 120 80 ZP AH 10 ZP BH 11 80 35 60 35 100 65 80 65 i 120 65 i 100 65 ZP DH 13 ZP EH 14 ZP FH 15 100 20 8020 120 20 60 20 100 20 100 50 140 50 120 50 60 50 100 50 Figure 6 3 Zoom Point and Drawing Area 76 Character Read Direction The read direction of the character can be specified This specification makes it possible to invert the character vertically and horizontally Character Read Direction Dir Bits Command table start address bits 5 4 These bits specify the read direction of the character pattern Vertical inversion horizontal inversion or simultaneous vertical and horizontal inversion can be speci fied When bit 5 is 0 the vertical Y direction is drawn as is without inversion When bit 5 is 1 the character pattern is inverted vertically When bit 4 is 0 the horizontal X axis is drawn as is without inversion When bit 4 is 1 then the character pattern is inverted horizontally When bits 4 and 5 are both 0 then the character pattern is drawn as is with no inversion When bits 4 and 5 are both 1 then the character pattern is inverted both vertically and horizontally Fix the character read direction to 00 for characters other than sprites Inversion processing o 0 __ Notinverted 0 1
24. lookup table is RGB code in color mode 1 and color mode 5 If not in the RGB mode characters in color bank mode the results cannot be guaranteed In color calculation of parts with an original graphic the transparent code is enabled when SPD 0 and the end code is enabled when ECD 0 therefore color calcula tion of that pixel cannot be performed When color calculation other than shadow is performed in the RGB mode color mode 5 and when SPD 1 the result for pixels with transparent color code 0000H of the original graphic cannot be guaranteed They are treated as black in color calculation When color calculation other than shadow is performed in the RGB mode color mode 5 and when ECD 1 the result for pixels with end code 7FFFH of the origi nal graphic cannot be guaranteed They are treated as white in color calculation In color calculation other than shadow on polygons polylines and lines non tex tured color is enabled only for RGB code Background MSB 0 Palettes etc MSB 1 RGB etc Color Calculation mode 1 Color Calculation mode 0 Color Calculation mode 2 Half Luminance Color Calculation mode 4 Color Calculation 6 Gouraud Half Luminance Replace Luminance Color Calculation mode 5 Setting Prohibited Color Calculation mode 7 ouraud Half Transparent Figure 6 15 Examples of Color Calculation 96 MSB ON MSB ON Bit MON bit 15 0 MSB of pixel dat
25. shadow half Iuminance and half transparent MSB On Bit MON bit 15 Looks at the MSB of the sprite data in the VDP2 and performs shadow or window processing This bit is assigned when this function is used Refer to the VDP2 manual for more information 80 High Speed Shrink High Speed Shrink HSS bit 12 Specifies whether speed or precision is given priority when scaled or distorted sprites are reduced and drawn This bit is only valid for drawing commands for scaled sprites and distorted sprites Set it to 0 for other drawing commands When this bit is set to 1 only the pixels at even or odd coordinates of the original picture data are sampled for lines to be reduced when drawn The selection of even coordinates or odd coordinates is performed by the even odd coordinate selection EOS bit of the frame buffer change mode register FBCR When 1 is specified the end code of the original picture is ignored regardless of whether the sprite is being enlarged or reduced When 0 is specified the original picture data is sampled at any magnification ratio irrespective of even or odd coordinates Specify 0 to give precedence to precision of drawing even though operation may be slowed down and specify 1 to give fast operation precedence over precision HSS 0 High speed shrink disabled High speed shrink enabled VDP1 User s Manual 81 82 Original Picture Drawing When HSS 0 X3 8 Zooming SS
26. the character pattern is inverted verti cally As with normal sprites inversion can be specified by the read direction However when the coordinates and the direction of readout are both inverted vertically the inversions cancel each other out and the character remains unchanged Vertex Vertex Draw Vertical horizontal Original Normal Vertex C reduction amp horizontal graphic inversion Vertex C Vertex A A B Horizontal enlargement vertical reduction amp Vertex A vertical inversion Vertical horizontal enlargement amp vertical horizontal inversion Figure 1 3 Scaled Sprites Two Vertices Specified Specification of Zoom Point Scaled sprites can be drawn by specifying the zoom point and display width The zoom point of the character pattern the draw coordinates of the zoom point and the display width at which the character pattern is drawn are specified The zoom point specifies which point on the character pattern is used as a stationary point for draw ing The point is selected from the left side center and right side in the horizontal direction and from the top side center and bottom side in the vertical direction The display width specifies the display width in the X direction and the Y direction When vertical and horizontal inversions are specified for the character pattern readout direction each character patter is drawn inverted vertically and horizontally with reference to each zoom po
27. the lower right coordinates are defined as vertex C CMDXC CMDYC and the lower left coordinates are defined as vertex D CMDXD CMDYD The relationships between the positions of the four vertices can be set as desired and therefore rotation and twist can be specified when drawing the character pattern by the specification of vertex A vertex B vertex C and vertex D When two vertices are set at the same coordinates a polygon is drawn as a tri angle When four vertices are set at the same coordinates the polygon is drawn as one pixel VDP1 User s Manual 129 7 9 Line Draw Command The line draw command draws quadrangles in the frame buffer The inside of the quadrangles is not filled When the end bit is 0B and the command selection bits are 0110B the line draw command is enabled The contents of the command table are shown below bit 15 14 13 1211109 87 654 321 0 CMDCTRL CMDLINK 99H CMDPMOD CMDCOLR ou 08H Vertex X coordinate CMDYA oS Vertex A Y coordinate YA T CMDXB Cede extension Vertex B X coordinate XB CMDYB Vertex B Y coordinate YB Frame buffer Link specification 8H 00 Color po o o o ejojow t 1 0 0 0 Siu Non textured color Line Vertex A Vertex B 12H 14H 16H 18H 1AH CMDGRDA Gouraud shading table 8H 1CH Note is ignored The line draw command is defined as follows
28. wasn eco seo coormode cnercabustonbis High Speed Shrink HSS bit 12 0 Highspeed shrink disabled High speed shrink enabled Pre clipping Disable Pclp bit 11 Processing Pre clipping with horizontal inversion No pre clipping and no horizontal inversion User Clipping Enable Bit Clip bit 10 Clipping Mode Bit Cmod bit 9 User clipping disabled Setting prohibited do not set Inside drawing mode Outside drawing mode Mesh Enable Bit Mesh bit 8 Mesh enable 0 Draw without mesh processing Draw with mesh processing 146 End Code Disable ECD bit 7 BASES E code enable drawing horizontally is disabled when second end code is read and end code becomes transparent End code disable end code is not processed color of code is expressed 1 amp End code enable drawing horizontally is disabled when second enlarge end code is read and end code becomes transparent 1 amp End code disable end code is not processed reduce color of code is expressed 1 1 Endcode disable end code is not processed color of code is expressed Transparent Pixel Disable SPD bit 6 End code processing Transparent pixel enable transparent color codes are not drawn transparent color codes become transparent Transparent pixel disable transparent color code is not 1 processed color of code is expressed Color Mode Bits bits 5 3 Colormode Description Number of Bits per 5 EENM colors Mode pixel
29. 1 cycle mode 60 frames second Double Interlace Enable DIE bit 3 Double Interlace Draw Line DIL bit 2 In single interlace the same picture is displayed in the even fields and the odd fields In double interlace however the vertical resolution is doubled by display ing different pictures each draws only even lines and odd lines respectively in the even fields and the odd fields Double interlace is enabled by DIE 1 The contents of the first screen displayed after changing DIE cannot be guaran teed In double interlace the fields are changed every 1 60 second and therefore FCM FCT 0 1 cycle mode is set Setting prohibited __ O Interlace mode Plot after next frame change Double interlace mode display Appears as 256 lines vertically Appears as 512 lines vertically The frame is changed every 1 60th of a Even and odd numbered lines are second and either the same picture is rendered into different frame buffers displayed two times or the frame is changed every 1 30th of a second a 1 60 sec signal is used and is specified from the CPU Figure 4 1 Single Interlace and Double Interlace Display VDP1 User s Manual 43 Even Odd Coordinate Select Bit EOS bit 4 e When 1 is specified for high speed shrink HSS with a scaled or distorted sprite this bit is enabled When HSS 1 is specified lines drawn with a magnifi cation ratio of less
30. 14 13 12 11 10 9 8 7 G6 5 4 3 2 1 0 CMDCOLR 06H Color bank color lookup table 8H LSB fixed at 00 non textured colors Table 8 4 CMDCOLR Part Color control word Textured part Color bank mode Color bank Lookup table mode Color lookup table address RGB mode Non textured part Non textured color CMDSRCA Character Address bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CMDSRCA 08H Character address 8H 0 0 CMDSIZE Character Size bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CMDSIZE 0 Character size X 8 Character size Y Table 8 5 Relationships between Settings and Drawn Pixels Setting in command Setting in command table actually drawn table actually drawn Setting prohibited _0 Setting prohibited 255 0 f 9 VDP1 User s Manual 149 CMDXA CMDYD Vertex Coordinate Data 3 2 1 0 CMDXA 40CH Code extension Vertex X coordinates XA CMDYA 40EH Code extension Vertex A Y coordinates YA CMDXB 410H Code extension Vertex B X coordinates XA or display X width XB CMDYB 12H Vertex B Y coordinates YA or display Y width YB CMDXC 414H Code extension Vertex C X coordinates XC CMDYC 416H Code extension Vertex C Y coordinates YC CMDXD 418H Code extension Vertex D X coordinates XD CMDYD 41AH Code extension Vertex D Y coordinates YD Note The top bit of the parameter is a sign bit A negative va
31. 2 Screen 14 Screen Modes and Display 14 Rotated Reading of Frame Buffer sss 15 CGhapter2 Address Map Aet 17 2 1 Address Map f eee nens 18 XVBAM M aetna ere etis 19 Erame BUNBE 4 ooo UOS Ute eoe etes 20 System 0 12200 ener nnne 23 2 2 TablesgigsV BAM 2 2 2 02 0 0 in 24 Gommandaable 20344 4 2242 25 Ro LOOKUP Table cretus 26 Gouraud Shading Table sse 26 Character Pattern Table 26 Chapter 3 Processing Flow 24 4 0040 27 3 1 Draw rocedure FOW netta ehe vehi metu 28 3 2 Command Table Flow esses nnn nnns 30 3 3 Table Referencing e ar Eea E 31 Chapter 4 5 6 System Registers eese 33 4 1 TV Mode Selection Register ssssssssseeeeeeneeeen nennen 36 4 2 Frame Buffer Change Mode Register sse 38 4 3 Plot Trigger Register 22 101 2 45 4 4 c NF 46 Erase Write Data Register 2 22 22 46 Erase Write Upper Left Coo
32. 3 Local Coordinate Set 116 Local 117 7 4 Normal Sprite Draw Command 4000 118 7 5 Scaled Sprite Draw Command sse 120 Specification of Two Coordinate Vertices 120 Specification of Fixed Point Scaled Sprite Draw Command 122 7 6 Distorted Sprite Draw Command sse 124 7 7 Polygon Draw 126 7 8 Polyline Draw 128 7 9 Line Draw Command 130 7 10 Draw End 132 Chapters Quick Reference isi o edet o preneur dea e o ei aes 133 8 1 134 8 2 Tables NI E 140 8 3 pommanpd Tales 2 2 t reete t 142 8 4 eu do A 151 Chapter 9 Precautions for Use 1 157 Index cara ATL TNT 161 List of Figures Chapter 1 Functions of the VDP1 Figure 1 1 System Configuration seesssssssssssssesee esent 2 Figure 1 2 Normal entente nhe nennen 5 Figure 1 3 Scaled Sprites
33. 5 comen Sion CMDCOLR 06H Color bank lookup table 8H LSB fixed at 00 CMDSRCA 08H CMDSIZE 0AH 0 O Charactersize X 8 Character size Y CMDXA 0CH Vertex A X coordinate XA CMDYA 0EH Vertex A Y coordinate YA 10H 12H CMDXC 14H Vertex C X coordinate XC CMDYC 16H Vertex C Y coordinate YC 18H 1AH CMDGRDA 41CH Gouraud shading table 8H Scaled sprite Vertex A Vertex D Frame buffer Note is ignored Specification of coordinates for two points by the scaled sprite draw command is defined as follows When the end bit is set to and the command selection bits are set to 0001B the scaled sprite draw command is enabled Thejump mode is then specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK The zoom point is set to 0000B The coordinates for two points are specified 120 The read direction of the character pattern is set character pattern can be drawn with vertical or horizontal inversion by the specification of the read direc tion When inversion is specified twice by the read direction and by the specifica tion of vertex A CMDXA CMDYA and vertex C CMDXC CMDYC the inversions cancel each other out and the direction returns to the original direc tion Set high speed shrink Specify priority to precision or to speed
34. Because access is performed after assigning an order of priority there may be more than 10 wait cycles according to that timing depending on the operating clock of the CPU The operating clock of the CPU is 28 MHz Perform access from the CPU when drawing is not being performed in order to prevent interruption of drawing To determine if drawing is being performed poll the system registers or use an interrupt signal Access of the VRAM and frame buffer is performed in a short period of time using burst transfer VDP1 User s Manual 19 Frame Buffer The frame buffer comprises two 2 Mbit DRAM and is divided into two screens a display frame buffer and a draw frame buffer The function of the two buffers is changed immediately before the screen display period DISP After powering on or resetting frame buffer 0 becomes the draw ing frame buffer and frame buffer 1 becomes the display frame buffer Read write access of the frame buffer by the system controller IC is performed only on the draw frame buffer The display frame buffer becomes the rear bank so it cannot be accessed Drawing is performed in sync with the CPU operating clock The CPU operating clock is 28 MHz and the data for 1 pixel is drawn in sync with this Read write access of the frame buffer by the system controller IC and draw access by the VDP1 are performed after assigning an order of priority The order of priority of access of the frame buffer is always system control
35. Note J is ignored MON HS HSS Pc d Clip Cmod Me Mesh EC CD and SP SP The normal sprite draw command is defined as follows e When the end bit is set to and the command selection bits are set to 0000B the normal sprite draw command is enabled The jump mode is then specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK The read direction of the character pattern is set The character pattern can be drawn with vertical or horizontal inversion by the specification of the read direc tion Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part 118 The user clipping enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is speci fied Mesh is enabled end code is disabled and transparent pixel is disabled MSB ON is set to perform shade processing in the VDP2 The color mode that defines the character pattern is set Color bank is specified when the color mode is the color bank mode When the color mode is the lookup table mode the address of the color lookup table is defined by dividing by 8H Color calculation is specified Color calculation is enabled in the RGB mode When color calculation is not used replace is specified When Gouraud shading is us
36. Set it to 0 for other commands Processing 0 Pre clipping with horizontal inversion No pre clipping and no horizontal inversion achieved in cases with many lines such as these when Pclp 0 When Pclp 1 drawing can be started from outside the Drawing area drawing area When most of the picture is inside the drawing area as shown here greater efficiency is achieved when Pclp 1 Figure 6 6 Pre clipping VDP1 User s Manual 83 User Clipping Enable User Clipping Enable Bit Clip bit 10 This bit specifies whether or not the part is drawn according to the already set user clipping coordinates when the command is a draw command for a part When the bit is 0 the user clipping coordinates are ignored and the part is clipped and drawn according to the system clipping coordinates When the bit is 1 the part is clipped and drawn according to the user clipping coordinates and the specifi cation of the clipping mode bit Cmod Even when this bit is 1 the part is clipped according to the system clipping coordinates Both the user and system clipping coordinates become undefined after resetting Therefore the clipping register set command must be used to set the system clipping coordinates after resetting and to set the user clipping coordinates prior to the user clipping specification User Clipping Mode Clipping Mode Bit Cmod bit 9 Specifies whether drawing is performed inside or outside th
37. The upper left coordinates are fixed at 0 0 The lines of the rectangle quad rangle represented by the upper left coordinates 0 0 and the lower right coordi nates XC YC and inside the rectangle make up the drawing area 110 System Clipping System clipping coordinates are always valid when drawing so that outside the set area is clipped that is the area inside the coordinates is drawn Clipping processing is performed in a rectangle The coordinates are specified by defining the values of the lower right coordinates XC YC in the command table since the upper left coordinates are fixed at 0 0 Because the clipping coordinates are not checked they should be set in advance so that XC 2 0 and gt 0 Operation cannot be ensured if XC 0 or 0 Points on the clipping line are treated as being inside the clipping area and are drawn The clipping coordinate set command rewrites the internal clipping coordinate register Parts subsequent to rewriting are drawn by referencing those values Because this command can be defined in any number in one frame it is possible to give part groups different clipping coordinates The system clipping coordinates become undefined after powering on or after resetting and therefore they must be set before drawing starts a System clipping setting 0 0 System clipping area Inside the area is displayed Ll di lower right coordinate C b Incorrec
38. Vertex CMDYD AH Code extension Vertex D Y coordinate YD CMDGRDA 41CH Gouraud shading table 8H Note is ignored 154 Polyline Draw Command bit 15 14 1312 110 98 765432 10 CMDCTRL ane Polyline 402 Link specification 8 4 0 0 CMPPMOP o vo 0 0 e 1 00 Of Bison CMDCOLR Non textured color CMDXA Vertex A X coordinate XA CMDYA Vertex A Y coordinate YA CMDXB Vertex B X coordinate XB CMDYB Vertex B Y coordinate YB Frame buffer CMDXC CMDYC Vertex C X coordinate XC CMDXD Vertex C Y coordinate YC Vertex D X coordinate XD CMDYD CMDGRDA NOTE is ignored Line Draw Command bit 1514 131211109 87 654 3 210 CMDCTRL oou P 0 CMDLINK 9514 Link specification 8H 00 CMDPMOD MLO 0 o 1 1 0 Elie CMDCOLR 06H Non textured color 08H OAH CMDXA Vertex A X coordinate XA CMDYA oci Vertex A Y coordinate YA CMDXB CMDYB i Code extension Vertex B Y coordinate YB T 14 16 18H AH 1 Gouraud shading table 8H Note is ignored Frame buffer VDP1 User s Manual 155 Draw End Command bit 1514 131211109 876 54 3210 CMDCTRL 11 02H 04H 06H 08H 0AH 0CH 0EH 10H 12H 14H 16H 18H 1AH 1CH Note a
39. When the end bit is set to and the command selection bits are set to 0110B the line draw command is enabled e The jump mode is then specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part The user clipping enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is specified Mesh is enabled When mesh is enabled the entire sprite may not be drawn de pending on the position and shape of the line e MSB ON is set to perform shade or window processing in the VDP2 The color mode is set to 000B The color code is set to non textured color CMDCOLR 130 e Color calculation is specified Color calculation is enabled when the non textured color is in the RGB mode When color calculation is not used replace is specified When Gouraud shading is used the address of the Gouraud shading table is specified by dividing by 8H Gouraud shading processing is enabled when the non textured color is in the RGB mode Only vertex A and vertex B in the Gouraud shading table are enabled vertex C and vertex D are ignored Vertex A of the line to be drawn is defined in CMDXA CMDYA and vertex B is defined in CMDXB CMDYB When the two vertice
40. When the length in the Y direction is an even value the zoom point will not be exactly in the center When the length is an even number the coordinates for the left side right side top and bottom are calculated from point A and the display width and therefore the position of the zoom point may shift The direction of drawing of the character is specified by the read direction of the character A negative value cannot be specified for the display width Drawing cannot be guaranteed when a negative value is specified for the display width Zoom Point Specification When ZP is other than 0H the zoom point coordinates are specified by CMDXA and CMDYA and the display width is specified by CMDXB and CMDYB 5 4 3 2 1 0 CMDXA 0 Code extension Zoom point X coordinate XA CMDYA 40EH Code extension Zoom point Y coordinate YA X width XB Y width YB bit 15 14 13 12 11 10 9 8 7 6 CMDXB 410H Code extension Display X width CMDYB 412H Code extension Display Y width Specification of Coordinates for Two Points When ZP is 0H coordinates for the upper left and coordinates for the lower right can be specified Vertex A is specified by CMDXA and CMDYA and vertex C is specified by CMDXC and CMDYC bit 15 14 13 12 11 10 9 8 7 5 4 6 3 2 1 0 CMDXA 0CH Code extension Vertex A X coordinate XA CMDYA CMDXC 414H Code extension Vertex C X coordinate XC CMDYC 416H Code extension Vertex C Y coo
41. XB gt T H CMDYB don Code extension Display Y width YB Display Width XB T 14H 16H 18H 1AH CMDGRDA Gouraud shading table 8H 1CH Note E is ignored Frame buffer VDP1 User s Manual 153 Distorted Sprite Draw Command bit 15 14 131211 1098 7 65 4 3 2 1 0 2 Jooo ooo moor Link specification 8H 0 0 cupeMop 1900 0 nos 04H Color bank lookup table 8H LSB fixed at 00 CMDCOLR 06H Character address 8H 00 CMDSRCA CMDSIZE OB 00 Character size X 8 Character size Y Chipra Vertex A X coordinate XA 0CH Vertex A Y coordinate YA CMDYA CMDXB M Vertex B X coordinate XB CMDYB is Vertex B Y coordinate YB Frame buffer CMDXC Vertex C X coordinate XC 14H Vertex C Y coordinate YC CMDYC 6H Vertex D X coordinate XD CMDYD ae Vertex D Y coordinate YD CMDGRDA m Gouraud shading table 8H Note 5 is ignored Distorted sprite Polygon Draw Command bit 1514 13 12 1110 9 8 76 54 3210 o e o v CMDLINK 02H Link specification 8H 00 CMDPMOD o4H vo 0 1 1 0 0 0 CM DCOLR peu Non textured color Polygon Filed with non textured color Vertex D 08H 0AH CMDXA Code extension Vertex A X coordinate XA Vertex A Y coordinate YA CMDYB 151 Vertex B Y coordinate YB di
42. buffer is left as is When the MSB of the frame buffer is 1 shadow is performed In shadow pixel data already written to the frame buffer is subjected to color calcu lation The area in the frame buffer on which color calculation is to be performed is sought from the character pattern and its draw coordinates in the case of sprites and from the draw coordinates in the case of non textures The luminance of pixel data already written in the frame buffer in the area where the part is to be drawn becomes one half for each of R G and B Shadow does not change the MSB of the background Transparent areas remain transparent 94 Shadow halves the luminance of pixels the frame buffer To make the luminance one fourth set the same command table in VRAM twice To make it one eighth set the same command table in VRAM three times In shadow calculation is performed on the pixel data read from the coordinates to which the pixel data of the original graphic is written Drawing in this case slows down so use caution It takes six times longer than when color calculation is not performed Half Luminance Color Calculation Mode 2 Half luminance halves the luminance of each of and B of the pixel data of the part to be drawn Pixel data already written to the frame buffer is not affected Half Transparency Color Calculation Mode z 3 Processing differs depending on the MSB of the frame buffer When the MSB is 0 replace
43. color When all of R G and B are 00H the value is 8000H which repre sents black when all are 1FH the value is FFFFH which represents white RGB codes are written in their original 16 bit form to the frame buffer When there are 8 bits pixel frame buffer rotation or high resolution this mode cannot be used Color calculation can be performed on RGB code VDP1 User s Manual 91 bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 00H PPixelO upperbyt 7 PixelO lowerbyt 02H 04 2 upper byte 7 lowerrbyte 06H S upper byte 3 lowerbyte 08H 4 7 4 lwerbye 0AH 5 7 5 lwerbye 2 0CH 1 S upperbye 6 lowerbyte 0 Note MSB is 1 Figure 6 13 RGB Code Format Table 6 2 Pixel Data Pixel data 0000H Transparent color code 0001H Setting prohibited Do not set in RGB mode 7FFEH Palette bank code 7FFFH 92 8000H RGB code FFFFH Original picture with 8 horizontal pixels 1 213 415 617 lt 0EH 8 9 lt 1EH Figure 6 14 Example of Drawing in Mode 5 LAW A Color Calculation Color Calculation Bits bits 2 0 These bits specify Gouraud shading shadow half Iuminance and half transparency The functions of each of the bits are as follows Bt Function o Gouraud shading enable bit 1 2 original graphic enable bit O 1 2 background enable bit Colo
44. coordinates are the upper left coordi nates XA YA and the lower right coordinates XC YC and they are specified by defining the values of the coordinates of these two points in the command table Because the clipping coordinates are not checked they must be set in advance so that XA XC and YA x YC Operation cannot be guaranteed if XC XA or YC YA Set the user clipping coordinates inside the set area including on line of the system clipping coordinates Operation cannot be guaranteed when the user clipping coor dinates are set beyond the set area of the system clipping coordinates Points on the clipping line are treated as being inside the clipping area They are drawn in the inside drawing mode and not drawn in the outside drawing mode Two or more user clipping commands can be set in the same frame The clipping coordinate set commands rewrite the internal clipping coordinate registers Parts subsequent to rewriting are drawn by referring to these values Because the user clipping coordinates become undefined after powering on or after resetting they must be set before drawing starts VDP1 User s Manual 113 114 a User clipping setting upper left coordinate A User clipping area Set so that XA x XC YA lt YC lower right coordinate C TV System clipping area b Incorrect user clipping setting lower right coordinate User clipping area Operation cannot be ensured if XC lt XA or YC
45. during erase write word demands ee inom tame eee 100010H word frame Command Address 100012H word table for previous frame Current Operation ud Er Read only Address of last accessed command Command Address 100014H word table being processed Mode status MODR 100016H Read only Displays setting of write only register word 34 System Register Settings Switch Timing The timing with which the system register settings become valid is as follows Settings that change immediately Plot trigger mode PTM when 01B is written TV mode selection TVM Settings that change with each field 1 60 second Frame buffer change mode FCM Frame buffer change trigger FCT Settings that change with the switching of the frame buffer Plot trigger mode PTM when 00B or 10B is written Even odd coordinate selection bit EOS Double density interlace enable DIE Double density interlace draw line DIL Erase write data Erase write coordinates upper left lower right Changes following the termination of display of one line after the V blank IN interrupt Enables V blank erase write VBE VDP1 User s Manual 35 41 TV Mode Selection Register The TV mode selection register TVMR TV mode register enables V blank erase and specifies the TV display mode It is a 16 bit write only register and is at address 100000H Its value becomes undefined after powering on or resetti
46. interrupt after the V blank OUT interrupt until the next H blank IN interrupt o 0 t cydemode Change every 1 60 Oo 0 1 5 O Oo 1 0 Manualmode erase Eraseinnextfield 0 1 1 Manual mode change Changeinnextfield tgs ee ERR Se 1 0 Setting prohibited 1 Manual mode erase Erase V blank and change in next field 38 1 Mode This is the normal mode One frame changes automatically every 1 60 second Set the value of the VBE and FCT bits to 0 Erase Manual Mode Erase write for one frame is controlled from the CPU Manual erase write of the frame buffer is specified by writing 0 to the VBE FCM and FCT registers Erase write of the display frame buffer is performed in the next specified field and the display frame buffer is cleared Changing of the drawing and display frame buffers is not performed Because the display frame buffer is cleared when erase is performed it is necessary to specify change in the next field when display is performed for which erase is specified and to perform change of drawing and display This mode is used when there are two or more fields in one frame as in double interlace Also when changing from manual mode to the 1 cycle mode this erase is used in the field before changing Erase is used when it is known that fr
47. is ignored 156 VDP1 User s Manual Chapter 9 Precautions for Use 157 VDP Syst 1 Rotated reading of the frame buffer is prohibited during normal high resolu tion HDTV and double interlace The CPU can only access the draw frame buffer em Registers DMA access of the system registers is prohibited Word access must be used Be sure to set the system registers after powering on Be sure to set bits not used in the system registers to 0 Be sure to set DIE to 0 for rotated reading of the frame buffer Rotated read ing is prohibited in double interlace An undefined screen is displayed in the first frame after changing the DIE bit SO use caution When changing the TVM bit the frame buffer must be masked An undefined screen is displayed for one frame during the change Set FCM and FCT to 0 during double interlace The fields can only be changed when they are 1 60 second Set the erase write areas so that upper left coordinate XA is less than lower right coordinate XC and upper left coordinate YA is less than or equal to lower right coordinate YC Commands Local coordinates must be set after powering on The clipping coordinate setting range is from 0 0 to 1023 511 In the clipping coordinate range upper left coordinate XA is less than lower right coordinate XC and upper left coordinate YA is less than or equal to lower right coordinate YC Set suitabl
48. line is an odd coordinate nothing is drawn Nothing is drawn in some cases when the point of a 45 polyline is an odd coordinate drawn m drawn 0 1 2 3 4 5 6 7 8 9 A B C D E F not drawn a drawn This line is not drawn This polyline is not drawn lm O Q O Figure 6 9 Mesh Processing of Lines and Polylines VDP1 User s Manual 85 End Code Disable End Code Disable ECD bit 7 This bit specifies whether or not the end code of the character pattern is disabled When it is 0 the end code is enabled when it is 1 the end code is disabled The end code disable bit is only valid for drawing sprites with a character pattern Set this bit to 1 for polygons polylines and lines If a second end code is read in the horizontal direction during drawing of a character pattern when end code is enabled ECD 0 drawing of that row is terminated there and drawing moves to the head of the next row End codes are not drawn and that pixel becomes transparent When the end code is disabled ECD 1 the end code is processed in the same way as other color codes Drawing in the horizontal direction is terminated when an end code is read twice and an end code is only processed in the horizontal direction of the character pattern and is not affected by the vertical direction Processing is performed irrespective of the transparent pixel disable bit SPD
49. lines The resolution in single interlace and non interlace are the same and the method of writing to the frame buffer is the same n31KC and HDTV the same color is displayed in 4 pixel units 2 vertical pixels and 2 horizontal pixels That is the resolution is the same as 320 x 240 31KC and 352 x 240 HDTV in the standard mode and the method of writing to the frame buffer is the same For information about how to set the interlace refer to the VDP2 manual Notes Field time it takes the scanning lines to scan one screen 1 60 second Frame The time period during which one image is displayed If interlaced two fields make one frame 1 30 second 14 Rotated Reading of Frame Buffer By reading the frame buffer diagonally the entire frame buffer plane can be dis played rotated Display coordinates that exceed the frame buffer address range are handled as transparent XX00H for 8 bit graphics and 0000H for 16 bit graphics Even if rotated reading of the frame buffer is performed the clipping area and erase write area remain fixed with respect to the frame buffer plane Therefore the clipping area and erase write area become inclined with respect to the display screen To prevent dropout of any of the display screen when the frame buffer is dis played rotated the coordinate range of the frame buffer must be made large In this case the frame buffer is set to 8 bits pixel and the screen to 512 x 512 rath
50. oen 1 0 0 commands Non texture KIEA ca BEKA commands aa VDP1 User s Manual 109 71 System Clipping Coordinate Set Command Clipping is the removal of graphics outside the set display area so that they are not drawn Clipping includes system clipping which sets the drawing area for the system and user clipping which makes it possible to freely set the clipping area using software When the command select bits bits 3 to 0 are 1001B the system clipping coordinate set command is set when they are 1000B the user clipping coordinate set command is set The contents of the system clipping coordinate set command table are shown in the following figure bit 1514131211109 8 76 5 4 32 1 0 CMDCTRL o JP 0000000 0 1001 CMDLINK Link specification 8H 04H Lower right Coordinate System clipping area alo 00000 Upper left coordinates are fixed at 0 0 16 0 0 0 0 0 0 Of Lower right Y coordinate Note is ignored The system clipping coordinate set command is defined as follows When the end bit bit 15 is set to OB and the command select bits are set to 1001B the system clipping coordinate set command is enabled The jump mode is specified When the jump mode is assigned or called the ad dress of the command table to be processed next is divided by 8H and is set in CMDLINK The lower right coordinates of the clipping area are defined by CMDXC CMDYC
51. of the color bank method is 16 64 128 or 256 colors and the RGB code method is 32 768 colors Color Bank Method The color bank method combines the color bank with the palette codes for 16 64 128 and 256 colors and references the colors stored in the color RAM of the VDP2 A 16 color palette code requires four bits of memory The upper 12 bits of the color bank is added to the palette to give a total of 16 bits which is written to the frame buffer Graphics that use 64 128 or 256 colors 8 bit graphics require a total of eight bits of memory Only the lower 6 bits and 7 bits are significant for 64 and 128 color graphics respectively while 256 colors use all 8 bits The upper 10 9 and 8 bits of the color bank are added The data written by the color bank method are divided into function bits as shown in Figure 1 10 and processed in the VDP2 Refer to the VDP2 manual for more information MSB LSB Priority Color calculation Figure 1 10 Bit Configuration of Color Bank Method RGB Code Method The RGB code method represents colors using a 5 bit luminance for each of red green and blue RGB dot The luminance of each of RGB is represented by 00H to 1FH The closer the number is to 00H less light is emitted from the RGB dots the closer it is to more light is emitted Up to 32 768 colors can be formed by RGB codes RGB codes are 16 bit data and the most significant bit MSB is 1 12 Part Colors The colo
52. other color calculations cannot be guaranteed Concave polygons can also be drawn However fills may extend outside of the polygon since lines are used to fill the polygon Vertex D Vertex Concave polygon Vertex D Vertex C Figure 1 7 Polygons 10 Polylines A quadrangle is drawn by connecting four lines Specify four vertices and lines connecting the vertices are drawn in order Unlike polygons the area enclosed by the four vertices cannot be filled The four vertices can be specified as desired Specify the color as non textured color Because four lines are drawn the pixels near the vertices are written twice Therefore the results of half transparent processing and other color calculations cannot be guaranteed Vertex B Vertex Vertex C Vertex D Figure 1 8 Polylines Lines A line is drawn in a single color between two specified coordinates Specify the color as a non textured color Vertex A Vertex B Figure 1 9 Line VDP1 User s Manual 11 Color The functions and special functions related to color are as follows The number of colors per textured part unit is 16 64 128 256 and 32 768 nthe RGB mode color calculation of half Iuminance half transparency Gouraud shading and shadowing is possible e Mesh tiling The color bank and RGB code methods are used to express the colors of pixels drawn written in the frame buffer The color capability
53. selection register TVHR 100000 TV Mode Selection Bits TVM bit 2 0 Setting of bits 2 through 0 of the TV mode selection register TVHR 100000H 58 Contents 5 1 Character Pattern Tables 5 2 Color Lookup Tables 5 3 Gouraud Shading Table 5 4 Command Tables VDP1 User s Manual Chapter 5 Tables 59 5 1 Character Pattern Tables A character pattern is data that becomes the basis for a sprite drawn by a texture draw command Define character patterns continuously to VRAM as tables The stored data are referenced at the character address of the command table and the data size is deter mined by the size of the character pattern and the color mode of the sprite Character Pattern Table Addresses Define character pattern boundaries with a 20H 32 byte boundary However character patterns starting from address 00000H in VRAM cannot be defined Char acter patterns are stored in a 20H byte boundary so that part of the 20H bytes not filled becomes free space The address of is 7FFFFH Do not define character patterns beyond address 80000H Table Size Depending on the color mode 1 pixel of the character pattern becomes 4 8 or 16 bit data The character size can be specified from 8 pixels to 504 pixels horizontally in 8 pixel units and from 1 pixel to 255 pixels vertically in 1 pixel units For example in order to represent a character pattern 8 horizontal pixels by 3 verti cal pixels 12 byt
54. shading table is specified by dividing by 8H Gouraud shading processing is enabled in the RGB mode The address of the character pattern table is defined in CMDSRCA by dividing by 8H The horizontal and vertical lengths of the character size defined in the character pattern table are defined in CMDSIZE A value divisible by 8 is defined for the horizontal size The coordinates of the zoom point of the character to be drawn are set at zoom point coordinates CMDXA CMDYA The display width is defined in CMDXB CMDYB The character pattern can be drawn enlarged reduced or stretched by specifying the display width e When the value of CMDXB CMDYB is set to 0 0 the sprite is drawn as one pixel VDP1 User s Manual 123 7 6 Distorted Sprite Draw Command The distorted sprite draw command draws character patterns in the frame buffer Character patterns can be drawn at specified coordinates inverted vertically and or horizontally enlarged or reduced stretched rotated or twisted When the end bit is and the command selection bits are 0010B the distorted sprite draw command is enabled The contents of the command table are shown in the following figure bit 1514 131211109 87 65 4 3 21 0 CMDCTRL gu OL P 00000 of Drjo 0 1 0 Link specification 8H 0 0 CMDLINK eLo ofS re oon se T CMDCOLR Color bank lookup table 8H LSB fixed at 00 06H CMDSRCA Character address 8H 00 00 Char
55. sioe po eite emite 37 high speed shrink oec ce 81 horizontal inversion 77 161 1 inside drawing mode 84 115 interlace a seeker 43 interrupt signal esses 52 inversion horizontal vertical 77 J JUMP assibus 72 jump call sse 72 jump mode sse 72 72 JUMP 72 L line draw command ss 130 Viti S eere teet Tee HN 11 LINK specification 22 2 78 local coordinate set command 116 local coordinates 22 117 lookup table mode 89 luminance Gouraud shading 64 luminance RGB esee 91 M manual mode 39 mesh enable 85 mode 0 color mode sss 90 mode 1 color mode sss 90 mode 2 color mode sss 91 mode 3 color mode sss 91 mode 4 color 91 mode 5 color mode sss 91 mode status register s sss 57 iet 97 non textured 13 102 non textured 10 non textured draw commands 109 normal sprite 0 5 normal sprite draw command
56. sprites cannot be rotated 90 Specify the distorted sprite draw command to perform 90 rotation Vertex A Vertex lg A Original Draw Normal Horizontal graphic inversion Vertex A Vertex eg y Vertical Vertical amp inversion horizontal inversion Figure 1 2 Normal Sprites VDP1 User s Manual 5 Scaled Sprites The character pattern is drawn enlarged or reduced at a specified position There are two methods by which the position and scaling can be specified The coordinates of the upper left vertex and the lower right vertex are specified in one method while the zoom point coordinates and the horizontal and vertical display widths are speci fied in another Scaled sprites cannot be rotated 90 Specify the distorted sprite draw command to perform 90 rotation Specification of Coordinates of Two Vertices In this method the coordinates of the upper left and the lower right vertices are specified The draw direction direction of drawing a character is determined by the positional relationship of the lower right coordinate with respect to the upper left coordinate The character pattern is drawn from the upper left coordinate toward the lower right coordinate When the value of X of the lower right coordinate is smaller than the X value of the upper left coordinate the character pattern is in verted horizontally and when the Y value of the lower right coordinate is smaller than the Y value of the upper left coordinate
57. the color mode and controls color calculation and shade processing It occupies the 2 bytes from the top address 04H of the command table and its bit configuration is as follows Set unused bits to 0 bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 High Speed Shrink HSS bit 12 Specifies whether speed or precision is given priority when scaled or distorted sprites are reduced and drawn Pre clipping Disable Pclp bit 11 Specifies whether coordinate calculation which judges whether clipping is required or not is disabled or not Clipping Mode Bit Clip bit 10 Specifies whether or not the part is drawn according to the user clipping coordinates already set in the case of a part draw command User Clipping Enable Bit Cmod bit 9 Specifies whether clipping is performed inside or outside the user clipping coordi nates when user clipping is enabled Clip 1 Mesh Enable Bit Mesh bit 8 Specifies whether or not mesh processing is performed in the case of a part draw command End Code Disable ECD bit 7 Specifies whether or not the end code of the character pattern is disabled Transparent Pixel Disable SPD bit 6 Specifies whether or not the transparent pixel of the character pattern is disabled Color Mode Bits bits 5 3 Specifies the number of colors in which the sprite is drawn and how they are ex pressed VDP1 User s Manual 79 Color Calculation Bits bits 2 0 Specifies color calculation of Gouraud shading
58. the size of the characters and the color mode Its boundary is 20H 32 Bytes The table is referenced according to the instruction at the character address of the texture draw command 26 VDP1 User s Manual Chapter 3 Processing Contents 3 1 Draw Procedure Flow 3 2 Command Table Flow 3 3 Table Referencing Flow 27 3 4 Draw Procedure Flow Draw procedure flow using the VDP1 is as follows Step 1 Power on the system Step 2 Set the necessary values in the system registers of the VDP1 Step 3 Write the necessary character pattern table to VRAM Step 4 Write the necessary color lookup table to VRAM Step 5 Write the necessary Gouraud shading table to Step 6 Write the necessary command table to VRAM Step 7 Drawing to the frame buffer starts automatically at the start of frame change and the drawn frame buffer is displayed in the next frame change Step 8 Repeat steps 3 through 6 as required 28 Table Access The procedure VDP1 uses to access the table in and draw is as follows Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9 Controls drawing and display according to the instructions set in the system registers Fetches the command table at the top address of VRAM The fetched command table 1 Terminates drawing in the case of a draw end command goes to step 9 2 Isignored when jump mode is skipped reading of the t
59. this area S 3 becomes 1 Since it becomes 1 whether or not it is already drawn the address becomes 0000H gt 8000 so Transparent use caution Figure 6 16 MSB ON VDP1 User s Manual 97 6 44 CMDCOLR Color Control Word CMDCOLR specifies the color of the part The function differs depending on the part and the color mode It specifies the color bank the color lookup table address or non textured colors CMDCOLR is at the top address 06H of the command table and is 16 bits bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CMDCOLR 06 Color bank color lookup table 8H LSB fixed at 00 non textured colors CMDCOLR top address 06H of command table When a textured part is in the color bank mode color bank is specified when it is a textured part in the lookup table mode the lookup table address is specified and when it is a non textured part a non textured color is specified When it is a textured part in the RGB mode this word is ignored Table 6 3 CMDCOLR CMDCOLR Color bank mode Color bank Textured part Lookup table mode Lookup table address RGB mode lgnred RGB mode 2 Ignored Non textured Non textured color 98 Color Bank Color banks are bits added to the upper bit when the pixel data of the character pattern are written to the frame buffer when the color mode of a textured part is the color bank mode Color bank is specified using 16 bi
60. write lower right coordinate 10000CH ENDR 100010H EDSR Read only word 100012H LOPR Last operation command address Read only word 100014H COPR Current operation command address Read only word 100016H MODR Read only word VDP1 User s Manual 23 2 2 Tables VRAM The command table color lookup table Gouraud shading table and character pattern table are defined in VRAM Table 2 2 shows the sizes and boundaries of the tables Table 2 2 Tables in Textured Normal sprite draw command sprite draw command Draw Draw Command apris dew command sprite draw command Commands Poygon draw command gon draw command Command Polling draw command _ line draw command Table Line draw User T iim qb coordinate set Coordinate Clipping coordinate Commands eI M NS vL 0022192000140 set command coordinate set command end command t mU end command Color lookup table 4 4 OSES lookup table Gouraud shading table Character pattern table Note Differs depending on the character size and color mode The VRAM is 4 Mbit 512 Kbyte and it is addressed in byte units from 000000H to 07FFFFH Table data cannot be written beyond 07FFFFH Each table must be kept within the size of the VRAM 24 5 Command Table The command table is a table in where commands are defined and in which the VDP1 reads comma
61. 1 2 X3 or 1 gt then erase write is performed for 1 dot in the normal or high resolution mode and for 8 dots in the case of rotation or HDTV In these cases erase write is performed under the assumption that the area X1 Y1 is set to X1 1 Y1 When VBE 0 in the normal or high resolution mode erase write is performed beyond the frame buffer during the display period When setting the X3 coordi nate beyond the display screen after the end of the effective data fall of HTIM erase write is continued for 4 pixels in the normal mode and for 8 pixels in the high resolution mode and erase write is not performed beyond the display screen other than in those areas When the erase write area is set within the display screen area no erase write is performed outside the display area Erase write is not affected by clipping Erase write cannot be performed on the frame buffer during display when in the HDTV mode when the frame buffer is enlarged or reduced or when display is rotated Because erase write is performed in the vertical blanking period V BLANK there is not enough time to erase write the entire screen To perform erase write on the entire screen the non erased areas must be filled with poly gons at the start of drawing The number of pixels required for V blank erase is expressed by X3 X1 1 x Y3 Yl 3 x 8 If this is within the number of pixels that can be used in V blank erase the
62. 99 Color Lookup 2 101 Nontext red GolOr iet tede ds 102 6 5 CMDSRCA Character 103 6 6 CMDSIZE Character 5 2 104 6 7 CMDXA CMDYD Vertex Coordinate Data 105 6 8 CMDGRDA Gouraud Shading Table 106 Note Refer to 5 4 Command Tables for more information on command tables VDP1 User s Manual 69 6 1 CMDCTRL Control Words CMDCTRL specifies commands and also controls command tables and specifies the inversion and zoom point of sprites CMDCTRL is 16 bits at the top address 00H of the command table and its bit configuration is as follows Set unused bits to 0 bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 MDCTRL werte a ele w om S End Bit END bit 15 Indicates the draw terminate command If there is no draw terminate command the command selection bit becomes valid Jump Select JP bits 14 12 Indicates the method by which the next command table to be read fetched is speci fied Zoom Point ZP bits 11 8 Indicates the zoom point in the case of a scaled sprite draw command The zoom point specifies the reference point for inversion and enlargement or reduction Character Read Direction Dir bits 5 4 Indicates the read direction from the character pattern table in the case of a texture draw command Command Select
63. General Notice When using this document keep the following in mind 1 This document is confidential By accepting this document you acknowledge that you are bound by the terms set forth in the non disclosure and confidentiality agreement signed separately and in the possession of SEGA If you have not signed such a non disclosure agreement please contact SEGA immediately and return this document to SEGA This document may include technical inaccuracies or typographical errors Changes are periodi cally made to the information herein these changes will be incorporated in new versions of the document SEGA may make improvements and or changes in the product s and or the program s described in this document at any time No one is permitted to reproduce or duplicate in any form the whole or part of this document without SEGA S written permission Request for copies of this document and for technical information about SEGA products must be made to your authorized SEGA Technical Services representative No license is granted by implication or otherwise under any patents copyrights trademarks or other intellectual property rights of SEGA Enterprises Ltd SEGA of America Inc or any third party Software circuitry and other examples described herein are meant merely to indicate the character istics and performance of SEGA s products SEGA assumes no responsibility for any intellectual property claims or other problems that
64. MHz tal o name resoiution EN Bit 2 1 Name Resolution size ible NTSC PAL 320x224 512H Yes 26 8426 26 6564 NTSC PAL 320x240 16 x 26 8426 26 6564 352x224 256V 28 6364 28 4375 352x240 28 6364 28 4375 High 640x224 1024H Yes 26 8426 26 6564 resolution 640x240 x 26 8426 26 6564 256V 28 6364 28 4375 28 6364 28 4375 Rotation 16 320x224 512H Single 26 8426 26 6564 NTSC PAL 320x240 16 only 26 8426 26 6564 Rotation 352x224 256V 28 6364 28 4375 352x240 28 6364 28 4375 NTSC PAL Hi 704x224 Res 704x240 Rotation 8 NTSC 320x224 512H Single 26 8426 26 6564 PAL 320x240 X only 26 8426 26 6564 Rotation 352x224 512V 28 6364 28 4375 352x240 28 6364 28 4375 31KC HDTV 352x240 256V 28 6364 28 4375 Other Other Setting prohibited do not set 134 Frame Buffer Change Mode Register FBCH bit 15 14 13 12 11 10 9 100002H T9 T9 9 EOS DE FORT For Write only Frame Buffer Change Mode FCM bit 1 Frame Buffer Change Trigger FCT bit 0 oO o 0 icyclemode Changes every 1 60 second 0 O 1 Settingprohibited oO 1 0 Manual mode erase Eraseinnextfield _ 20 1 1 Manuad mode chang Changeinnextfield p 1 0o 0 Setting prohibited 1 O 1 Setting prohibited ee Setting prohibited Manual mode Erase with V blank and in erase amp change next field Double Interlace E
65. One pixel is represented by 8 bits In the respective modes 64 colors 128 colors and 256 colors can be drawn 8 bytes are required to represent 8 pixels The palette code is represented by bits 6 7 and 8 and upper bits 10 9 and 8 are the color bank added from the color bank word top address 06H of command table resulting in 16 bit data being written to the frame buffer In mode 2 and mode 3 the respective upper 2 bits and upper 1 bit are ignored When there are 8 bits pixel frame buffer rotation or high resolution the lower 8 bits of the 16 bits are written to the frame buffer Because the draw pixel data is color bank code color calculation cannot be performed bit 15 14 13 12 11 10 9 8 Original picture with 8 horizontal pixels 00H lt 06H 08H gt 8 9 A B C DIE F lt 0EH Figure 6 12 Example of Drawing in Modes 2 3 and 4 Mode 5 This is the 32 768 color RGB mode The color is expressed by the respective lumi nances of red green and blue RGB One pixel is represented by 16 bits It is pos sible to draw 32 768 colors 16 bytes are required to express 8 pixels The RGB code is represented by a MSB value 1 which indicates that the code is RGB code and the respective luminances of R G and B are represented by 5 bits each The respective luminances of R G and B are represented by the values 00H to 1FH The closer the value is to 00H the darker the color the closer it is to 1FH the brighter the
66. TRE s o 1 01 0 CMDLINK 04H 06H Local Coordinates A 408H Tous 0 CMDYA 10 12H 14H 16H 18H 1AH 1CH System clipping area Note B is ignored The local coordinate set command is defined as follows When the end bit is set to and the command selection bits are set to 1010B the local coordinate set command is enabled e The jump mode is then specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK The local coordinates are defined in CMDXA CMDYA 116 Local Coordinates Local coordinates are set in the local coordinate register The values of the local coordinates are added to the coordinates specified by the draw command and they become the drawing coordinates Parts are drawn in the frame buffer using the drawing coordinates as a reference When the local coordinates are 0 0 the part is drawn at the coordinates specified by the draw command using the upper left corner of the screen as 0 0 When 0 0 is set approximately in the center of the screen 160 112 are specified as the local coordinates Because the local coordinates are retained in the register until they are set again in order to move the coordinates of several parts and draw them together the local coordinates are set before their respective draw commands Coor
67. The following tables are stored in VRAM Command tables Character pattern tables Color lookup tables Gouraud shading tables The frame buffer comprises two screens at 080000 0BFFFFH Only the drawing screen can be accessed The display screen cannot be accessed Address is absolute To find absolute address add 5C00000H Figure 2 1 Address Map 18 VRAM The is a 4 Mbit DRAM The command table sprite character pattern table color lookup table and Gouraud shading table are defined in VRAM It doesn t matter where in VRAM the data of each are or whether they are in a nested condition They are refer enced by specifying the address of each Fetching of the command must be performed from the top 000000H of VRAM Fetching of VRAM is repeated in the following order Command table Gouraud shading table only when Gouraud shading is used Color lookup table only when lookup table method is used Character pattern table only when drawing sprites When fetching of the command table goes beyond the end address 07FFFFH of VRAM fetching wraps to the top address 000000H of VRAM Byte access and word access are both possible from the CPU Read write access of the VRAM by the system controller IC and parameter read and pattern read access by the VDP1 are performed after assigning an order of priority The order of priority of access of the VRAM is always system controller system controller IC gt drawing
68. Two Vertices Specified sees 6 Figure 1 4 Scaled Sprites Zoom Point 7 Figure 1 5 Distorted endrerit Rhen nnns nnne enne 8 Figure 1 6 Fill In Processing sp eene 9 Figure 1 7 IDs 10 1 8 e a a A sone 11 Figure 1 9 4 ERE 11 Figure 1 10 Bit Configuration of Color Bank Method sese 12 Chapter 2 Address Map Figure 2 1 Address Map 0e esses essen nme 18 Figure 2 2 Frame Buffer Plane 9 9 Leere 21 Chapter 3 Processing Flow Figure 3 1 Command Table Flow ssssssssseseeen ener nre nns nennen nnns 30 Figure 3 2 Referencing of Tables 31 Chapter 4 System Registers Figure 4 1 Single Interlace and Double Interlace 43 Figure 4 2 Erase Write Area retener nennen 48 Figure 4 3 Last Operation Command and Current Operation Command Address 54 Chapter5 Tables Figure 5 1 Examples of Character Pa
69. Vertex D Vertex C Vertex A Y coordinate YA Frame buffer CMDGRDA 152 Scaled Sprite Draw Command Coordinates of 2 Points Specification bit 1514131211109 87654 32 10 Scaled sprite CMDCTRL LL P 0 00 010 of Dr ooo 00H CMDLINK Link eel o o frs Pe To CMDCOLR 2 Color bank lookup table 8H LSB fixed at 00 CMDSRCA 06 Character address 8H 0 0 CMDSIZE FOSH 0 O Character size 8 Character size Y CMDXA 0AH Code extension Vertex A X coordinate XA CMDYA Rond Code extension Vertex A Y coordinate YA T 4 10H 12 Vertex C X coordinate XC 1148 4 16H 18H CMDGRDA 1 Gouraud shading table 8H 1CH Note is ignored Vertex B Vertex C Frame buffer Vertex C Y coordinate YC Scaled Sprite Draw Command Specification of Zoom Point bit 15141312 111098 76 54 3210 cuore S L 2 9 o Link Specification 8H CMDLINK poy 9 0 55 e ec se emm Scaled sprite 04H CMDCOLR Color bank lookup table 8H LSB fixed at 00 06H CMDSRCA oi Character address 8H 0 0 CMDSIZE 00 Character size X 8 Character size Y CMDXA un Zoom point A X coordinate XA Zoom point A Y coordinate YA Vertex A Vertex B Zoom Point Display width YB CMDYA Vertex D Vertex C CMDXB Display X width
70. X4 8 ne X5 8 D X6 8 m 7 8 When HSS 1 EOS 0 Sampling only even X coordinates When HSS 1 EOS 1 Sampling only odd X coordinates Figure 6 5 High Speed Shrink Pre Clipping Disable Pre Clipping Disable Pclp bit 11 Specifies whether pre clipping is enabled or disabled When 0 is specified pre clipping is performed When 1 is specified pre clipping is not performed One drawing command comprises a group of several lines and the respective lines comprise a number of dots Each dot is drawn based on clipping area drawing area information specified by the CPU For lines that are completely separated from the drawing area or if drawing of the entire line is not necessary and can be detected in advance drawing efficiency can be raised by specifying the drawing not be started Also when one end of a line is outside the drawing area efficiency can be improved by starting drawing from inside the drawing area limited to vertical and horizontal lines VDP1 normally performs this detection but in the case of small elements whose points are in the A B or D C direction the overhead required for that detec tion up to five CPU clock cycles for one line becomes conspicuous and can lower the drawing efficiency In the case of large elements that extend greatly out of the drawing area it is more efficient to perform pre clipping This bit is only valid for drawing commands
71. a in frame buffer is not changed Sets MSB of pixel data in frame buffer to 1 When mode is set in which the VDP2 uses shadow drops luminance of pixel data in scroll screen or window displays a different screen in the specified area shadow and window processing are performed when the most significant bit MSB is g i Du Set the MSB to 1 ON for the pixels already written to the frame buffer The color code is valid only when the frame buffer is color bank code this is because the MSB is used for shadow enable and window enable in the VDP2 eliminating an RGB recognition bit thus making it impossible to perform color calculation Specify replace for color calculation In the case of textured parts this can be used only when the original graphic data has or does not have pixels no pixels for transparent and end codes and pixels for everything else and therefore RGB code or color bank code can be used as the color code In the case of non textured parts the non textured color is not reflected in the drawing Do not specify color calculation specify replace instead when the MSB is set to 1 When the MSB is set to 1 color calculation has no meaning and processing takes a long time so use caution For parts that undergo mesh processing the MSB is set to ON in the mesh condition An example of MSB ON is shown below When MSB is ON in distorted sprite Original graphic The MSB of the data in the frame buffer in
72. able is termi nated and the table is not processed goes to step 8 3 In cases other than 1 and 2 goes to step 4 In the case of a clipping coordinate set command or a local coordinate set command each is processed goes to step 8 In the case of a drawing command the Gouraud shading table and color lookup table are read if specified In the case of a textured drawing the character pattern table is read and is written to the frame buffer according to the specification At this time processing of the color mode color calculation inversion enlargement and reduction and rotation are performed In the case of a non textured drawing writing to the frame buffer is per formed according to the specification The next command table is fetched according to the specification of the jump mode and processing of the command table is repeated goes to step 3 Drawing is repeated with the start of framing goes to step 1 VDP1 User s Manual 29 3 2 Command Table Flow Except for the draw end command a jump mode to the next command table to be processed can be specified in other commands Those jump modes include the following Jump to a command table Skip to a command table Call a command table group subroutine Return to main routine Figure 3 1 shows an example of the flow of a command using a jump mode VRAM Command Table 000000H Clipping coordinates e Fetched from the top of VRAM Local coordinates d
73. ach of R G and B between the four points are added to the original color of the part Because each of the values of R G and B takes the values 00H to 1FH the result of subtracting 10H from the complementary RGB data is added to the original color of the part For example if the value of RGB is 10H the original color is left as is if the value is the original color becomes 10H and if the value is 1FH then the original color becomes 0 If the value after color calculation be comes less than 00H then 00H is used if it is larger than 1FH then 1FH is used The relationship between Gouraud shading table settings and correction values is shown as follows Table 5 3 Relationship between Gouraud Shading Table Settings and Correction Values Table setting Correction for original Table setting Correction for original data 1 32 Real Gouraud shading changes only the luminance but in this system it changes each of R G and B and therefore in some cases the hue also changes To avoid changing the hue define the same value for each RGB for one point defined in the Gouraud shading table By this means white Gouraud shading is applied Gouraud shading is performed on non textured colors in the case of lines polylines and polygons and on colors referenced by the character pattern data or the color lookup table in the case of sprites VDP1 User s Manual 65 5 4 Command Tables Command ta
74. acter size 8 Character size Y aracter size CMDSIZE yay CMDXA Code extension Vertex A X coordinate XA 001 CMDXB Vertex B X coordinate XB YB XC Distorted sprite Vertex A Frame buffer CMDYB Vertex B Y coordinate YB ied Vertex C X coordinate XC CMDYC 46H Vertex C Y coordinate YC CMDXD 48H Vertex D X coordinate XD CMDYD H Code extension Vertex D Y coordinate YD CMDGRDA HICH Gouraud shading table 8H Note E is ignored The distorted sprite draw command is defined as follows e When the end bit is set to and the command selection bits are set to 0010B the distorted sprite draw command is enabled e The jump mode is then specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK The read direction of the character pattern is set The character pattern can be drawn with vertical or horizontal inversion by the specification of the read direc tion When inversion is specified twice by the read direction and by the specifica tion of vertex A vertex B vertex C and vertex D the inversions cancel each other out Set high speed shrink Specify priority to precision or to speed Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part 124 The user clippin
75. address 100002H Its value becomes undefined after powering on or resetting and therefore the change mode must be set Unused bits must be set to 0 FBCR bit 15 14 13 12 11 10 9 100002H o o Write only Frame Buffer Change Mode FCM bit 1 Frame Buffer Change Trigger FCT bit 0 Normally the two frame buffers are used as a front screen and a back screen The front screen is displayed and the back screen is drawn Also the front screen and back screen are toggled after the time required to change one frame has elapsed The front screen that was displayed becomes the back screen to be drawn and the back screen that was being drawn becomes the front screen to be displayed Only that part of the frame buffer being drawn can be accessed The side being displayed cannot be accessed The number of characters that can be drawn in one frame is limited Therefore in order to draw multiple characters the manual mode must be set and controls erased and changed from the CPU When selected data is written from the CPU to FBCR the values of FCM and FCT are updated at the time of a field change in the VDP1 When in the manual mode the FCT bit setting is only valid for the next frame The contents of FCT are updated internally at the time of frame change Make the FCM and FCT settings immediately after the V blank OUT interrupt Access is prohibited from the first H blank IN
76. ame change will be performed two fields in advance Use erase and change when it is unclear up until the prior field that frame change will be performed Change Manual Mode The changing of one frame is controlled by the CPU Change is specified by writing 0 to the VBE register and 1 to the FCM and FCT registers The drawing and display are changed in the next specified field Because erase write is not performed it is necessary to specify erase in the prior field in which change is specified and to erase write the frame buffer Until change is specified characters can be drawn in the back screen This change is normally used when switching from the 1 cycle mode to the manual mode This change is also used when changing the frame buffer in manual mode VDP1 User s Manual 39 Erase amp Change Manual Mode By writing 1 to the VBE register V blank erase is specified and by writing 1 to the FCM and FCT registers at the same time switching of the frame buffer after V blank is specified This mode is used when frame change is unclear up until the prior V blank as when the frame buffer cannot be changed by the end of processing by the CPU Once VBE has been set to 1 erase write is performed automatically even in the next V blank and therefore VBE must be set to 0 before the next V blank after frame change Place the erase amp change setting immediately after the V blank IN interrupt When set at another time th
77. are set to 0100B the polygon draw command is enabled e The jump mode is specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part The user clipping enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is speci fied Mesh is enabled MSB ON is set to perform shade or window processing in the VDP2 The color mode is set to 000 The color code is set to non textured color CMDCOLR 126 Specify color calculation Color calculation is enabled when the non textured color is in the RGB mode When color calculation is not used replace is specified When Gouraud shading is used the address of the Gouraud shading table is specified by dividing by 8H Gouraud shading processing is enabled when the non textured color is in the RGB mode The upper left coordinates of the quadrangle to be drawn are defined as vertex A CMDXA CMDYA the upper right coordinates are defined as vertex B CMDXB CMDYB the lower right coordinates are defined as vertex C CMDXC CMDYC and the lower left coordinates are defined as vertex D CMDXD CMDYD The relationships between the positions of the four vertices can be set as desired and therefore rotatio
78. bits pixel can be set are modes 0 1 2 3 and 4 When the frame buffer is set to 8 bits pixel set the color calculation mode to 0 Only replace is possible Color calculation other than this is prohibited When the frame buffer is set to 8 bits pixel the upper 8 bits of non textured colors are ignored The use of RGB data is prohibited at this time When the frame buffer is set to 8 bits pixel set the MSB ON bit MON to 1 When the MSB ON bit MON is set to 1 set the color calculation mode to up Store command tables to address 000000H of VRAM VDP1 User s Manual 159 160 Page 160 is blank in the original Japanese version INDEX color lookup table mode 89 color palette code 89 T cycle mode uet erepta 38 E 37 A access system registers 23 address map 18 B backgrou nd tee ttt no 94 boundaries eese 24 burst transfer 23 byte access VRAM 19 C change manual mode 39 character address 103 character pattern each color mode 90 character pattern o etude 60 character pattern table ee 26 60 character read direction 22 77 character S126 104 clipping coordinate set command 109 CMDGOLR ied mra 98
79. bles comprise 1EH 30 bytes Because command tables are fetched every 20H 32 bytes they should be defined with 20H boundaries The 2 bytes following command tables are dummy bytes and are skipped when the command table is fetched Command tables stored in VRAM are fetched from the top address 00000H every frame A command table must always be stored at address 00000H to 0001EH Drawing operation cannot be guaranteed when other than a command table color lookup table Gouraud shading table or character pattern table is stored there VRAM occupies up to 7FFFFH Do not define Gouraud shading tables beyond address 80000H se S gt LINK specification 8H Eee ow pem eco eo NINE o em Color bank color lookup table 8H LSB is set to 00 non textured color Character address 8H 0 0 Code extension Point A X coordinate XA Code extension Point A Y coordinate YA Code extension Point B X coordinate XB Gouraud Shading Table 8H Dummy Skipped during table fetch Succeeding table Succeeding table Note The top bit of the vertex coordinate is a sign bit A negative value is indicated by a complement of 2 Extend the sign for the upper 6 bits Code extension Point B Y coordinate YB Figure 5 5 Command Table The order which sprites and other parts are drawn is determined how they are placed in the VRAM of this command table
80. color codes by referencing the specified color lookup table and are written to the frame buffer The storage address and size of the character pattern and the storage address in the color lookup table are specified by the sprite draw command 62 sf Character Patterns In the lookup table mode a character pattern is 4 bits pixel and is stored in VRAM Command Tables The address of the color lookup table referenced by the sprite is specified in the color lookup table address top address 06H of the command table The specified value is address 8H Since the color lookup table is stored in boundaries of 20H byte units the lower two bits become 00 The relationship between the command table color lookup table and character pattern table is shown below Command Table Lookup Table address Character address Character Pattern Table Frame buffer Color Lookup Table Figure 5 3 Relationship between Tables in Lookup Table System VDP1 User s Manual 63 5 3 Gouraud Shading Table This table specifies RGB data for four points when processing Gouraud shading for parts The data for each of the four points is 16 bit so 8 bytes are required for one table The table is positioned where an 8H byte boundary address begins but do not write from 00000H to 0001FH VRAM occupies up to address 7FFFFH Do not define Gouraud shading tables beyond 80000H The table defines RGB data for vertices A B C and D in that order I
81. coordinate X3 can take are as shown in the following table 8 bits pixel High Resolution Upper left Lower right Upper left Lower right coordinate X1 coordinate X3 coordinate X1 coordinate X3 prohibited 7 Setting prohibited Value set 16 bits pixel in register Rotated 8 coordinate X1 coordinate X3 prohibited A 9 pr D 1 248 46 45 496 se opened a 25 i EA 90 60 69 m WE p x uj S c 344 688 67 5 5352 74 750 W po 9 A 46 92 Se 54 108 107 49 496 Setting prohibited Setting Setting prohibited prohibited A 5 pey 52 639 687 703 1008 Setting Setting prohibited prohibited Setting Setting Setting Setting Setting prohibited prohibited prohibited prohibited prohibited The coordinates for erase write are not checked and therefore the registers must be set in the CPU in advance so that X1 X3 and Y1 x Y3 Set the erase write range in each TV mode within their respective memory map ranges 1007 1023 Setting prohibited lt op Top ALA C2 c Co n5 ABICO gt X1 lt Y1 lt b X1 2 X3 Y1 gt White area undergoes erase write No erase write Figure 4 2 Erase Write Area 48 If the setting is X
82. dinate comparison in clipping is processed using the value resulting from adding these local coordinates to the coordinates specified by drawing of the part Furthermore because the local coordinates are not added to the clipping coordi nates the clipping area does not move Because the values in the local coordinate register become undefined after powering on or after resetting they must be set before drawing starts VDP1 User s Manual 117 7 4 Normal Sprite Draw Command The normal sprite draw command draws character patterns in the frame buffer When drawing the character pattern can be inverted vertically or horizontally at the specified coordinates and drawn When the end bit is 0B and the command selection bits are 0000B the normal sprite draw command is enabled Normal sprites cannot be rotated 90 To rotate 90 specify the distorted sprite draw command The contents of the command table are shown in the following figure bit 15 141312111098 76 5 432 10 oj JP 000000 00 00 Normal sprite EMDETRIE00H Link specification 8H CMDLINK CMDPMOD o Of re a Eee Fe m T CMDCOLR Coler bank lookup table 8H LSB fixed at 00 CMDSRCA 06 Character address 8H 0 0 CMDSIZE ud o 0 Character size X 8 Character size Y CMDXA Vertex X coordinate CMDYA 4 Code extension Vertex A Y coordinate YA 10H Frame buffer Vertex D Vertex C CMDGRDA ee Gouraud shading table 8H
83. dress Figure 4 3 Last Operation Command and Current Operation Command Address 54 4 8 Current Operation Command Address Register The current operation command address register COPR indicates the address of the command table being processed It is a 16 bit read only register at address 100014H COPR bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100014H Current operation command address 8H 0 0 Read only Current Operation Command Address bits 15 0 The value resulting from dividing the command table address which has received the parameter currently being processed by 8H is written to this register tis possible to know the address of the command table currently being pro cessed The address value is continually updated during command processing When the draw end command is fetched and drawing is abnormally ended the value of the address updated at that time is retained as is until drawing is started by a frame change or plot trigger When the draw end command is fetched this is the address divided by 8H of the draw end command table In the case of draw forced termination this is the address divided by 8H of the abnormally ended command table Because the boundary of the table address is 20H bytes the lower 2 bits of the register are fixed at 00B VDP1 User s Manual 55 Pseudo Draw Continuation When the amount of data drawn is large and cannot be drawn one frame drawing is terminated part way thr
84. e change may be performed without being able to erase If the timing for frame change is known in advance as in normal high resolution and interlace specify erase amp change and perform erase write during the display period In this case erase write of the entire display screen is possible Sequence When Using Erase amp Change 1 2 3 Set VBE to 0 and FCM and FCT to 1 Wait for the end of processing by the CPU without selecting the TV mode or setting the FB change mode When processing by the CPU ends by the H blank IN interrupt time 224th line in 224 line display and 240th line in 240 line display immediately before V blank then VBE FCM and are set to 1 erase amp change The erase amp change setting should be placed immediately after the V blank IN interrupt V blank erase is started after completion of the V blank IN interrupt At the end of V blank erase write is interrupted and the frame is changed If erase write is not completed erase write non erased areas with polygons Return VBE to 0 after the V blank OUT interrupt to stop V blank erase Return to 2 40 Example Table 4 3 a shows the frame buffer change mode being used Table 4 3 a Example of Use of Frame Buffer Change Mode Fixed at VBE 0 Setting Frame Frame Frame buffer buffer 0 buffer 1 change mode time ey dna Dm e erase write Enk HEN Dew LI gm erase write erase write cha
85. e user clipping coordi nates when user clipping is enabled Clip 1 When it is 0 drawing is performed inside When it is 1 drawing is performed outside When Cmod 1 the user clipping rectangle including the lines already specified becomes the drawing area When Cmod 0 the drawing area does not include the lines of the rectangle Cmod 0 Cmod 1 inside drawing mode outside drawing mode Frame buffer Frame buffer Upper right coordinate of user clinging Drawing area Lower right coordinate of user clipping Figure 6 7 Drawing Area Do not set this bit to 1 when user clipping is disabled Clip 0 Combinations of the user clipping enable bit and the clipping mode bit have the following results 0 0 Userclippingdisabled User clipping disabled 0 1 Set ngprohiited donotse 0 Insidedrawingmode y y 84 Mesh Enable Mesh Enable Bit bit 8 This bit specifies whether or not mesh processing is performed when the command is a draw command for a part When it is 0 the part is drawn without mesh pro cessing When it is 1 the part is drawn with mesh processing Draw without mesh processing When mesh processing is specified Mesh 1 every other pixel of the part is drawn to form a mesh Only pixels for which X coordinate value Y coordinate value is even XLSB XOR YLSB 0 are drawn and odd pixels are skipped and not drawn When the starting point of a 45 diagonal
86. e values for clipping to match the screen mode set by the TVM bit Always set the user clipping area inside the system clipping area They can be set on the same lines The upper left coordinate of the system clipping area is fixed at 0 0 in the hardware Set unused bits in words used in commands tables to 0 Call call jump call skip call is prohibited in command subroutines 158 Return return jump return skip return is prohibited in command main rou tines Only 0H 5H 6H 7H 9H AH 10 BH 11 DH 13 EH 14 and FH 15 are allowed as zoom point values Settings other than these are prohibited When 55 1 the end codes of the original graphic are ignored whether the sprite is enlarged or reduced Set the lower 2 bits of CMDLINK to 00 Set the lower 2 bits of lookup tables to 00 When setting a color bank set the lower 4 bits of the color bank data to 0000 Set ECD and SPD to 1 and the color mode to 0 for non textures When calculating colors in non textures set the non texture color using RGB data greater than 8000H Set ECD to 0 when the color mode is set to the RGB mode and 7FFFH data are used for the original graphic Set SPD to 0 when the color mode is set to the RGB mode and 0000H data used for the original graphic When the color mode is set to the RGB mode the frame buffer cannot be set to 8 bits pixel The only color modes in which 8
87. ed the address of the Gouraud shading table is specified by dividing by 8H Gouraud shading processing is enabled in the RGB mode The address of the character pattern table is defined in CMDSRCA by dividing by 8H The horizontal and vertical lengths of the character size defined in the character pattern table are defined in CMDSIZE A value divisible by 8 is defined for the horizontal size The upper left coordinates of the area to be drawn are defined in vertex A CMDXA CMDYA VDP1 User s Manual 119 7 5 Scaled Sprite Draw Command The scaled sprite draw command draws character patterns in the frame buffer Character patterns can be drawn at specified coordinates inverted vertically and or horizontally enlarged or reduced and stretched When the end bit is and the command selection bits are 0001B the scaled sprite draw command is enabled When the zoom point is 0000B the character pattern is defined by specifying the coordinates for two points When the zoom point is other than 0000B the zoom point is defined The scaled sprite can not be rotated at 90 When rotating 90 specify using the scaled draw command Specification of Two Coordinate Points Scaled Sprite Draw Command The contents of the command table for specifying the coordinates of two points are shown in the following figure bit 1514131211109 8 76543210 00H o JP o o 0 ofo of CMDLINK 02H 0 0
88. efined in the command table or the system registers are indicated by a hy phen Write OB to undefined bits in the system registers Write 0 or 1 to undefined bits in command tables If an entire word is unused fill with either 0 or 1 When a word is partially used fill the remaining unused bits with 0 Addresses The addresses shown in this manual are relative VDP1 addresses VDP1 is at the absolute address 5C00000H of the system Add 5C00000H to a relative address to determine the absolute address For example the abso lute address 000000H in VRAM is address 5C00000H and the absolute address 180000H in the system registers becomes 5D80000H Table of Contents Introduction BERE UR IN RS 1 Notations Used in this 4 LERNEN ANTO A 5 List ot 8 ListiOf Tables 10 Chapter 1 Functions of the VDPT is ce ro 1 14 2 System Configuration amp 80 2 Functions of the VDP1 3 E E 4 Textured Parts 299999 5 Non Textured 10 eene 12 1
89. els Standard Y range resolution Non interlace 320 Hx 224 V 0 lt lt 319 0 lt lt 639 0 lt lt 223 Single interlace 320 H x 240 V 0 lt lt 319 0 lt lt 639 0 lt lt 239 NTSC PAL 352 Hx 224 V 0 lt lt 351 0 lt lt 703 0 lt lt 223 352 H x 240 V 0 lt lt 351 0 lt lt 703 0 lt lt 239 Double interlace 320 H x 224 V 0 lt lt 319 0 lt lt 639 0 lt lt 447 NTSC PAL 320 H x 240V 0 lt lt 319 0 lt lt 639 0 lt lt 479 352 H x 224 V 0 lt lt 351 0 lt lt 703 0 lt lt 447 352 H x 240 V 0 lt lt 351 0 lt X lt 703 0 lt lt 479 Non interlace 320 Hx 240 V 0 lt lt 319 0 lt lt 239 31KC HDTV 352 Hx 240 V 0 lt lt 351 0 lt lt 239 Horizontal V Vertical These are coordinate ranges and are not the sizes of the areas occupied in the frame buffer For more information about the size of the frame buffer see Frame Buffer in Section 2 1 Address Map High resolution display has a color resolution of 8 bits pixel which is half the standard mode Rotated display of the frame buffer is not possible in high resolution Rotated display of the frame buffer is not possible with double interlace Adouble interlaced display system uses graphic information from both buffers to make one frame Asingle interlaced display system switches frame buffers every two fields and displays the same picture in both the odd and even display lines In both cases there are no gaps between the scanning
90. ent Operation Command Address Register VDP1 User s Manual 51 4 6 Transfer End Status Register The transfer end status register EDSR indicates the end status of the prior frame processing It is a 16 bit read only register at address 100010H Set unused bits to 0 EDSR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 un 0 cE ead only Current End Bit Fetch Status CEF bit 1 This register indicates whether or not the end bit draw forced termination com mand has been fetched from the command table in the frame currently being drawn When it is 0 the end bit indicates a non fetched status when it is 1 it indicates that the end bit has been fetched and that drawing is terminated End bit fetch status 0 The end bit in current frame has not been fetched The end bit in current frame has been fetched and plotting is ended The VDP1 successively fetches the following command tables VRAM and draws them in the frame buffer When the draw end command when end bit is 1 is fetched the drawing of one frame is terminated CEF is set to 1 at this time e When data are transferred from the CPU to VRAM while in a draw end CEF 1 status VRAM can be accessed without the overhead for stopping drawing and without causing the CPU to wait When the draw end command is fetched the VDP1 sets CEF to 1 and generates an interrupt signal
91. er than 512 x 256 The number of colors that can be expressed at one time becomes fewer than 256 Rotation is prohibited when normal high resolution HDTV or double interlace is set The read start coordinates and read movement value for rotated reading from the frame buffer are received from the VDP2 Rotated reading of the frame buffer is only valid in rotation 16 and rotation 8 and is prohibited in all other cases In the case of non rotation any rotation data re ceived from the VDP2 are invalid and the parameters of the VDP1 become valid VDP1 User s Manual 15 16 Page 16 is blank in the original Japanese version Chapter 2 Address Contents 2 1 AdE IM AD MEE E 18 VRAM 19 Frame BUffGr eee 20 System 23 2 2 Tables in VRAM aie Ties 24 Command 25 Color Lookup 26 Gouraud Shading 0 26 Character Pattern 26 VDP1 User s Manual 17 2 1 Address Figure 2 1 shows the address map for the VRAM frame buffer and system registers controlled by the VDP1 8 VRAM 000000 07FFFFH 4 Mbit Frame buffer 0 Frame buffer 1 080000 0BFFFFH 2 Mbit 2 Mbit System 100000 17FFFFH registers Access 180000 1FFFFH prohibited Notes 1
92. ers compared to previous systems System Configuration A VRAM 4 Mbit DRAM and a two plane frame buffer 2 Mbit DRAM per screen are connected to the VDP1 The image data defined in VRAM by the CPU are output to the display device via the frame buffer Draw data is sent from the CPU to the VDP1 via the system control IC and is written VRAM Parts written in are drawn in the frame buffer in a 16 or 8 bit pixel form The frame buffer data that is drawn is displayed on the display device via the priority circuit in the VDP2 The priority circuit prioritizes the scroll plane and the priority plane The frame buffer has two screens and draw and display are changed every frame The information that controls draws is set in the VDP1 system registers by the CPU via the system controller IC The system registers control draws VRAM 4 Mbit System Display Controller Device IC Figure 1 1 System Configuration Functions of the VDP1 The functions of the VDP1 include the drawing of parts characters and lines speci fication of colors color calculation of Gouraud shading specification of clipping coordinates and local coordinates and control of display by the frame buffer Parts color and coordinates are controlled by the command table in VRAM and display of the frame buffer is controlled by the system registers Parts The following graphics can be drawn as parts Normal sprites Scaled sprites with zoomi
93. es is required for 4 bits pixel 18H 24 bytes is required for 8 bits pixel and 30H 48 bytes is required for 16 bits pixel The table of a character pattern requires 4H bytes when the character pattern is 8 horizontal pixels by 1 vertical pixel and 4 bits pixel and the maximum data of a character pattern is 3EC10H 257 040 bytes when the character pattern is 504 horizontal pixels by 255 vertical pixels and 16 bits pixel Table 5 1 Size of Character Pattern Tables Hem Minimum Maximum Fa ES size 8 horizontal pixels x 504 horizontal pixels x 1 vertical pixel 255 vertical pixels 4 bits pixel 16 bits pixel 257 040 Byles Even a 4H byte character requires 20H bytes in so use caution 60 Examples of Character Pattern Tables The examples of character patterns in Figure 5 1 are shown with a character size of 8 horizontal pixels by 3 vertical pixels For 4 bits pixel OCH 12 bytes is required pixel Q 4 6 Value is relative address from 04H 4 15 bg i character pattern address 08H 1B For 16 bits pixel 30H 48 bytes is required pixel 0 1 2 3 4 5 6 7 00H 10H 4101411 412 413 141 415 16 17 4181 19 1Al 1B 1C 1D 1El 1 20H 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F Figure 5 1 Examples of Character Pattern Tables VDP1 User s Manual 61 5 2 Color Lo
94. esceeceeeeeeeaeeceeeeeeeaaeeseeeeeseeaaesseeeeeesaaeesnes 81 Pre Clipping 04004040 nnns 83 USlipping Enable a 84 User Clipping Mode seen nnne 84 Mesh Enable ni aS ioa toa ee 85 End Gode Disable ean en depende duode 86 Trasparent Pixel Disable 88 Color 89 Color Calculation essssssssssssee eene nnns 93 97 6 4 CMDCOLR Color Control 98 Color Bank zu t eos 99 Color Lookup Table sess 101 Non Textured Color 102 6 5 CMDSRCA Character 103 6 6 CMDSIZE Character 22 1 000 104 6 7 CMDXA CMDYD Vertex Coordinate Data 105 6 8 CMDGRDA Gouraud Shading 2 8 106 Chapter 7 Commands a oet bebe eere 107 7 1 System Clipping Coordinate Set Command 110 System 111 7 2 User Clipping Coordinate Set Command 112 User CIP DING iot CETE y ree 113 7
95. ex coordinate is a sign bit A negative value is indicated by the complement of 2 Extend the sign for the upper 6 bits and X coordinate S and Y coordinate and X coordinate and Y coordinate 1 lt c HK and X coordinate ZS wey wm and Y coordinate a Figure 8 3 Command Table 142 CMDCTRL Control Words bit 15 14 13 12 11 10 3 2 1 0 9 8 7 6 5 4 End bit END bit 15 End bit Drawing command or coordinate setting command other than draw end command Jump Mode JP bits 14 12 HEN DIU MEER o sumpe Automatically jumps to next table address 20H after this table is processed CMDLINK is ignored O 1 Jumpassign Jumps to CMDLINK table after this table is processed CMDLINK table receives subroutine call after this table is 1 Jump call processed Returns to main routine after this table is processed 1 1 Jump return CMDLINK is ignored Skip next Jumps to next table address 20H after this table is processed CMDLINK is ignored i i i le Jumps to CMDLINK without processing this table CMDLINK table receives subroutine call without processing 1 Skip call this table Returns to main routine without processing this table 1 1 Skip return CMDLINK is ignored VDP1 User s Manual 143 Zoom Point ZP bits 11 8 Fm WIS coe z
96. f the command table to be processed next is divided by 8H and set in CMDLINK e The zoom point is specified When the zoom point is set to other than 0000B it becomes the display width specification When 0000B is set it becomes the coor dinate specification for two points For more information on zoom point refer to Zoom Point in section 6 1 The read direction of the character pattern is set The character pattern can be drawn with vertical or horizontal inversion by the specification of the read direc tion Set high speed shrink Specify priority to precision or to speed Set pre clipping Specify enable or disable in consideration of the clipping area and the drawing position of the part 122 The user clipping enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is speci fied Mesh is enabled end code is disabled and transparent pixel is disabled MSB ON is set to perform shade processing in the VDP2 The color mode that defines the character pattern is set Color bank is specified when the color mode is the color bank mode When the color mode is the lookup table mode the address of the color lookup table is defined by dividing by 8H Color calculation is specified Color calculation is enabled in the RGB mode When color calculation is not used replace is specified When Gouraud shading is used the address of the Gouraud
97. frame buffer is in 8 or 16 bits per pixel bpp Color The RGB code method and the color bank method which uses palette codes and color banks are used to express color The RGB code method specifies the luminance of each of the colors red R green C and blue B in 5 bits In the color bank method the VDP2 color palette is selected from a color bank and a palette code is used to select the desired color from this palette Sprite colors can be specified using the color lookup table method The color is selected from among the 16 colors defined in the color lookup table The color code can be specified using RGB or color bank codes Color Calculation Color calculation is a special function of the VDP1 Gouraud shading is an example of color calculation The luminance of the RGB code of a particular part can be changed using the RGB codes of four points defined in the Gouraud shading table Notations Used this Manual The notations used in this manual are as follows Binary and Hexadecimal Numbers Binary numbers are designated with a B at the end of the number for example 100B Hexadecimal numbers are designated with an H at the end of the number for example 00H FFH Units 1 Kbyte is equal to 1024 bytes 1 Mbit is 1 048 576 bits MSB LSB In the configuration of bytes and words the left is the most significant bit MSB and the right is the least significant bit LSB Undefined Bits Bits that are not d
98. g enable bit and clipping mode are specified Depending on the clipping mode either the outside or the inside of the user clipping area is speci fied Mesh is enabled end code is disabled and transparent pixel is disabled MSB ON is set to perform shade processing in the VDP2 The color mode that defines the character pattern is set Color bank is specified when the color mode is the color bank mode When the color mode is the lookup table mode the address of the color lookup table is defined by dividing by 8H Color calculation is specified Color calculation is enabled in the RGB mode When color calculation is not used replace is specified When Gouraud shading is used the address of the Gouraud shading table is specified by dividing by 8H Gouraud shading processing is enabled in the RGB mode The address of the character pattern table is defined in CMDSRCA by dividing by 8H The horizontal and vertical lengths of the character size defined in the character pattern table are defined in CMDSIZE A value divisible by 8 is defined for the horizontal size The upper left coordinates of the area to be drawn are defined as vertex A CMDXA CMDYA the upper right coordinates are defined as vertex CMDXB CMDYB the lower right coordinates are defined as vertex C CMDXC CMDYC and the lower left coordinates are defined as vertex D CMDXD CMDYD The relationships between the positions of the four vertices can be set as de
99. g line to scan one screen In the NTSC system this is 1 60th of a second and in the PAL system 1 50th of a second A frame is the time it takes from one change of the frame buffer to the next change When the change mode of the frame buffer is in a one cycle mode one frame is equal to one field When the frame buffer is changed every two fields such as in single density inter lace one frame comprises two fields When the frame buffer is changed only once a second in the manual mode one frame comprises 60 fields in the NTSC system and 50 fields in the PAL system Before each frame is drawn the frame buffer is automatically erased Erase is performed by writing filling a code specified in a register to the frame buffer This operation is referred to as erase write Access Reading and writing of data by the CPU and VDP1 in the system registers and frame buffers are referred to as access When two or more devices attempt access at the same time the accesses are arbitrated with writes normally given priority over reads When a DMA controller is used access of VRAM can be performed continuously and rapidly by burst transfer However do not perform burst access of registers Data A bit is the smallest unit of data which is represented by 0 or 1 A combination of 8 bits is called a byte and 16 bits or 2 bytes is called a word When a byte is divided into its upper 4 bits and its lower 4 bits each is referred to a
100. ht coordinate Y3 Write only Erase Write Lower Right Coordinate X3 bits 15 9 Erase Write Lower Right Coordinate Y3 bits 8 0 8 bits pixel 16 bits pixel High Resolution Rotated 8 Value set Upper left Lower right Upper left Lower right Upper left Lower right in register coordinate X1 coordinate coordinate X1 coordinate coordinate X1 coordinate X3 Setting Setting Setting prohibited prohibited prohibited L o OU 7n E a Es ERE 2 256 255 512 511 Setting 511 prohibited 33 264 263 528 527 Setting Setting prohibited prohibited ea A poen b Setting Setting 1023 prohibited prohibited 65 and Setting Setting Setting Setting MEE over prohibited prohibited prohibited prohibited prohibited prohibited VDP1 User s Manual 137 Draw Forced Termination Register ENDR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 10000CH 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Write only Transfer End Status Register EDSR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100010H ojojojojojoj ojojojojojolj o o NA Read only Current End Bit Fetch Status CEF bit 1 End bit fetch status 0 The end bit in current frame has not been fetched The end bit in current frame has been fetched and that drawing is terminated Before End Bit Fetch Status BEF bit 0 End bit fetch status 0 The end bi
101. ined char acter pattern is specified The content of the pixel data of the character pattern is 4 8 or 16 bits pixel depending on the color mode The size of the table is specified by CMDSIZE Character size Because the character pattern table is defined with 20H byte boundaries the two LSBs are fixed at 00B VDP1 User s Manual 103 6 6 CMDSIZE Character Size CMDSIZE specifies the size of the defined character pattern CMDSIZE is valid for texture draw commands It is specified with 16 bits at the top address OAH of the command table Set unused bits to 0 bt 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CMDSIZE SE oo emen cramar sany e The character size is defined in multiples of 8 horizontally X and in 1 pixel units vertically e Horizontally values from 1 to 63 can be specified with 5 bits Because the size is specified in 8 pixel units sizes from 8 to 504 pixels can actually be specified Do not specify 0 e Vertically values from 1 to 255 can be specified with 8 bits Do not specify 0 Horizontal size 8 504 pixels 4 Vertical size 17255 pixels Figure 6 19 CMDSIZE e Table 6 5 shows the relationships between the values defined in the command table and the number of drawn pixels Table 6 5 Relationships between Settings and Drawn Pixels Horizontal X direction Vertical Y direction Setting in command Number of pixels Setting in command Number of pixels
102. int The draw area differs depending on vertical or horizontal inversion Zoom Zoom oint oint vme width 48 a Draw Display Original width graphic Normal size Vertical horizontal reduction amp horizontal inversion with zoom point at center Display width Display width gt gt Horizontal enlargement vertical reduction amp Vertical horizontal enlargement vertical inversion with amp vertical horizontal inverstion Zoom point at upper right with zoom point at right center Figure 1 4 Scaled Sprites Zoom Point Specified VDP1 User s Manual 7 Distorted Sprites Draw a character pattern by specifying four coordinates Specify the four draw coordinates corresponding to the four vertices of the character pattern These four coordinates can assume any position relative to each other and therefore the charac ter pattern can be inverted enlarged or reduced rotated or twisted depending on how they are specified Distorted sprites are created by skewing the character pattern At this time holes are filled to prevent the dropout of pixels For this reason there may be some pixels that are written twice and therefore the results of half transparent processing as well as other processing in color calculation cannot be guaranteed Because drawing is done with lines part of the character pattern may result outside the graphic formed by linking the four vertices if it is twisted or rotated
103. is performed When the MSB of the frame buffer is 1 half transparency results In half transparency one half average the sum of the data of the original graphic and the background is written to the frame buffer Color calculation of half transparency is performed on the pixel data of the original graphic and the pixel data read from the write coordinates Drawing in this case slows down so use caution it takes six times longer than when color calculation is not performed Gouraud Shading Color Calculation Mode 4 Processes Gouraud shading using the RGB code set in the Gouraud shading table Pixel data already written to the frame buffer is not affected The Gouraud shading table address is specified by CMDGRDA top address 1CH of command table Gouraud Shading Half luminance Color Calculation Mode 6 Gouraud shading half luminance is processing that combines half luminance with Gouraud shading The part undergoes half Iuminance processing after receiving Gouraud shading processing Gouraud Shading Half Transparency Color Calculation Mode 7 Processing differs depending on the MSB of the frame buffer When the MSB of the frame buffer is 0 Gouraud shading is performed When the MSB of the frame buffer is 1 Gouraud shading half transparency is performed VDP1 User s Manual 95 Original Graphic In parts sprites with an original graphic color calculation other than shadow is enabled only in the RGB mode
104. ixel ume Color bank Character data 128 color mode o ee s s s 7 bits pixel Qo aeee Color bank Character data 256 color mode p ee s o o ot o 8 bits pixel Character data 22 System Registers System registers are memory used for making system settings for the VDP1 They are housed inside the VDP1 separately from the and frame buffer There are read only registers and write only registers The write only registers are used to control display of the frame buffer They select the TV mode specify change of display and the drawing trigger and define the fill data and area for erase write Drawing can also be forcibly terminated Read only registers are used as help information during program development They make it possible to know the address of the command table that underwent draw processing last Read write access from the CPU must be performed in word units Do not use DMA burst transfer when accessing the system registers Except for the plot trigger register the values in the write only registers become undefined after powering on and after resetting so be sure to set the values from the CPU Undefined data is displayed from the frame buffer until a suitable value is set e Set the unused bits of write only system registers to 0 Table 2 1 System Registers 100000H TVHR TV mode selection Write only word EWRR Erase
105. le interlace enable bit 43 double interlace draw line 43 draw forced termination register 51 draw command eese 109 draw mode word sese 79 draw procedure flow 2222 28 draw end command sss 132 dropout processing 9 E ate E AEE 70 71 end code disable sss 86 erase amp change manual mode 40 erase manual mode sss 39 erase write 46 43 even odd coordinate selection 44 F fete his tee eet bois ees bete edad 29 fetch status of end 52 fill data erase 1 46 fill in polygons 10 fixed point zoom point sss 73 flow of command tables 30 flow of draw procedure 28 saucia pee EON 38 frame buffet eene 2 20 frame buffer change mode bit 38 frame buffer change mode register 38 frame buffer change trigger bit 38 G Gouraud shading 64 95 Gouraud shading table 26 64 106 H half Iuminance sese 95 hialt transpateribu 95 EIDEM 0st hit eet eie eS Reus 37 high resolution
106. ler IC gt drawing When access from the system controller is performed during drawing drawing is interrupted and must wait Therefore this situation should be avoided as much as possible Because drawing and access of the CPU are not performed together perform control by using a method that uses a manual start for drawing start Access can be performed using word access Byte access is only possible when display is 8 bits pixel Do not use byte access when display is 16 bits pixel The entire frame buffer can be displayed rotated by reading the frame buffer diagonally Also by skipping or repeating read addresses the entire frame buffer plane can be enlarged or reduced Rotation enlargement and reduction can be performed simultaneously Rotation is specified from the VDP2 Refer to the VDP2 instruction manual for more information about the specification of rotation 20 Frame Buffer Plane The coordinates of the frame buffer plane are as follows Coordinates increase in value toward the lower right X 1024 lt X lt 1023 Y 1024 lt Y lt 1023 Operation cannot be guaranteed when specified values exceed these values Normal HDTV display area X High resolution display area iNormal amp double interlace display area High resolution amp double interlace display area Figure 2 2 Frame Buffer Plane As shown in Figure 2 2 parts can be positioned outside the display screen However nothing is written f
107. lp to plot mode word 04 in the command table Total 163 pages Introduction This manual explains the functions of the VDP1 and how they are used The VDP1 primarily defines draw data and performs drawing Definitions The terms used in this manual are defined as follows VDP1 VDP1 is an integrated circuit IC that controls drawing The and frame buffer both DRAM are connected to the VDP1 The CPU writes draw commands to VRAM via the VDP1 The VDP1 reads draw commands from and writes draws draw data to the frame buffer and later transfers this data to a display monitor The frame buffer is a bit mapped memory and any data written to it has a 1 to 1 correspon dence with the contents of the display screen Therefore the frame buffer is a map of the dis play screen There are system registers in the VDP1 and screen display is controlled by setting values in these registers Display Televisions are commonly used as display devices The standard used in Japan and in the United States is NTSC PAL system TVs are used in Europe Hi res is a high resolution mode that doubles the horizontal resolution 31KC is a system that doubles the horizontal frequency of 15KC in order to raise the vertical resolution Hi vision HDTV or so called high definition TV has twice the horizontal and vertical resolution of regular TV A TV display is comprised of fields and frames A field is the time it takes a scannin
108. lt YA upper left coordinate A System clipping area Figure 7 2 User Clipping Settings User clipping disabled upper left coordinate A lower right coordinate C User clipping area Since user clipping is disabled the inside of the System clipping area is drawn TV System clipping area b Inside drawing mode User clipping area When user clipping is enabled and the inside drawing mode is set the inside of the user clipping area is drawn System clipping area c Outside drawing mode VDP1 User s Manual TV d Setting prohibited Ex User clipping area When user clipping is enabled and the outside drawing mode is set the area inside the System clipping area and outside the user clipping area is drawn System clipping area User clipping area Be sure to set the user clipping area inside the system clipping area Operation cannot be ensured when it is set outside the system clipping area System clipping area Figure 7 3 User Clipping 115 7 3 Local Coordinate Set Command The local coordinate set command makes the coordinates specified by the draw command local coordinates and then makes them drawing coordinates by adding the value specified by the local coordinate command When the command selection bits are 1010B the local coordinate set command is enabled The contents of the command table are as shown in the following figure bit 4 09 8 6 4 0 CMDC
109. lue is indicated by a complement of 2 Extend the code with the upper 6 bits bt 15 14 19 12 1l 10 9 8 7 6 5 4 i A Table 8 6 Correspondence between Commands and CMDXA CMDYD CMDYA CMDYB CMDYC CMDYD Normal sprite draw command Vetex Scaled sprite draw for two points Vertex A Vertex C Vertex D two methods Specify zoom Display width 57 1 coordinates Distorted sprite draw command Vertex A Vertex A B C D Polygon draw command Vertex B Vertex C Vertex D Polyline draw command Vertex A Vertex B Vertex C Vertex D Vertex A Vetex B Lower right eie coordinates coordinates System clipping coordinate set Lower right ME command coordinates Local coordinate set Localcoordinates Note indicates unused CMDGRDA Gouraud Shading Table bit 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 CMDGRDA 41CH Gouraud shading table 8H 150 8 4 Commands System Clipping Coordinate Set Command bit 15 1413 121110 9 87 65 4 32 10 o 9 99 9 9 o ro 9 CMDLINK 5 Link specification 8H Lower right Coordinate 0EH T System clipping area 12H 000000 Lower right X coordinate XC Upper left coordinates CMDYC 416H 0 00000 OlLower right Y coordinate are fixed at 0 0 18H 1AH 1CH N
110. may result from applications based on the examples describe herein It is possible that this document may contain reference to or information about SEGA products development hardware software or services that are not provided in countries other than Japan Such references information must not be construed to mean that SEGA intends to provide such SEGA products or services in countries other than Japan Any reference of a SEGA licensed prod uct program in this document is not intended to state or simply that you can use only SEGA s licensed products programs Any functionally equivalent hardware software be used instead SEGA will not be held responsible for any damage to the user that may result from accidents or any other reasons during operation of the user s equipment or programs according to this document NOTE A reader s comment correction form is provided with this document Please address comments to SEGA of America Inc Developer Technical Support att Evelyn Merritt 150 Shoreline Drive Redwood City CA 94065 SEGA may use or distribute whatever information you supply in any way it believes appropriate without incurring any obligation to you 6 27 95 002 SEGA SEGA OF AMERICA INC Consumer Products Division VDP1 User s Manual Doc ST 013 R3 061694 1994 95 SEGA All Rights Reserved READER CORRECTION COMMENT SHEET Keep us updated If you should come across any incorrect o
111. mode which uses a color lookup table and the RGB mode which specifies the luminance directly In the color bank mode the color can be selected from among 16 64 128 or 256 colors depending on the number of bits of the pixel data In the lookup table mode the color can be selected from among 16 colors And in the RGB mode 32 768 colors can be drawn The color mode bits are described in the following table Colormode mode d PUPPES Mode Number of Mode pixel Bit 5 colors 16 OColerbankmode 2 bank mode 4 4bits rarum Gator bankmode SEDI LEE L3 992 88 LOT s p wm meme i Setting prohibited do not set VDP1 User s Manual 89 Character Patterns in Each Mode Character patterns are stored in VRAM in each mode An example is shown that is 8 horizontal pixels and 1 vertical pixel Mode 0 This is the 16 color color bank mode Color is expressed using palette codes and a color bank One pixel is represented by 4 bits 16 colors can be drawn 4 bytes are necessary to express 8 pixels The data for 2 pixels are contained in 1 byte and when there is no horizontal inversion the upper 4 bits represent the left pixel and the lower 4 bits represent the right pixel The palette code is represented by 4 bits and the upper 12 bits are the color bank added from the color bank word top address 06H of command table resulting in 16 bit data being written to the frame buffer
112. n refer to section 4 2 Frame Buffer Change Mode Register TVM settings must be performed from the second H blank IN interrupt after the V blank IN interrupt to the H blank IN interrupt immediately after the V blank OUT interrupt 36 The function of each bit is as follows Bit2 HDTV enable bit 0 2 NTSC PAL 1 HDTV 31KC Bit1 Frame buffer rotation enable bit 0 2 non rotation 1 rotation Bit 0 depth selection bit 0 16 bits pixel 1 8 bits pixel Table 4 2 Screen Modes Frame TVM Screen Mode buffer VDP CLK MHz Bit width screen Interlace NTSC PAL size 320x224 26 8426 26 6564 NTSC PAL 320x240 26 8426 26 6564 352x224 28 6364 28 4375 352x240 28 6364 28 4375 High 640x224 26 8426 26 6564 resolution 640x240 26 8426 26 6564 NTSC PAL Hi 704x224 28 6364 28 4375 704x240 28 6364 28 4375 Rotation 16 320x224 26 8426 26 6564 5 PAL 320 240 26 8426 26 6564 Rotation 352x224 28 6364 28 4375 352x240 28 6364 28 4375 Rotation 8 NTSC 320 224 26 8426 26 6564 PAL 320x240 26 8426 26 6564 Rotation 352x224 28 6364 28 4375 352x240 28 6364 28 4375 31 HDTV 352x240 28 6364 28 4375 Setting prohibited do not use VDP1 User s Manual 37 4 2 Frame Buffer Change Mode Register The frame buffer change mode register FBCR frame buffer change register controls drawing and display change of the frame buffer as well as double interlace drawing It is a 16 bit read only register at
113. n and twist can be specified when drawing the character pattern by the specification of vertex A vertex B vertex C and vertex D When two vertices are set at the same coordinates a polygon is drawn as a tri angle When four vertices are set at the same coordinates the polygon is drawn as one pixel VDP1 User s Manual 127 7 8 Polyline Draw Command The polyline draw command draws quadrangles in the frame buffer The inside of the quadrangle is not filled When the end bit is 0B and the command selection bits are 0101B the polyline draw command is enabled The contents of the command table are shown in the following figure bit 15 14 13 121110 98 76 54 321 0 CMDCTRL 400 000000 0101 Polyline SEN 02 Link specification 8 4 00 CMDPMOD H ompcoLr 10 0 of 1 1f 0 0 05 cason H Non textured color 08 CMDXA CMDYB Frame buffer di A 14 Vertex C X coordinate XC em 16 Vertex C Y coordinate 418 Vertex D X coordinate XD CMDYD Vertex D Y coordinate YD NOTE is ignored The polyline draw command is defined as follows e When the end bit is set to OB and the command selection bits are set to 0101B the polyline draw command is enabled e The jump mode is then specified When the jump mode is assigned or called the address of the command table to be processed next is divided by 8H and set in CMDLINK
114. n erase write is completed The number of pixels that can be used in V blank erase is given by number of pixels in 1 raster 200 x number of rasters in 1 field number of display rasters The respective values are shown in Tables 4 4 and 4 5 Table 4 4 Number of Rasters and Number of Pixels Screen mode Number of horizontal Number of pixels in Number of rasters in pixels 1 raster 1 field VDP1 User s Manual 49 Table 4 5 Number of Pixels that Be Used V Blank Erase in Non Interlace Display horizontal x vertical be used NTSC WA 50 NM 4 5 Draw Forced Termination Register The draw forced termination register ENDR forces termination of drawing It is a write only 16 bit register at address 10000CH ENDR bit 15 14 13 12 11 10 9 10000CH o Jo Jo Jo Jo To 19 10 19 19 19 15 10 19 TOTO Write only Draw Forced termination draw end e Forces termination of the drawing currently being processed e Forces termination of the drawing in the frame within approximately 30 clock cycles after the data is written to the register e Specify 0000H for the write data e Interrupted drawing cannot be resumed e When the amount of data drawn is large and cannot be drawn in one frame a pseudo draw continuation is used to divide the data into two parts and draw it This draw forced termination is used to terminate drawing during this pseudo draw continuation For more information refer to section 4 8 Curr
115. n the case of lines only vertices A and B are valid and correspond to the start and end of the line In the case of sprites vertices A B C and D correspond to the upper left upper right lower right and lower left This table is referenced when Gouraud shading processing is specified Table 5 2 Gouraud Shading Table Table address XI _ B hee roa Note The MSB 1 bit is ignored Figure 5 4 RGB Code Format Gouraud Shading Gouraud shading can be performed on parts drawn in RGB code Gouraud shading specifies the amount of change in the luminance of each of and B which are changed in RGB code parts in a Gouraud shading table It is only effective on RGB color codes The color cannot be guaranteed when Gouraud shading is specified for color bank color codes Gouraud Shading Specification Gouraud shading is specified with color calculation bits The color calculation bits are at bits 2 0 of the draw mode word at the top address 04H of the command table When Gouraud shading is specified the address of the Gouraud shading table is specified The top address 8H of the Gouraud shading table is positioned at the top address 1CH of the command table E 64 Gouraud Shading Processing This specifies the data for the amount of change in R G and B for the four points two points in the case of lines of the part in the Gouraud shading table The data interpolated for e
116. nable DIE bit 3 Double Interlace Draw Line DIL bit 2 Interlace mode Draw after next frame change Non interlace single interlace Draw all lines Double interlace Only even numbered EVEN lines drawn drawn Even Odd Coordinate Select Bit EOS bit 4 EOS Even odd coordinate select bit Samples only pixels at even coordinates Samples only pixels at odd coordinates VDP1 User s Manual 135 Plot Trigger Register PTMR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100004H 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PTM Write only Plot Trigger Mode PT bits 1 0 Bt 0 Drawing mode 0 ldleat frame change 0 1 Starts drawing when OTB is written 1 0 Starts drawing automatically with frame change Setting prohibited do not set Erase Write Data Register EWDR 100006H bit 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 16 bits pixel Erase write Data 8 bits pixel Erase write data for even X coordinates Erase write data for odd X coordinates Write only Erase Write Data bits 15 0 136 Erase Write Upper Left Coordinate Register bit 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 100008H 0 Upperleft coordinate X1 Upper left coordinate 1 Write only Erase Write Upper Left Coordinate X1 bits 14 9 Erase Write Upper Left Coordinate Y1 bits 8 0 Erase Write Lower Right Coordinate Register EWRR bit 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 10000AH Lower right coordinate X3 Lower rig
117. nd Not esticed Bees Not restricted 0 __ Half luminanoe of restricted Ooo Color calculation Background Original Not restricted 1 2 Half transparent RGB Not restricted rl do not set Gouraud Gouraud shading RGB PEU 51 Raumes 8 IE ems sot restricteo Gouraud Gouraud shading half transparent RGB RGB Notes doesn t matter Original graphic sprite or pixel data to be drawn in non textured color Background pixel data already drawn in the frame buffer lOriginal graphic transparent pixels end code is referenced 2Data that has undergone saturation processing after Gouraud calculation is reduced by half Background is added to data that has undergone saturation processing after Gouraud calculation is reduced by half Not restricted Replace Color Calculation Mode 0 Color calculation is not performed for replace Parts to be drawn are written as is to the frame buffer Pixel data already written to the frame buffer are not affected Color calculation cannot be performed when there are 8 bits pixel so replace should be specified Shadow Color Calculation Mode z 1 Processing differs depending on the MSB of the pixel data already written to the frame buffer When the MSB of the frame buffer is 0 processing of color calcula tion including replace is not performed and the frame
118. nds draws parts and processes clipping The commands as follows Draw commands These are divided into texture drawing and non texture drawing Texture drawing includes normal sprite scaled sprite and distorted sprite draw commands Non texture drawing includes polygon polyline and line draw commands Draw commands draw these parts Clipping coordinate set commands Includes user clipping and system clipping coordinate set commands and they set the draw area for parts Local coordinate set commands Specifies the definition of the parts draw coordinate by the local coordinate Draw end command Terminates drawing The size of the command table is 1EH 30 bytes and its boundary is 20H 32 bytes Each command is read to the VDP1 and is processed This operation is referred to as fetching e Fetching of the command table is performed from the top address 000000H of VRAM and the next command table is fetched according to the specification of the jump mode According to the command table specification the color lookup table Gouraud shading table and character pattern table are referenced after the command table VDP1 User s Manual 25 Color Lookup Table This is a table in which 16 bit color codes for 16 colors are defined in VRAM When a lookup table method is used for the color mode according to the texture draw command the table is referenced as color data The pixel data of character patterns is conve
119. ng Distorted sprites includes rotation Polygons quadrangles Polylines quadrangles comprising four lines Lines Collectively sprites are referred to as textured parts and polygons polylines and lines are referred to as non textured parts Color The possible numbers of colors for each textured part are 16 64 128 256 and 32 768 Special Functions When RGB codes are used color calculation of half Iuminance half trans parency Gouraud shading and shadowing are possible Mesh tiling Coordinate Control System and user clipping settings are possible Local coordinates be set during drawing Frame Buffer Display Control Enlargement reduction and rotation of the entire frame buffer screen Specification of the TV display mode Specification of the frame buffer change mode the change trigger and the plot trigger Specification of double interlace Specification of fill area and fill data during erase write End status of transfer to the frame buffer as help information during pro gram development VDP1 User s Manual 3 Parts Parts are classified as shown in Table 1 1 Table 1 1 Classification of Parts Classification Part name How defined Normal Character vertical and 1 vertex and direction of sprites horizontal inversion readout Parts Textured parts Scaled Character vertical and 2 vertices and direction of sprites horizontal inversion readout or zoom poi
120. ng therefore the TV display mode must be set The unused bits must be set to 0 bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 10000 0 0 oJjoJjojoj ojoy oj oj o Write only V Blank Erase Write Enable VBE bit 3 e When VBE 1 erase write is performed during V blank VBE 1 can only be set when FCM 1 and FCT 1 are written For more information refer to section 4 2 Frame Buffer Change Mode Register When VBE is set to 0 or 1 TVM of the same value before making the setting must be set at the same time The VBE setting must be set immediately after the V blank IN interrupt Access is prohibited from the first H blank IN interrupt after the V blank IN interrupt until the next H blank IN interrupt TV Mode Select bits 2 0 e Specifies the TV display mode For more information about the coordinate values of the displayed area refer to Screen Mode and Display Areas in section 1 2 When 010B 2 the frame buffer has only 512 x 256 pixels and therefore if the screen is greatly inclined a transparent area occurs in the display screen Since only non interlace is possible when HDTV is specified TVM 100B 4 and only non interlace and single interlace are possible when rotated display is speci fied TVM 010B 2 011B 3 the frame buffer change mode register must be set to double interlace disable DIE bit 0 For more informatio
121. nge 1 0 Display X Draw erase write 4 Um Ime 1 0 Draw Displa mode 5 I LEN 2 2 LEN erase write LINER erase write Notes lvalue written to register immediately after the V blank OUT interrupt 2Changes from the first of the field 3Changes from the 1 cycle mode to the manual mode with change Be sure to continue to specify erase amp change Specify erase in the field immediately before changing to the 1 cycle mode VDP1 User s Manual 41 Table 4 3 b Example of Use of Frame Buffer Change Mode VBE Is Used Vakie we written to E FB Change Mode ET WP Display Erase Write 1 cycle mode 60 frames second Write Timing Manual change CPU processing Changes from 1 cycle mode to manual mode with change Write dissbied Avoid access enable withou waiting for interrupt lt Manual erase amp change Cancel V Blank erase Write immediately after interrupt Write 25 Desired frames second Manual erase amp change Cancel V Blank erase Manual erase amp change Avoid access disabl without waiting for interrupt and write H ilf Note Indicates write enabled Cancel V Blank erase Manual erase lt
122. nt width enlargement and reduction and direction of readout stretching Distorted Character vertical and 4 vertices and direction of sprites horizontal inversion readout enlargement and reduction stretching rotation twisting Non Polygons Filled quadrangles textured parts Lines Straight lines Starting vertex and ending vertex Textured Parts Textured parts are called sprites Sprites draw character patterns Character patterns define pixel data as character pattern tables in VRAM The size of the pixel data is determined by the color mode and the size of the characters Sprites include normal sprites scaled sprites and distorted sprites Normal sprites can be inverted vertically and horizontally scaled sprites can be inverted vertically and horizontally enlarged and reduced and stretched and distorted sprites can be inverted vertically and horizontally enlarged and reduced stretched rotated and twisted Normal Sprites The character pattern is drawn at a specified position The coordinates of the upper left vertex at which the character pattern is drawn are specified The character pat tern is drawn from the specified coordinates to the right in the X direction and down in the Y direction When vertical and horizontal inversion are specified for the read out direction of the character pattern the right side of the defined character pattern is drawn from the left and the bottom side is drawn from the top Normal
123. ntal inversion right to left Figure 6 10 a End Code Processing 1 of 2 Since drawing is not allowed toward the outside from the end code when read from the left or right place only a transparent pixel there Therefore when ECD 0 SPD must equal 0 Do not use the combination ECD 0 and SPD 1 The drawing direction may be inverted by pre clipping When using end codes in the original picture do so as shown below Place only transparent pixels toward the outside of end codes Place one end code each at the right and left of pictures made up of non transparent pixels lt q Even if transparent pixels are included inside only one end code each is placed to the far outside Two end codes are placed at either end of lines comprising all transparent pixels 0123456789 ABCDEF Transparent pixel E End code Other pixels End codes are not placed in lines in which either both ends or one end is not a transparent pixel Figure 6 10 b End Code Processing 2 of 2 VDP1 User s Manual 87 Transparent Pixel Disable Transparent Pixel Disable SPD bit 6 This bit specifies whether or not the transparent pixel of the character pattern is disabled When it is 0 the transparent pixel is enabled when it is 1 the trans parent pixel is disabled The transparent pixel disable bit is only valid for drawing sprites with a character pattern Be sure to set this bit to 1 fo
124. ode Note The shaded areas represent color bank code 100 Color Lookup Table Defines the address of the color lookup table e When the color mode is the lookup table mode the 4 bit data of the character pattern of textured parts is converted to 16 bit pixel data by referencing the color lookup table and is written to the frame buffer The color lookup table defines 16 bit color codes for 16 colors The 16 bit data in the table is written as is to the frame buffer and therefore there is no distinction between palette bank code and RGB code in the character pattern of textured parts When read to the VDP2 the code is handled as color bank code when the MSB of the 16 bits is 0 and as RGB code when it is 1 The color lookup table address defines the address 8H of the color lookup table Because the color lookup table is defined with 20H byte boundaries the two LSBs of the lookup table address are fixed at 00 16 color color lookup table Character pattern specified by table address Frame buffer 00H 16 bit data OHcolor code 02H 16 bit data 1Hcolor code 404H 16 bit data 2Hcolor code Defined 4 bit data E Drawn 16 bit data 41CH 16 bit data EHcolor code 1EH 16 bit data FHcolor code The 16 bit data of the color lookup table selected with the 4 bits of the character pattern is written as is to the frame buffer as pixel data Figure 6 18 Color Lookup Table VDP1 Use
125. okup Tables The color lookup table is used to specify the color of the pixels of the character pattern in the lookup table mode The color lookup table defines the respective color codes of 16 colors in VRAM as 16 bit data In the lookup table mode character patterns are defined in the character pattern table in 4 bits pixel and 1 color of the 16 colors defined as 4 bit data in the color lookup table is selected The 16 bits of the color code of the selected color are written to the frame buffer as is as the color code of the pixel The size of the color lookup table is 20H 32 bytes The table should be written from the boundary addresses of 20H byte units in VRAM However 00000H cannot be defined VRAM occupies up to address 7FFFFH Do not define color lookup tables beyond address 80000H The data written to the color lookup table can be either color bank code or RGB code If RGB code MSB 0 If color bank code MSB 0 if RGB code is mixed and MSB can be either 0 or 1 if RGB is not mixed Set MSB to match data processing by the VDP2 16 bit data color code of OH 16 bit data color code of 1H 16 bit data color code of 2H 16 bit data color code of EH 16 bit data color code of FH Figure 5 2 Color Lookup Table Lookup Table Mode The color mode is set to the lookup table mode by the sprite draw command Ac cording to this specification the character patterns stored with 4 bits pixel are converted to
126. omp 00000 Perit 10 9 f 8 code Zoom point E 0 0 0 Specifiestwocoordinates 0 1 o 1 J 5H Upperlet_ 5 2 amp Z7 0 1 1 o 6H Upper center 1 1 1 7H gt 1 o 0 1 9H 1 J o 1 o AH Center center 0 4 7 1 o 1 J 1 BH RP L 1 1 o 1 DH flowerlef 3 w O 1 1 1 J 0 EH Lower center Character Read Direction Dir bits 5 and 4 144 Inversion processing 0 0 Notinverted 0 1 Inverted horizontall 1 0 Inverted verticall Inverted vertically and horizontall AN Command Select Comm bits 3 0 Table 8 3 Commands __ 0 cf Biti5 312 1 0 Function Command Textured draw Normal sprite draw command 0031 10111 command Scaled sprite draw command Distorted sprite draw command 0 1 1 0 0 commands Non textured draw Polygon draw command 1 command Polyline draw command EN Coordinates Clipping User clipping coordinates set commands commands System clipping coordinates set command ERES 0 0 0 O Enddraw command Setting prohibited do not set CMDLINK Link Specification bt 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 MDLINK 02H Link specification 8H 0 0 VDP1 User s Manual 145 CMDPMOD Draw Mode Word bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 CMDPMOD won o jHSS Pep cip Jones
127. or parts that exceed the range of the frame buffer plane VDP1 User s Manual 21 Pixel Data Frame Buffer The pixel data in the frame is shown below There is 16 bit and 8 bit data RGB data which does not go through the color RAM in the VDP2 is only 16 bit data When all bits are 0 the dot is treated as a transparent dot by the VDP2 Bit configuration when data goes through color RAM color RAM address 16 color models aa 22 exo ve xe w7 xe f 5 s 2 4 bits pixel Color bank Character data 64 color mode 15 2 fon exo J xo be vv f vo xs vs xe wx vo 6 bits pixel Color bank Character data 128 color mode e15 p12 ens bio xe qve by xo ra 2 00 7 bits pixel Color bank Character data 256 color mode rss Tz es Too B7 T4 T 8 bits pixel Color bank Character data Note b15 0 when RGB data are mixed b15 can be either when not mixed Bit configuration when data do not go through color RAM RGB data RGB mode 1 2 ono o xe f ee o o o 16 NL ALMA BLUE data GREEN data RED data Bit configuration when pixel data is 8 bit color RAM address 16 color mode ir oe 5 o es o Eo 4 bits pixel WW MlM Color bank Character data 64 color mode ee s o s 2 ot 6 bits p
128. ords and the table is defined with 8H byte boundaries Chapter 7 lt Contents 7 1 System Clipping Coordinate Set Command 110 System 111 7 2 User Clipping Coordinate Set Command 112 User Clipping 2 4 442 244 000 113 7 3 Local Coordinate Set Command sss 116 Focal Goordiriates e tcr e f x Rd 117 7 4 Normal Sprite Draw 118 7 5 Scaled Sprite Draw 120 Specification of Two Coordinate Points 120 Specification of Zoom 122 7 6 Distorted Sprite Draw Command 124 7 7 Polygon Draw 126 7 8 Polyline Draw 128 7 9 Line Draw Command esses 130 710 Draw End Command sse 132 VDP1 User s Manual 107 108 Page 108 was blank in the original document Commands determined the end bit and the command selection bits Table 7 1 lists the commands Table 7 1 Commands 5121115 1 Coordinate Clipping User clipping coordinate set set coordinate command commands set commands System clipping coordinate set command SER TTP
129. ote is ignored User Clipping Coordinate Set Command bit 15 1413121110 9 87 6 5 4 2 10 CMOCTRL ve o0 0 0 0 00 o 100 0 0 CMDLINK 4 02H Link specification 8H 0 TT coordinate 04H TV 06H zy 0 14 oculo 0 0 0 of Upper left X coordinate User clipping area 0 0 00 0 oOJUpper eft Y coordinate YA 10 12H CMD XG 0 0 0 0 0 0 Lower right X coordinate XC CMDYC 4Q1eH 0 0 0 0 OfLower right Y coordinate YC 18H 1AH 1CH Note is ignored VDP1 User s Manual 151 Local Coordinate Set Command bit 1514131211109 87654 32 10 CMDCTRL oplo JP jo0000000 t0 10 CMDLINK 402H Link specification 8H 0 O 0 0 04H 06H 08H 0AH CMDXA 40CH Local X coordinate XA CMDYA Local Y coordinate YA 10H 12H 14H 16H 18H 1AH 1CH Local coordinate A System clipping area is ignored Normal Sprite Draw Command bit 1514131211109 8 765 4 32 1 ld uP oooooo Dirloo o Normal sprite CMDCTRL 00H Link specification 8H ieee canon et of Pep em CMDCOLR en Color bank lookup table 8H LSB fixed at a CMDSRCA 08H CMDSIZE 0 0 0 Character size 8 Character size _ CMDXA CMDYA 40EH 10H 12H 14H 16H 18H Gouraud shading table 8H 1CH Note E is ignored MO MON HS HSS Pc Pclp CI Clip Cm Cmod Me Mesh EC CD and
130. ough and pseudo draw continuation is used to divide the data into two parts and to draw it Pseudo draw continuation is performed using the following procedure Drawing is terminated at which time the top command is written so that it jumps to the address of the table whose processing was terminated at that time and the plot trigger mode is set to start drawing PTM 01B when it is written As much drawing is performed as possible in the time of one frame at which point drawing is terminated interrupted by the CPU Next the CPU writes the jump destination in the top command in VRAM to the command table address at the time of termination and drawing is immediately started by the plot trigger mode PTM 01B This is how pseudo draw continuation is done However drawing cannot be continued when the command table address is in the subrou tine at the time of a forced termination In this case the drawing times necessary to transfer the respective pixel data to the frame buffer are set shorter than the time to the end of the frames When color calculation of half transparent is being performed at the time of an forced termination of drawing it is possible that dots may occur for which half transparent processing is performed twice color calculation is performed twice when drawing is continued using the above method A forced termination of drawing must be performed when color calculation of half transparency is not performed 56
131. over status When transfer over has occurred it is necessary to reduce the drawing commands or to reduce the pixels drawn When there is no draw terminate command VRAM or when there is one and it is defined by a jump mode such that it cannot be fetched this bit remains at 0 This bit is written with the value of the CEF value when the frame buffer is changed or at the start of drawing and is maintained until the next frame buffer change VDP1 User s Manual 53 4 7 Last Operation Command Address Register The last operation command address register LOPR indicates the command table address processed at the end of the previous frame It is a 16 bit read only register at address 100012H LOPR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100012H Last operation command address 8H 0 0 Read only Last Operation Command Address bits 15 0 When the frame buffer is changed the value resulting from dividing the address of the command table read to the VDP1 from the by 8H is written to this register This register is updated when the frame buffer is changed so it is possible to know the address of the command table last processed in the previous frame Because the boundary of the table address is 20H bytes the lower 2 bits of the register are fixed at 00B Frame buffer Parameters Parameters Command read Address Table address To current operation command address To last operation command ad
132. r bank method the color lookup table method or the RGB code method can be used to set the color of sprites Set a non textured color for each non textured part such as polygons polylines and lines Color Lookup Table The color lookup table references the 4 bit graphic data to a 16 color lookup table and converts it to 16 bit data Because the 16 bit data in the table are written as is to the frame buffer there is no distinction between color bank codes and RGB codes for textured data When read to the VDP2 the code is handled as a color bank code when the MSB of the 16 bit data is 0 and as an RGB code when the MSB is 1 Non textured Color Non textured color is handled as pixel data without the use of a color bank or color lookup table 8 Bits Pixel Color When using high resolution or specifying a bit width of 8 bits pixel for a rotated frame buffer the graphics will be written to the frame buffer in 8 bits pixel When there are 8 bits pixel the lower 8 bits are written to the frame buffer when using color lookup table or non textured color In either case the lower 8 bits of the 16 bits are written to the frame buffer This will be abbreviated as 8 bits pixel high resolu tion or rotation 8 VDP1 User s Manual 13 1 2 Screen Modes Screen Modes and Display Areas Table 1 2 shows the screen modes and the coordinate values displayed in each Table 1 2 Screen Modes and Display Areas X Xrage Screen mode pix
133. r calculation is performed on sprites or non textured pixel data to be drawn and on pixel data already drawn in the frame buffer Except for color calculation of replace and shadow color calculation can only be performed when the color code of the original picture is RGB code Color calculation can be executed when the color code is color bank code but the results are not guar anteed In the case of sprites color calculation can be performed when the color mode is mode 1 lookup table mode and the color code of the color lookup table is RGB code or when the color mode is mode 5 RGB mode Color calculation can be per formed for non textured colors when the color code is RGB code In color calculation of parts with an original picture the transparent code is valid when SPD 0 and the end code is valid when ECD 0 and therefore color calcula tion cannot be performed on those pixels Color calculation for polygons polylines and lines is enabled only when the non textured color is RGB code Color calculation cannot be performed when there are 8 bits pixel high resolution or rotation 8 VDP1 User s Manual 93 Color Calculation Color calculation includes replace shadow half luminance half transparent Gouraud shading and the combination of half Iuminance with Gouraud shading and half transparent with Gouraud shading These are specified as follows Type of color Usable modes Background calculation Original graphic Backgrou
134. r outdated information while reading through the attached document or come up with any questions or comments please let us know so that we can make the required changes in subsequent revisions Simply fill out all information below and return this form to the Developer Technical Support Manager at the address below Please make more copies of this form if more space is needed Thank you General Information Your Name Document number ST 013 R3 061694 Document name VDP1 User s Manual Corrections Questions comments Where to send your corrections 415 802 1717 Mail SEGA OF AMERICA Attn Evelyn Merritt Attn Evelyn Merritt Developer Technical Support Developer Technical Support 150 Shoreline Dr Redwood City CA 94065 REFERENCES In translating creating this document certain technical words phrases were interpreted with the assistance of the technical literature listed below 1 Dictionary of Science and Engineering 350 000 words 3rd Edition Inter Press Tokyo Japan 1990 2 Computer Dictionary Kyoritsu Publishing Co LTD Tokyo Japan 1978 3 IBM Dictionary of Computing McGraw Hill Inc New York New York 1994 Revision History Revision 7 1 December 6 1993 Minor corrections Total 155 pages First Edition February 20 1994 e Added even odd coordinate selection bit EOS to frame buffer change mode register FBCR Added high speed shrink HSS and pre clipping disable Pc
135. r polygons polylines and lines When the transparent pixel is enabled SPD 0 transparent color codes in the character pattern become transparent pixels and are not drawn When the end code is disabled SPD 1 the transparent color code is processed like other color codes When the transparent pixel is enabled SPD 0 the number of colors that can be used decreases by one so use caution For example only 14 colors can be displayed when ECD 0 SPD 0 and color mode 0 Transparent pixel enable transparent color codes are not E drawn transparent color codes become transparent Transparent pixel disable transparent color code is not processed color of code is expressed The relationship between the color mode and the transparent color code is as fol lows The number of bits of the transparent color code differs depending on the color mode _ Transparent color code 0 16 colors color bank mode JOH 4 bits 128 colors color bank mode 8 bits 256 colors color bank mode 8 bits 32 768 colors RGB mode 0000H 16 bits 88 Color Mode Color Mode Bits bits 5 3 These bits specify the method by which the number of colors to be drawn is ex pressed It is only valid for sprites Set the color mode to 000B for non textures The possible color modes include the color bank mode which specifies the color with a palette code and a color bank the lookup table
136. r s Manual 101 Non Textured Color e Non textured color defines the color of non textured parts In the case of a non textured part the non textured color is written as is to the frame buffer as pixel data Non textured colors are not related to transparent color codes and end codes e When the display mode is 8 bits pixel the lower 8 bits become valid Only palette bank codes can be specified at this time When color calculation except shadow is performed on non textured parts be sure to set RGB code for the non textured color 102 5 6 5 CMDSRCA Character Address CMDSRCA specifies the address that defines the character pattern CMDSRCA is valid for texture draw commands The address is specified with 16 bits at the top address 08H of the command table Set unused bits to 0 bt 15 14 13 12 11 109 8 7 6 5 4 3 2 1 MDSRCA s d Character address 8H 0 0 e Specifies an address that defines the character pattern drawn by the texture draw command This is an address in VRAM of the character pattern to be drawn and the value resulting from dividing the address by 8H is specified with 16 bits The character address specifies the top address at which the pixel data of the defined character pattern is stored The pixel data of the upper left point of the character pattern is at the top address Even if the character is rotated or inverted horizontally or vertically the address of the upper left point of the def
137. rdinate 47 Erase Write Upper Right Coordinate Register 47 4 5 Draw Forced Termination Register 2 51 4 6 Transfer End Status 52 4 7 Last Operation Command Address Register 54 4 8 Current Operation Command Address Register 55 4 9 Mode Status Register BE MER 57 Tables esso e Reese 59 5 1 Character Pattern 000 40000 0 60 5 2 Color Lookup Tables 2 lt 62 5 3 Gouraud Shading Table 5555 64 5 4 Command Tables 1 lt 66 Command Tables nsa Toon 69 6 1 CMDCTRL Control Words ssssssssssessseeeeeneen nennen nnne 70 7 NNI cipe e ede a herb e rada 71 Jump 72 ZOOM POW te T 73 Character Read Direction 77 6 2 CMDLINK Link Specification sssseeeeeenennnns 78 6 3 CMDPMOD Draw Mode Word sss 79 High Speed Shrink 0 0 eee ce
138. rdinate YC 74 Drawing Area The zoom point coordinates are specified by CMDXA and CMDYA The zoom point specified by the Zoom Point ZP is drawn at the zoom point coordinates The zoom point becomes the reference point when zooming the character The display width is specified by CMDXB and CMDYB The display width becomes the size drawn The area in which the character is drawn is determined by the zoom point bit zoom point coordinates and the display width When the zoom point coordinate is XA YA and the display width is XB YB the drawing area is as shown in Figure 6 2 Left side is zoom point left side right side XA XB Center is zoom point left side XA XB 2 right side XA XB 1 2 Right side is zoom point left side XA XB right side XA Top side is zoom point top side YA bottom side YA YB Center if zoom point top side YA YB 2 bottom side YA YB 1 2 Bottom side is zoom point top side YA YB bottom side YA Values to the left of the decimal point are rounded off VDP1 User s Manual Figure 6 2 Drawing Area 75 Zoom Point and Drawing Area When the zoom point coordinates are 100 50 and the display widths are 40 30 the coordinates for each of the vertices are as follows A sprite for which vertical or horizontal inversion is not specified is assumed In this case vertex A is 100 50 and vertex C is 140 80 when the zoom point ZP
139. resetting and therefore the fill data must be set EWDR 100006H bit 15 14 13 12 11 10 9 8 7 6 Om 4 2 1 0 16 bits pixel Erase write data 8 bits pixel Erase write data for even X coordinates Erase write data for odd X coordinates Write only Erase Write Data bits 15 0 When parts are written to the frame buffer the VDP1 automatically erases the frame buffer At the time of this erase write the frame buffer is filled with the 16 bit data set in the erase write register Erase write is performed 2 pixels at a time when the frame buffer depth is 8 bits pixel The area of erase write is set by the erase write left coordinate register and the erase write right coordinate register 46 Erase Write Upper Left Coordinate Register The erase write left register EWLR sets the upper left coordinate of the erase write area It is a 16 bit write only register at address 100008H Its value becomes undefined after powering on or resetting and therefore the coordinates must be set Set unused bits to 0 bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100008H 0 Upper left coordinate X1 Upper left coordinate 1 Write only Erase Write Upper Left Coordinate X1 bits 14 9 Erase Write Upper Left Coordinate Y1 bits 8 0 Erase Write Upper Right Coordinate Register The erase write right coordinate register EWRR sets the lower right coordinate of the erase write area It is a 16 bit write only register at address 10000AH I
140. rmed by specifying the upper left coordinates and the lower right coordinates Fix the zoom point to 0H for sprites other than scaled sprites Bit 10 9 8 Code Zoom point 0 Oo O 0 Specifiestwocoordinates 0 1 o 1 5H Qe 00 1 1 o f 6H jUpprceter 0 1 1 1 7H 9 j L1 L3 3 p 1 0 1 DH jLowrlet 1 1 0 EH Lower center 33332290 1 1 1 1 fbowerrigt The result of adding the vertical and horizontal values is the value of the zoom point Center line Figure 6 1 Zoom Point VDP1 User s Manual 73 When a value other than 0 is specified for the zoom point ZP the drawing posi tion and drawing size of the sprite are determined by the zoom point ZP zoom point coordinates and display width The zoom point of a character whose zoom point is specified is drawn at the zoom point coordinates CMDXA CMDYA The drawing size is determined by the display width CMDXB CMDYB When reduced pixels are pulled out and therefore the specified zoom point may disappear Do not specify values other than those that have been established as the zoom point Drawing cannot be guaranteed when values other than those that have been established are specified Because the character size in the X direction is a multiple of 8 the zoom point will not be exactly in the center
141. rted to color codes and written to the frame buffer The size of the table is 20H 32 bytes and its boundary is also 20H 32 bytes The table is referenced according to the instruction at the lookup table address of the texture draw command Gouraud Shading Table This is a table in VRAM in which 16 bit RGB codes for 4 points are defined It is referenced when the processing of Gouraud shading by color calculation is instructed by the draw command for the part The pixel data of the part undergoes processing for Gouraud shading and is written to the frame buffer The size of the table is 8H bytes and its boundary is also 8H bytes It is referenced according to the instruction at the Gouraud shading table address of the draw command for the part When Gouraud shading is performed the pixel data of the part is limited to RGB code When the pixel data of the part is a color bank code the results cannot be guaranteed Character Pattern Table This is a table in VRAM in which the pixel data for character patterns is defined The table is referenced by the texture draw command The pixel data is defined as 4 8 or 16 bits pixel according to the specification of the color mode In the color bank mode a color bank is added to the pixel data of the character pattern in the color lookup table mode it is converted in the color lookup table in the RGB mode it is written as is to the frame buffer The size of the table is determined by
142. s a nibble Commands Commands include draw commands clipping coordinate set commands and local coordinate set commands Clipping is the removal of graphics outside a set area Local coordinates change the drawing position using the coordinates specified by the draw command as local coordi nates Commands are defined in VRAM as command tables In addition to the command table there are the character pattern table the Gouraud shading table and the color lookup table Tables are defined by addresses with an 8H byte boundary or a 20H byte boundary and are stored in VRAM A boundary is the splitting of addresses at the 8H or 20H boundary so there is no remainder Registers have 2H byte one word boundaries The VDP1 fetches command tables successively and draws according to these commands Fetch is the act of reading from VRAM in order to process commands Parts Objects drawn by using the draw command are called parts Parts are divided into textured and non textured parts Textured parts are called sprites non textured parts include polygons polylines and lines Sprites are characters and the color codes of these characters are defined in VRAM as a charac ter pattern table Polygons are filled squares polylines are non filled squares and lines are straight lines that connect two points VDP1 processes draw commands in and draws parts in the frame buffer 1 pixel at a time The color resolution of the data in the
143. s are set to the same coordinates the line is drawn as one pixel VDP1 User s Manual 131 7 10 Draw End Command The draw end command specifies the end of drawing When the end bit is 1 the draw end command is enabled The contents of the command table are shown in the following figure CMDCTRL Note E is ignored Gouraud shading table 8H When the 00H address is set to 8000H the draw end command is enabled 132 Chapter 8 Quick Reference Contents 8 1 System Heglsters e t fette aen 134 8 2 ale e Ee 140 8 3 Command 142 8 4 GOMMANGS 151 VDP1 User s Manual 133 8 1 System Registers TV Mode Selection Register TVMR bit 15 14 13 12 11 10 9 8 7 6 5 4 342 1 0 100000H 0 0 0 0 0 0 10 0 0 0 0 01 8 Twm Write only V blank Erase Write Enable VBE bit 3 0 o 0 Onecyclemode Changes every 1 60 0 O 1 JjSetingpronibted 0 1 0 Manualmode erase Eraseinnextfield 1 1 Manual mode change Changeinnextfield 1 0 0 Setting prohibited j 1 o0 1 Setting prohibited EP cw 1 1 0 Setting prohibited 1 1 1 Manual mode Erase with V blank change in next erase amp change field TV Mode Select TVM bits 2 0 Table 8 1 Screen Modes Frame TVM Screen mode i buffer VDP CLK
144. sired and therefore enlargement reduction stretching rotation and twist can be specified when drawing the character pattern by the specifica tion of vertex A vertex B vertex C and vertex D Vertical and horizontal inversion are also possible When two vertices are set at the same coordinates the sprite is drawn as a tri angle When four vertices are set at the same coordinates the sprite is drawn as one pixel VDP1 User s Manual 125 7 7 Polygon Draw Command The polygon draw command draws quadrangles in the frame buffer The inside of the quadrangle is filled with the specified color When the end bit is 0B and the command selection bits are 0100B the polygon draw command is enabled The contents of the command table are shown in the following figure bt 15 14 1312 11109 8 76 54 3210 ooH O JP 100 Link specification 8H 00 Polygon CMDLINK 02H Link specification 8H_ 00 Filled with Color o 0 0 0 11 00010 non textured CMDCOLR 06H NOP ACUI Vertex D 08H 0AH CMDXA Code extension Vertex A X coordinate XA CMDYA 0 CMDYB 12H Vertex B Y coordinate YB CMDXC CMDYC 16H CMDXD 18H CMDYD 1 Vertex D Y coordinate YD Note is ignored The polygon draw command is defined as follows e When the end bit is set to and the command selection bits
145. t in previous frame has not been fetched The end bit in previous frame has been fetched and that drawing is terminated Last Operation Table Address Register LOPR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 0 100012H Last operation table address 8H 0 0 Read only Last Operation Table Address bits 15 0 Current Operation Table Address COPR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100014H Current operation table address 8H 0 0 Read only Current Operation Table Address bits 15 0 138 Mode Status Register MODR bit 15 14 13 12 11 109 8 7 6 5 4 3 2 1 0 100016H VER Read only Version Number VER bits 15 12 Plot Trigger Mode 1 PTM1 bit 8 Even Odd Coordinate Select Bit EOS bit 7 Double Interlace Enable Bit DIE bit 6 Double Interlace Draw Line DIL bit 5 Frame Buffer Change Mode Bit FCM bit 4 V Blank Erase Write Enable Bit VBE bit 3 TV Mode Selection Bits TVM bits 2 0 VDP1 User s Manual 139 8 2 Tables Character Pattern Tables For 4 bits pixel OCH 12 bytes is required pixel 0 1 2 3 4 5 6 7 00H 10 11 412 13 lt Value is local address from character pattern 04H 4 5 6 7 08H 8 19 A B For 8 bits pixel 18H 24 bytes is required pixel 0 1 2 3 4 5 6 00H 08H 10H For 16 bits pixel 30H 48 bytes is required pixel 0 1 2 3 00H 10H 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D
146. t system clipping setting ta lower right System clipping area coordinate C Operation cannot be ensured when XC 0 or YO 0 Figure 7 1 System Clipping VDP1 User s Manual 111 7 2 User Clipping Coordinate Set Command User clipping coordinates can be freely set using software When the command selection bits are 1000B the user clipping coordinate set command is enabled The contents of the user clipping coordinate set command table are shown in the follow ing figure CMDCTRL gg Oo JP 000 00090 90 1000 bit15 14 13 1211 10 9 8 7 6 5 4 3210 0 0 CMDLINK 02H Link specification 8H 0 pou 04H 06H Lower right 08H coordinate System 0 clipping area CMDXA ocH 0 0 0 000 CMDYA 0EHLO_0_0_0 0 0 O UnperetYccornae vA User clipping area 14H 0 0 0 00 O towerishxcoodnae xc CMDYC 16 0_0 0 0 0 0 O _ LowerrigntY coordinate VO 18H 1AH 1CH Note E is ignored The user clipping coordinate set command is defined as follows 112 When the end bit is set to 0B and the command selection bits are set to 1000B the user clipping coordinate set command is enabled The jump mode is then specified When the jump mode is assign or call the address of the command table to be processed next is divided by 8H and set in CMDLINK The upper left coordinates of the clipping area are defined as vertex A CMDXA CMDYA and the lower right coordinates are defined as ver
147. ter 47 Erase Write Upper Right Coordinate Register 47 4 5 Draw Forced Termination Register 51 4 6 Transfer End Status Register sse 52 4 7 Last Operation Command Address Register 54 4 8 Current Operation Command Address Register 55 4 9 Mode Status Register 2 57 VDP1 User s Manual 33 The following table shows the functions of the systems registers Table 4 1 System Registers Abbrevi Internal update Register Names ation Address Access Function period TV mode selection TVMR 100000H Write only Specifies TV display mode Pae word VBE is field Frame buffer switch FBCR Write only Controls frame buffer toggle and WM 3 mode 100002H word double interlace mode lare frame buffer SW PTMR Write only Controls start of drawing 015 write as the Plot trigger 100004H word DOS and IUE write are Erase write data EWDR Write only Specifies fill data for frame buffer Frame buffer SW 100006H word during erase write i Erase write upper EWLR Write only Specifies upper left coordinate of area Frame buffer SW left coordinate 100008H word in frame buffer to fill during imi erase write word Erase write lower EWRR Write only Specifies lower right coordinate of Frame buffer SW right coordinate area frame buffer to fill
148. tex A and vertex C Also when X of A is greater than X of C the part is inverted horizontally When Y of A is greater than Y of C the part is inverted vertically When vertex A and vertex C are set at the same coordinates they are drawn with one pixel VDP1 User s Manual 121 Specification of Zoom Point Scaled Sprite Draw Command The contents of the command table for specifying the zoom point are shown in the following figure bit 15 14 131211 1098 7 6 5 4 321 0 CMDCTAL o P z oo Link specification 8H CMDLINK o p CMDPMOD 0 0 es re feo s commos non Scaled sprite CMDCOLR 06H Color bank lookup table 8H LSB fixed at 00 CMDSRCA Character address 8H 0 0 08H CMDSIZE o AH o 0 Character size X 8 Character size Y Vertex A Zoom Point Display CMDXA Zoom point X coordinate XA width YB OEH ode ex Zoom point Y coordinate YA Display X width XB CMDYB 42H Code extension Display Y width YB 14H 16H Frame buffer 18H 1AH GMDGRDA CH Gouraud shading table 8H Note E is ignored Specification of the zoom point of the scaled sprite draw command is defined as follows e When the end bit is set to OB and the command selection bits are set to 0001B the scaled sprite draw command is enabled The jump mode is then specified When the jump mode is assigned or called the address o
149. tex C CMDXC CMDYC The rectangle quadrangle represented by the upper left coordinates XA YA and the lower right coordinates XC YC is the clipping area User clipping is enabled and whether the inside or the outside of the area is clipped is determined by the draw mode of the draw command for the part User Clipping User clipping can be selected using software and it is possible to specify whether or not user clipping is enabled for each part and whether the outside of the set area or the inside of the set area is clipped User clipping coordinates can be enabled or disabled using the user clipping enable bit Clip bit bit 10 at top address 04H of command table When this bit is dis abled the user clipping coordinates become disabled and parts are only clipped by the system clipping coordinates When the user clipping coordinates are enabled parts are clipped by both the system clipping coordinates and the user clipping coordinates When user clipping is enabled user clipping can be set to the inside drawing mode or the outside drawing mode with the clipping mode bit Cmod bit bit 9 at top address 04H of command table When set to the inside drawing mode only those parts inside the area set by the user clipping coordinates are drawn when set to the outside drawing mode the area outside the coordinates is drawn System clipping is performed regardless of user clipping The clipping coordinates form a rectangle The
150. than 1 are drawn by sampling only the even or odd pixels of the original picture data This bit specifies whether even or odd coordinates are sampled When EOS 0 only pixels at even coordinates are sampled When EOS 1 only pixels at odd coordinates are sampled e If HSS 0 this bit is not referenced Refer to High Speed Shrink under 6 3 CMDPMOD Draw Mode Word for more information Even odd coordinate select bit 0 only pixels at even coordinates Samples only pixels at odd coordinates 44 4 3 Plot Trigger Register The plot trigger mode register PTMR controls the start of drawing It is a 16 bit write only register at address 100004H Its value is reset to 00 after powering on or resetting Set unused bits to 0 PTMR bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 100004H 0 0 0 10 0 01 010 0 010 0 01 0 Pm Write only Plot Trigger Mode PTM bits 1 0 Controls the start of drawing When the plot trigger mode bits are 10B drawing begins automatically at the start of the frame When the plot trigger mode bits are made 01B drawing begins when the register is written When 01B is written to the plot trigger mode bits during drawing drawing begins from the top of the command table When the plot trigger mode bits are 00B drawing does not start even at the start of the frame An idling condition is set The value of the bits is reset to 00 after powering on or resetting Btu
151. the table is not processed There is 1 level of nesting by a jump call Do not use jump calls in subroutines TUE mense ccs _ Biti4 13 12 Jump mode Processing Automatically jumps to next table address 20H after this table is processed CMDLINK is 54 o 0 1 Jumps to CMDLINK table after this table is processed b Jump call CMDLINK table receives subroutine call after this table is processed Ce 5 NN CMDLINK is ignored r deem Jumps to next table address 20H after this table is processed c is ignored 1 0 1 Skpassign Jumps to CMDLINK table without processing this table Ll ee this table CMDLINK is ignored When jump assign jump call skip assign or skip call is specified the address of the table to be processed next is specified by CMDLINK When jump next jump return skip next or skip return is specified CMDLINK is ignored 72 Zoom Point Zoom point specifies the zoom point of the character when a scaled sprite is drawn enlarged or reduced It functions only with scaled sprites Zoom Point ZP top address 00H of command table bits 11 8 Zoom point specifies the fixed point of the character when a scaled sprite is drawn enlarged or reduced The relationship between the value of the zoom point and the fixed point is as follows When the zoom point ZP is 0 there is no zoom point and drawing is perfo
152. ts but the lower 4 bits must be fixed at 0 Depending on the color mode 12 10 9 or 8 bits are added Figure 6 17 shows the addition of bits When there 16 bits pixel the data is written to the frame buffer as is When there are 8 bits pixel the lower 8 bits are written Color bank Color Bank 0000 Fixlower4 bits of o o o a color panka iy 16 color mode Color Bank Upper 12 bits 64 color mode Color Bank Upper 10 bits Bit data of character pattern for which the 128 color mode Color Bank Upper 9 bits lower bits are defined is written to the 256 color mode Color Bank Upper 8 bits frame buffer TG When 8 bits pixel Written to frame buffer RGB mode Data of defined character patterns is written to frame buffer Lookup table mode Data of lookup table referenced from defined character patterns is written to frame buffer Figure 6 17 Color Bank VDP1 User s Manual 99 The data written to the frame buffer are transferred to the VDP2 as is 16 bit data when the data written to the frame buffer become the display buffer in the next frame Table 6 4 shows the relationship between the color bank defined character pat tern data and draw frame buffer data Table 6 4 Example of Relationship of Defined Data and Draw Data to Color Bank defined bata iecolermode 64 CDH 16 color mode 64 color mode 128 color m
153. ts value becomes undefined after powering on or resetting and therefore the coordinates must be set Set unused bits to 0 EWRR bit 15 14 13 12 131 10 9 8 7 6 5 4 3 2 1 0 10000AH Lower right coordinate X3 Lower right coordinate Y3 Write only Erase Write Lower Right Coordinate X3 bits 15 9 Erase Write Lower Right Coordinate Y3 bits 8 0 These registers specify the fill area in the frame buffer during erase write The X coordinate is set in 8 pixel units when there are 16 bits pixel normal rotation 16 HDTV and in 16 pixel units when there are 8 bits pixel high resolu tion rotation 8 When the value of the system register is 1 it becomes 8 or 16 The actual lower right X coordinate takes a value that is 8 or 16 times the register setting and from which 1 is subtracted The Y coordinate is set in one line units Because the register setting for the Y coordinate is doubled during double interlace the actual coordinate value should be set to one half For example when the setting is 223 the coordinate becomes 447 The actual X coordinate is expressed by the following equations 16 bits pixel Upper left coordinate X 1 register setting x 8 Lower right coordinate X 3 register setting x 8 1 8 bits pixel Upper left coordinate X1 register setting x 16 Lower right coordinate X3 register setting x 16 1 VDP1 User s Manual 47 Therefore the values that the upper left coordinate X1 and the lower right
154. ttern 61 Figure 5 2 Color Lookup Table sssssssssssseseeeeee eee 62 Figure 5 3 Relationship between Tables in Lookup Table 63 Figure 5 4 RGB Code 64 Figure 5 5 Command 02 4 0 0 nennen nenne nennen nnns senten ener sinn 66 Chapter 6 Command Tables Fig re 6 1 Zoom Polnt 5 ER dei 73 Figure 6 2 Drawing Area 1 1111 75 Figure 6 3 Zoom Point and Drawing 76 Figure 6 4 Character Read Direction 77 Figure 6 5 High Speed Shrink 4 4 0 4 0 00000 82 Figure 6 6 Pre Clipping 2 2 2222 1 00 enne nnne nnne tt Ran nnne stan dne 83 Figure 6 7 Drawing enne annee 84 Figure 6 8 Mesh Processing ace nnnm 85 Figure 6 9 Mesh Processing of Lines and 85 Figure 6 10 a End Code Processing 1 of 2 2 2 4 0 1 0 87 Figure 6 10 b End Code Processing 2 Of 2 sse 87 Figure 6 11 Example of Drawing in Modes 0 1
155. uring frame switching Subroutine call The specified table receives a subroutine call Returns to main routine Skips this part is not drawn p Terminate drawing Moves to specified table Figure 3 1 Command Table Flow 30 3 3 Table Referencing Referencing of the tables stored in VRAM begins with the following command table Parts draw command The data size of the command table is bytes and the boundary is 20H bytes Address of Gouraud shading table Color lookup table Both the data size and boundaries are 20H bytes when the color mode is the lookup table mode Gouraud shading table Both the data size and boundaries are 8H bytes when Gouraud shading is used for color calculation Character pattern the case of a sprite draw command the data size has 20H byte boundaries as determined by the character size and color mode Figure 3 2 Referencing of Tables VDP1 User s Manual 31 32 This page is blank in the original Japanese document Chapter 4 System Registers Contents 4 1 TV Mode Selection Register 44 36 4 2 Frame Buffer Change Mode 38 4 3 Blot Trigger Register 45 44 46 Erase Write Data Register 46 Erase Write Upper Left Coordinate Regis

Download Pdf Manuals

image

Related Search

Related Contents

Mode d`emploi  Mode d`emploi - Kieselmann GmbH  1 Información importante Para empezar 2 Introducción 3 Empieza la  Manuale Utente User Manual EVO190E  - bei Blomberg!  E - Active srl  こちら - NPO法人 全国移動ネット  

Copyright © All rights reserved.
Failed to retrieve file