home *** CD-ROM | disk | FTP | other *** search
/ Vectronix 2 / VECTRONIX2.iso / FILES_01 / JAGDEV_1.LZH / DEVELOP.JAG / VECTRONI.X! / DOCS / VIDEO.TXT < prev    next >
Text File  |  1994-04-13  |  5KB  |  121 lines

  1.  
  2.  
  3. Jaguar Video and Clock Speeds
  4.  
  5.  
  6. The video system of Jaguar is programmable to within the precision of the
  7. supplied video clock.  In the Jaguar game console the video clock is chosen to
  8. allow an inexpensive modulator system.  In the interest of saving money the
  9. processor clock speed is the same as the video clock speed.  This requires a slightly
  10. different clock speed for NTSC and PAL system.  These numbers are as follows
  11. (Please note, more digits will be available later but these will probably not
  12. change.):
  13.  
  14.     PAL    26.594 MHz
  15.     NTSC    26.591 MHz
  16.  
  17. From this video clock the system then produces the pixel (or dot) clock.  The ratio
  18. between video and pixel clock is determined by high order bits of the VMODE
  19. register.  The possible values for the ratio are in the range 1-8.  The attached spread
  20. sheet contains the number of pixels that will fit within two different sized areas of
  21. a video screen.  The numbers are the same for NTSC and PAL.
  22.  
  23. For both PAL and NTSC the "safe" video area is about 40 us wide.  The area
  24. required to guarantee overscan is about 50 us.  The spreadsheet gives the number
  25. of pixels that can be displayed within these times for all available pixel clock
  26. dividers.  Note that these numbers are not integers.  The numbers are also not even
  27. "nice" computer numbers like 320 or 256.
  28.  
  29. We recommend that ALL software for the Jaguar console overscan both vertically
  30. and horizontally so for the rest of this discussion we will restrict ourselves to the
  31. OVERSCAN column.
  32.  
  33. The first row (divisor of 1) requires that the object processor be started twice each
  34. line and produces a ridiculous resolution for a TV, it will be ignored.  The rest of
  35. the rows are all usable but two of them are special.  A divisor of three gives a non
  36. overscanned resolution of about 320.  This is a good match for many computer
  37. systems.  A divisor of four gives pixels that are about square.  Square pixels are a
  38. great advantage for art creation and we recommend their use.
  39.  
  40. Let's look at the specific case of an overscanned game using square pixels.  This
  41. uses a pixel divisor of 4.  In both NTSC and PAL this allows for about 332 pixels to
  42. be displayed.  Choosing 320 gives us a <4% error.  Of these 320 pixels we should
  43. only count on the middle 266 being visible at all times.  This means that there is a
  44. border of 27 pixels on each side that are drawn but should not contain essential
  45. game information.
  46.  
  47. The other pixel clock divisors that are of likely interest are 3 and 5.  In both of
  48. these cases the number of overscanned pixels is usably close to a blittable width:
  49. 448 for a divisor of 3 and 256 for a divisor of 5.
  50.  
  51. Note: The number to use as display width in VIDINIT is the one for a divisor of 1.
  52. Use 1330 for an overscanned display.
  53.  
  54. To overscan vertically we suggest a screen height of 240 lines for NTSC and 288
  55. PAL.  This will alow for both PAL and NTSC users to see a fully overscanned image
  56. both vertically and horizontally.  The guaranteed visible region within which
  57. crucial game information is restricted is 200 lines for NTSC and 240 lines for PAL.
  58. Using 200 lines of critical video for both systems is a significant, and acceptable,
  59. simplification.
  60.  
  61.  
  62.     Pixel Divisor        Not Overscan    Overscan
  63.  
  64.         1            1063.6        1329.5
  65.         2            531.8        664.8
  66.         3            354.5        443.2
  67.         4            265.9        332.4
  68.         5            212.7        265.9
  69.         6            177.3        221.6
  70.         7            151.9        189.9
  71.         8            132.9        166.2
  72.  
  73.  
  74.  
  75. The End.
  76.  
  77. ;=========================================================================================================
  78.  
  79. The following is an example of equates we use to set up our video:
  80.  
  81. ;*********** VIDEO ***********************************************
  82.  
  83. vclk        equ    376
  84.  
  85. horiz_per    equ    317778
  86. sync_per    equ    46050
  87. eq_per        equ    23500
  88. front_porch    equ    17450
  89. line_blank    equ    109500
  90. disp_width    equ    1347            ;(pixel width + 1) * 3
  91. disp_height    equ    240            ;this is in lines
  92.  
  93. ; Horizontal computations
  94.  
  95. n_hp        equ    horiz_per/vclk
  96. n_hbb        equ    ((horiz_per-sync_per-front_porch)/vclk)+$400
  97. n_hbe        equ    (line_blank-sync_per-front_porch)/vclk
  98. n_hs        equ    ((horiz_per-sync_per)/vclk)+$400
  99. n_hvs        equ    (horiz_per-(2*sync_per))/vclk
  100. n_heq        equ    (horiz_per-eq_per)/vclk
  101. n_hde        equ    ((disp_width/2)-1)+$400
  102. n_hdb1        equ    ((n_hp)-(disp_width/2))
  103. n_hdb2        equ    n_hdb1
  104.  
  105. n_vp        equ    523
  106. n_vee        equ    6
  107. n_vbe        equ    40
  108. n_vdb        equ    n_vbe-2            ;n_vbe+4
  109. n_vde        equ    n_vdb+(disp_height*2)
  110. n_vbb        equ    n_vde
  111. n_vs        equ    n_vp-10
  112. n_veb        equ    n_vs-n_vee
  113.  
  114. SCRN_TOP    equ    n_vdb            ;ypos of first line at top of screen
  115. SCRN_BOTTOM    equ    n_vde            ;xpos of first line below screen
  116. SCRN_RIGHT    equ    448            ;xpos of first column off right side of screen
  117.  
  118. ;*******************************************************************
  119.  
  120.  
  121.