home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / CHOSNECK / CHOS2.ZIP / CHOSNECK.2ND / STUFF / DATAS.ZIP / ART51.SCR < prev    next >
Encoding:
Text File  |  1989-06-08  |  25.3 KB  |  583 lines

  1. <head>
  2. <title="...forever...">
  3. <font=monaco10.fnt>
  4. <font=newy36.fnt>
  5. <font=time24.fnt>
  6. <image=back.raw w=256 h=256 t=-1>
  7. <buf=9025>
  8. <bgcolor=-1>
  9. <background=0> 
  10. <link_color=000>
  11. <module=console.mod>
  12. <pal=back.pal>
  13. colors:
  14. 251 - black
  15. </head>
  16. <body>
  17. <frame x=0 y=0 w=640 h=9025 b=-1 c=-1>
  18.  
  19.  
  20.                  -- -- ---------------------------------------
  21.    <f1><c000>           Videl in practice <f0>
  22.                  -------------------------------------- - - --
  23.  
  24. Maybe you're wondering 'why another Videl guide'? There's a good Videl overview
  25. by Chris/Aura, there's the english  translation  by Tat/Avena, there's software
  26. called Screenpain where you can set any  resolution you want... And still a lot
  27. of ppl don't know how to set any  resolution  'by hand' I was very surprised by
  28. an answer on dhs board in the style of 'we are using Screenpain, why waste time
  29. in studying Videl regs'... Just for fun and the  good feeling you know a little
  30. bit more than yesterday! =) Second reason to write may be the fact in BOTH docs
  31. I've got were  some  typing  errors   (esp.  in  Tat's  one  -  global using of
  32. copy&paste isn't very good practise :-) and a  last reason - it's always a good
  33. exercise for an author to write any  tutorial  :-)  (I'm not joking - you can't
  34. imagine  how  much  I  learned   while   typing   that  ST  RAM  timing  guide)
  35. ...3...2...1...go!
  36.  
  37. Raster line
  38. ===========
  39.  
  40. x---------------------------------------------------x
  41. |      1st halfline             2nd halfline        |
  42. |<-----------------------><------------------------>|
  43. |                                                   |
  44. |---------------------------------------------------|
  45. |    |           |                   |       |  |   |
  46. |    |           | gfx display area  |       |  |   |
  47. |    |           |<----------------->|       |  |<->|
  48. |    |                                       | hsync|
  49. |    |                                       |      |
  50. |<-->|<------------------------------------->|<---->|
  51. left             visible screen area          right
  52. border                                        border
  53.  
  54. We see every  raster  line  (including  top/bottom  border)  is  divided into 2
  55. halflines. Duration of left/right  border,  hsync  impulse  and position of gfx
  56. display can be defined by user. Every  raster line consists of a certain number
  57. [(HHT+2)*2] of CYCLES, not pixels. You can tell Videl how many cycles should be
  58. used for 1 pixel. Videl operates with  every  halfline, not raster line. If you
  59. keep some cycles between left/right borders and  gfx display area, you will see
  60. border with colour taken from $ffff9800  register.  I think these halflines are
  61. here becoz of TV construction (TV screen  consists of 625 halflines) and on VGA
  62. are lines divided 'manually'. But who knows, I'm not a hardware freak..
  63.  
  64. Screen
  65. ======
  66.  
  67. x--------------------------------
  68. |       |                       ^
  69. |       |                       |
  70. |       |                       | top border
  71. |       |                       |
  72. |       |                       v
  73. |       |------------------------
  74. |       |                       ^
  75. |       |                       |
  76. |       |                       |
  77. |       |                       |
  78. |       |---------------        |
  79. |       |              ^        |
  80. |       |       gfx    |        |
  81. |       |       display|        | visible screen area
  82. |       |       area   |        |
  83. |       |              |        |
  84. |       |              v        |
  85. |       |---------------        |
  86. |       |                       |
  87. |       |                       |
  88. |       |                       |
  89. |       |                       v
  90. |       |------------------------
  91. |       |                       ^
  92. |       |----------------       |
  93. |       |               ^       | bottom border
  94. |       |               |vsync  |
  95. |       |               v       v
  96. x--------------------------------
  97.  
  98. From the horizontal point of view, the  screen  is divided into a certain [VFT]
  99. number of halflines. The number of  'real'  (raster)  lines is [VFT]/2. A TV is
  100. able to do 625 halflines, so we can  use 312.5 raster lines. Again, if you keep
  101. some halflines between top/bottom border and gfx area, you will see border with
  102. colour taken from $ffff9800 register.
  103.  
  104. Basic stuff
  105. ===========
  106.  
  107. Hz frequency
  108. ~~~~~~~~~~~~
  109. Number of lines that can be  drawn  in  one  SECOND. Imagine you have a monitor
  110. capable of displaying  31500  lines,  you've  got  screen  of  31500 lines with
  111. refreshing rate of one second. But  we  don't want refreshing every second, but
  112. every 1/60 of second (for VGA 60  Hz)  ->  31500/60 = 525 lines. That means our
  113. screen will 'wrap' after 525 lines  and  during  VBL  the ray will come back to
  114. upper corner of the screen.
  115.  
  116. V frequency
  117. ~~~~~~~~~~~
  118. Is that 60 number of example above. It  says number of VBLs per second. So, for
  119. TV for example, we are able to draw max 312.5 lines, right?
  120. 15625/312.5 = 50 Hz. We can see that
  121.  
  122.                          Hz frequency
  123. number of raster lines = ------------
  124.                          V frequency
  125.  
  126. We also can see  if  we  increase  number  of  VBLs  per  second (for less eye-
  127. stressing picture), we have  to  decrease  number  of  lines  (for  VGA 100 Hz:
  128. 31500/100 = 315 raster lines  instead  of  525);  if  we don't want to decrease
  129. number of lines, we have to increase hz frequency; if we increase hz frequency,
  130. our lines will be 'bigger', so you  have  to  decrease cycles per pixel; if you
  131. can't decrease cycles per pixel, you  have to decrease cycle-time by increasing
  132. Videl clock... shit, what magic! :o)
  133.  
  134. Back to hz freq: the  number  31500  also  means  the  line  has to be drawn in
  135. 1/31500 = 0.031 ms (vga) and 1/15625 = 0.064 ms (rgb)
  136.  
  137. one 25.175 MHz Videl cycle = 1/25175000 = 0.040 us
  138. one 32.000 MHz Videl cycle = 1/32000000 = 0.031 us
  139.  
  140. rgb uses 2 32 MHz cycles per pixel for 640xYYY resolution
  141. vga uses 1 25.175 MHz cycle per pixel for 640xYYY resolution
  142. (for more info about cycles/pixel see below)
  143.  
  144. time for drawing one pixel:
  145. rgb: 2 cycles * 0.031 us = 0.062 us
  146. vga: 1 cycle * 0.040 us = 0.040 us
  147.  
  148. time for drawing 640 pixels:
  149. 0.062 us * 640 pixels = 0.040 ms (rgb)
  150. 0.040 us * 640 pixels = 0.026 ms (vga)
  151.  
  152. remaining time in one line:
  153. rgb: 0.064 - 0.040 = 0.024 ms for borders
  154. vga: 0.031 - 0.026 = 0.005 ms for borders
  155.  
  156. We see there's a lot of space on  rgb  screen; in compare to vga&25 MHz, rgb&32
  157. MHz screen don't fit perfectly. Exactly the  same numbers you'll get in 320xYYY
  158. modes, since by 320 pixels/line Videl  uses  4  cycles (rgb) and 2 cycles (vga)
  159. per pixel, which is 2 times  more.  And  320  is  two times smaller than 640 =>
  160. differences are eliminated.
  161.  
  162. From these formulas you see  there  isn't  any information about color-depth of
  163. one pixel. The reason why we can't set  640x480xtc on vga for example is a slow
  164. data bus. Really, if  you  have  Nemesis/Phantom  [24/25  MHz  bus], there's no
  165. problem to set this resolution. If you switch accelerator off, you will see how
  166. Videl isn't able to catch next 17  longs  of video data, nice thing, really ;-)
  167. So why is it possible to set it on tv/rgb?
  168.  
  169. If you want visible 640xYYY pixels  on  screen,  you  have  to set 2 (rgb) or 1
  170. (vga) cycles per pixel.  And  here  is  that  problem  -  1  cycle per pixel is
  171. unrealisable on 16 MHz databus, simply,  there's  a  need to transfer data from
  172. st-ram two times faster than on rgb. For  BP modes it's enough, but in TC Videl
  173. needs probably more time to catch  one  pixel from st-ram. Maybe you're asking,
  174. why we need 1 cycle per  pixel.  We  don't  need  it :-) It's "cosmetic need" -
  175. really, if you set 2 cycles/pixel, 32  MHz (pixels are smaller), you're free to
  176. set around 440x480xtc without ANY problem. 440 pixels are visible maximum on my
  177. monitor with 30 kHz/60  Hz  frequencies.  I  think  there's  no  problem to set
  178. 640x480xtc on 50 MHz Videl WITHOUT bursting  the databus to >16 MHz (decreasing
  179. of CPU performance is another thing) Some additional info about cycles/pixel is
  180. with divider table some pages below.
  181.  
  182. When we're talking about frequencies, why don't  take  a look at VGA 100 Hz. An
  183. advantage of this mode is in decreasing some kind of "wait states". In standard
  184. VGA/60 Hz XXXx240 modes the screen is drawn like this:
  185.  
  186. 1st line: Videl takes data from st-ram and draws it on screen (CPU waits)
  187. 2nd line: Videl copies data from 1st line and CPU is still waiting
  188. 3rd line: Videl takes data from st-ram and draws it on screen (CPU waits)
  189. 4th line: Videl copies data from 3rd line and CPU is still waiting
  190. :
  191. :
  192. etc. This isn't 100% correct, but  it  shows  us the problem: every second line
  193. CPU don't do  anything,  data  bus  is  free  and  we're  wasting time. Logical
  194. solution is switching off the double line, right? OK, click-click, done :-) But
  195. hey, our vga screen isn't a screen, but some kind of tube! (???) Hm, hm, hm, we
  196. have to do  something  with  this  small  screen.  Do  you  remember meaning of
  197. vertical frequency? It's the time  after  which  the  screen is wrapped, right?
  198. With single lines, our screen looks like this:
  199.  
  200. top border
  201. clear area
  202. :
  203. :
  204. 320 single lines
  205. clear area
  206. :
  207. :
  208. :
  209. bottom border
  210.  
  211. You can play with moving display up and  down,  but in 60 Hz you have still 50%
  212. of screen filled with nothing. So let's move display up. Done? Now you have:
  213.  
  214. top border
  215. 320 single lines
  216. clear area
  217. :
  218. :
  219. :
  220. :
  221. :
  222. bottom border
  223.  
  224. Now you probably know, what will be the next  step - we don't need 320 lines of
  225. nothing, so we say to Videl that  screen  can be wrapped 320 lines earlier. How
  226. to get the exact frequency?
  227.  
  228. 31500/525 = 60 Hz
  229. We know that our resolution has 480 lines:  525-480 = 45 lines for borders. Now
  230. we want only 240 lines: 240+45 = 285 lines at all.
  231. 31500/285 = 110.5 Hz
  232.  
  233. 110.5 Hz? That isn't 100 Hz!  With  110.5  Hz you'll get perfect screen without
  234. any borders. Why to use 100  Hz  screen  with  stupid white borders? (I know, I
  235. know, clr.l $ffff9800.w isn't a problem in TC, but what about bitplanes ?) Only
  236. reason in my mind is the same picture size as in rgb/50 Hz modes. If your fx is
  237. able to run in 110 fps and you  decrease  vertical frequency to 100 Hz, your fx
  238. WILL run slower. But how many fxes are able to do so? Very few I guess. And, if
  239. you have any fx slower than  1  vbl, vertical frequency isn't important anymore
  240. since you will use triplebuffer and  triplebuffer  isn't depend on VBL (ok, ok,
  241. screens are swapped in VBL, but I  think  the  difference between 100 and 60 hz
  242. with 34 fps fx can be ignored)
  243.  
  244. It's true 60 Hz double-line mode takes  SOME time against single-line mode, but
  245. I really doubt it's more than catching 320*240 words from st-ram with two times
  246. bigger frequency (than rgb/50). Remember  320x240/tc/vga/60  takes about 16% of
  247. CPU time and vga/100 takes 26% !!!  I compared 320x240xtc mode with and without
  248. double-lines, speed difference is  maybe  2%-3%  (Videl  don't  read same lines
  249. again from st-ram but from  its  buffer).  For  future: if you're coding slower
  250. fxes, lower value of vertical frequency is  always better since more VBLs means
  251. more loading screens by Videl = more bus halting.
  252.  
  253. OK, I think I could stop to bore you with this theory, the name of this article
  254. is "Videl in PRACTISE", isn't it? :)
  255.  
  256. Let's look over some standard values for rgb/tv and vga:
  257.  
  258.                                 rgb/tv          vga
  259. --------------------------------------------------------
  260. Hz frequency:                   15625 Hz        31467 Hz
  261. Duration of HSync impulse:      4.7 us          3.81 us
  262. Duration of right border:       6.2 us          4.45 us
  263. Duration of left border:        5.145 us        1.91 us
  264.  
  265. V frequency:                    50 Hz           59.58 Hz
  266. Duration of VSync impulse:      0.192 ms        0.064 ms
  267. Duration of top border:         1.504 ms        1.008 ms
  268. Duration of bottom border:      0.384 ms        0.416 ms
  269.  
  270. As Chris has written, these values aren't hard and fast. But they're good start
  271. values at least :-)
  272.  
  273. Before we start with making our own  resolution, a little overview of important
  274. Registers is in order:
  275.  
  276. -------------------------------------------------------------------------------
  277. $FFFF820E [R/W] W _______876543210  Line Offset
  278.  
  279. How many words are added to the  end  of  display line, i.e. how many words are
  280. 'behind' the display.
  281.  
  282. -------------------------------------------------------------------------------
  283. $FFFF8210 [R/W] W ______9876543210 Line Width (VWRAP)
  284.  
  285. Length of display line again in words.  Or,  how  many words should be added to
  286. vram counter  after  every  display  line.  Maybe  you're  asking  what  is the
  287. difference between these registers.
  288.  
  289. length of logical line = width + offset
  290.  
  291. So if you want virtual screen of 512 pixels width in 320x240xTC:
  292.  
  293. $ffff820e = 512 - 320 = 192
  294. $ffff8210 = 320
  295.  
  296. A little help about calculating word values:
  297.  
  298. line width = (hz resolution/16) * bitplanes
  299.  
  300. Colours Bitplanes
  301. -----------------
  302. 2       1
  303. 4       2
  304. 16      4
  305. 256     8
  306. 65536   16
  307.  
  308. -------------------------------------------------------------------------------
  309. $FFFF8260 [R/W] B         ______10  ST Shift Mode
  310.                                 ||
  311.                                 ||
  312.                                 ||
  313.                                 ||                           others   vga
  314.                                 ||                  $FF8210 $FF82C2 $FF82C2
  315.                                 00--4BP/320 Pixels=> $0050   $0000   $0005
  316.                                 01--2BP/640 Pixels=> $0050   $0004   $0009
  317.                                 10--1BP/640 Pixels=> $0028   $0006   $0008
  318.                                 11--???/320 Pixels=> $0050   $0000   $0000
  319.  
  320. Writing to this register does the following things:
  321. - activate STE palette
  322. - sets line width ($8210)
  323. - sets paramaters in $82c2 (double lines/interlace & cycles/pixel)
  324.  
  325. Before writing to $8260 you have to:
  326. - set correct values (hdb, vdb, ...) for 320x200 or 640x200 or 640x400
  327. - clear $8266 register = setting Falcon 16 color mode; if you don't do it,
  328.   you will get strange resolutions
  329.  
  330. -------------------------------------------------------------------------------
  331. $FFFF8266 [R/W] W _____A98_6543210  Falcon Shift Mode (SPSHIFT)
  332.                        ||| |||||||
  333.                        ||| |||++++- 0..15: Colourbank setting in 8BP
  334.                        ||| ||+----- 0: 8 Bitplanes (256 Colors) off
  335.                        ||| ||+----- 1: 8 Bitplanes (256 Colors) on
  336.                        ||| |+------ 0: internal Vertical Sync
  337.                        ||| |        1: external Vertical Sync
  338.                        ||| +------- 0: internal Horizontal Sync
  339.                        |||          1: external Horizontal Sync
  340.                        ||+--------- 0: True-Color-Mode off
  341.                        ||           1: True-Color-Mode on
  342.                        |+---------- 0: Overlay-Mode off
  343.                        |            1: Overlay-Mode on
  344.                        +----------- 0: 2-Color-Mode off
  345.                                     1: 2-Color-Mode on
  346.  
  347. Writing to this register does the following things:
  348. - activate Falcon palette
  349. - if you set Bits A/8/4 == 0, it selects 16-Color-Falcon-Mode (NOT the
  350.   same as ST LOW since Falcon palette is used!)
  351. - $8260 register is ignored, you don't need to write here anything
  352.  
  353. Note: as you can see, 4-Color-Mode isn't realisable with Falcon palette.
  354.  
  355. -------------------------------------------------------------------------------
  356. $FFFF8280 [R/-] W ______9876543210 Horizontal Hold Counter (HHC)
  357.  
  358. It's set after writing to HHT, it  counts cycles since HHC reaches HHT+1 value.
  359. Then is 1st halfline finished and  HHC  starts  to count 2nd halfline (again to
  360. HHT+1)
  361.  
  362. -------------------------------------------------------------------------------
  363. $FFFF8282 [R/W] W ______9876543210 Horizontal Hold Timer (HHT)
  364.  
  365. Number of cycles minus 2 per halfline  (not gfx line!). Both halflines use this
  366. value.
  367.  
  368.          |  video base clock       |
  369. HHT = int|--------------------- - 2|
  370.          |Hz freq * divider * 2    |
  371.  
  372. -------------------------------------------------------------------------------
  373. $FFFF8284 [R/W] W ______9876543210 Horizontal Border Begin (HBB)
  374.  
  375. On which cycle in SECOND  halfline  should  start  right  border  to the end of
  376. raster line. If HBB > HHT+1, no border is present.
  377.  
  378.                    |right border dur in us * video base clock|
  379. HBB = HHT + 1 - int|-----------------------------------------|
  380.                    |                  divider                |
  381.  
  382. -------------------------------------------------------------------------------
  383. $FFFF8286 [R/W] W ______9876543210 Horizontal Border End (HBE)
  384.  
  385. On which cycle in FIRST  halfline  should  end  left  border  from the start of
  386. raster line. If HBE > HHT+1, border over whole raster line is present.
  387.  
  388.          |left border dur in us * video base clock|
  389. HBE = int|----------------------------------------|
  390.          |                 divider                |
  391.  
  392. -------------------------------------------------------------------------------
  393. $FFFF8288 [R/W] W ______9876543210  Horizontal Display Begin (HDB)
  394.                         |
  395.                         +---------- Display will start in:
  396.                                     0: 1. halfline
  397.                                     1: 2. halfline
  398.  
  399. On which cycle in FIRST OR SECOND halfline should start gfx display.
  400.  
  401. This value took 90% of the time of  my Videl studying... There's a need of some
  402. detailed explanation. Falcon's screen is created in this way:
  403.  
  404. 1. We define in which halfline Videl should start the raster line
  405. 2. Videl waits in this halfline until HHC reaches HDB value.
  406. 3. Wait state goes here (hdb offset)
  407. 4. Videl is drawing until HHC reaches HDE value
  408. 5. Wait state goes here (hde offset)
  409.  
  410. If you draw it on paper:
  411.  
  412.        hdb-off                            hde-off
  413. ------+-------+-------------*------------+-------+-------
  414.       hbe=hdb  ...active display area... hde     hbb
  415.  
  416. "*" means begining of 2nd halfline. Now you calculate HDB offset:
  417.  
  418.                  |     |8 words*16 pixels         |               |
  419.                  |64 + |----------------- + 16 + 2| * Cycles/pixel|
  420.                  |     |  No. of planes           |               |
  421. HDB offset = int |------------------------------------------------| + 1
  422. in F030 BP mode  |                     divider                    |
  423.  
  424.                  |      |8 words*16 pixels    |               |
  425.                  |128 + |----------------- + 2| * Cycles/pixel|
  426.                  |      |  No. of planes      |               |
  427. HDB offset = int |--------------------------------------------| + 1
  428. in STE BP mode   |                 divider                    |
  429.  
  430.                  |64 + 16 pixels * Cycles/pixel|
  431. HDB offset = int |-----------------------------| + 1
  432. in TC mode       |            divider          |
  433.  
  434. The question for me was the relationship  between the HDB and HDB offset. After
  435. two months I finally scored a goal, yeah !!! :-) I didn't understand one thing:
  436. how can HDB be nearly the same as  HDE, that isn't logical! But imagine we will
  437. create a line in system listed above:  after  border end we will wait some (hdb
  438. offset) cycles and then drawing  can  begin.  But  hey!  We reached border end,
  439. we're in visible area  already!  To  avoid  a  next  "border"  we  have to move
  440. backward in line with horizontal display  begin;  in  some cases we'll get into
  441. negative values (HBE - HDB offset <  0).  But  this  is no problem since we can
  442. define 2nd halfline for HDB, too! Drawing  our  line will begin in 2nd halfline
  443. and after hdb-offset will start  EXACTLY  at  horizontal  border end. Cool, eh?
  444. Once again, formula for calculating HDB:
  445.  
  446. HDB = HBE - HDB offset; if you get negative value:
  447. HDB = HBE - HDB offset + HHT+2 and set bit 9 of HDB register
  448.  
  449. -------------------------------------------------------------------------------
  450. $FFFF828A [R/W] W ______9876543210  Horizontal Display End (HDE)
  451.  
  452. On which cycle in SECOND halfline should end gfx display.
  453.  
  454.                  ||8 words*16 pixels    |               |
  455.                  ||----------------- + 2| * Cycles/pixel|
  456.                  ||  No. of planes      |               |
  457. HDE offset = int |--------------------------------------|
  458. in F030/STE BP   |               divider                |
  459. mode
  460.  
  461. HDE offset = 0
  462. in TC mode
  463.  
  464. HBB = HDE + HDE offset => HDE = HBB - HDE offset
  465.  
  466. When calculating the HDB  and  HDE  it  should  be  noted,  that  the number of
  467. horizontal pixels cannot be defined arbitrarily,  except in Truecolour mode. We
  468. can arrive at the allowed pixel multiple using the following formula:
  469.  
  470.                              8 Words * 16 Pixels
  471. Horizontal pixel multiple =  -------------------
  472.                                 No. of planes
  473.  
  474. In truecolour mode a fine definition of 1 pixel is possible.
  475.  
  476. -------------------------------------------------------------------------------
  477. $FFFF828C [R/W] W ______9876543210  Horizontal Sync Start (HSS)
  478.  
  479. On which cycle in SECOND  halfline  should  start  hsync  impulse to the end of
  480. raster line. If HSS > HHT+1, no vsync impulse is present.
  481.  
  482.                    |hsync impulse dur in us * video base clock|
  483. HSS = HHT + 1 - int|------------------------------------------|
  484.                    |                   divider                |
  485.  
  486. -------------------------------------------------------------------------------
  487. $FFFF82A0 [R/-] W _____A9876543210  Vertical Frequency Counter (VFC)
  488.  
  489. It's set after writing to VFT, it counts halflines since VFC reaches VFT value.
  490. VFC is increased if HHC = HHT+1
  491.  
  492. -------------------------------------------------------------------------------
  493. $FFFF82A2 [R/W] W _____A9876543210  Vertical Frequency Timer (VFT)
  494.  
  495. Number of halflines per screen.
  496.  
  497.          |Hz freq|
  498. VFT = int|-------| * 2 (+1)
  499.          |V freq |      ^
  500.                         \_when not interlaced
  501.  
  502. -------------------------------------------------------------------------------
  503. $FFFF82A4 [R/W] W _____A9876543210  Vertical Border Begin (VBB)
  504.  
  505. On which halfline should start bottom border to the end of screen.
  506.  
  507. VBB = VFT - int|bottom border dur in ms * Hz freq * 2|
  508.  
  509. -------------------------------------------------------------------------------
  510. $FFFF82A6 [R/W] W _____A9876543210  VBlankOff / Vertical Border End (VBE)
  511.  
  512. On which halfline should end top border from the start of screen.
  513.  
  514. VBE = int|top border dur in ms * Hz freq * 2| + 1
  515.  
  516. -------------------------------------------------------------------------------
  517. $FFFF82A8 [R/W] W _____A9876543210  Vertical Display Begin (VDB)
  518.  
  519. On which halfline should  begin  gfx  display.  If  VDB  >  VFT,  no display is
  520. present. If VDB > VDE, display is present from VDB to VFT.
  521.  
  522. -------------------------------------------------------------------------------
  523. $FFFF82AA [R/W] W _____A9876543210  Vertical Display End (VDE)
  524.  
  525. On which halfline should end gfx display. If  VDE < VFT, no display is present.
  526. If VDE < VDB, display is present from VDE to VFT.
  527.  
  528. -------------------------------------------------------------------------------
  529. $FFFF82AC [R/W] W _____A9876543210  Vertical Sync Start (VSS)
  530.  
  531. On which halfline should start  vsync  impulse  to  the  end of screen. Impulse
  532. starts from VSS+1.
  533.  
  534. VSS = VFT - int|vsync dur in ms * Hz freq * 2|
  535.  
  536. -------------------------------------------------------------------------------
  537. $FFFF82C0 [R/W] W _______8765_3210  Video Control (VCO)
  538.                          |||| ||||
  539.                          |||| ||++-  same as bit 7&6 in $ffff0006
  540.                          |||| |+---  0: Video base clock 32 MHz
  541.                          |||| |      1: Video base clock 25.175 MHz
  542.                          |||| +----  0: No Half-line-HSyncs
  543.                          ||||        1: 15 Half-line-HSyncs from start of
  544.                          ||||           bottom border
  545.                          |||+------  0: negative VSync-Impulse (5V > 0V)
  546.                          |||         1: positive VSync-Impulse (0V > 5V)
  547.                          ||+-------  0: negative HSync-Impulse (5V > 0V)
  548.                          ||          1: positive HSync-Impulse (0V > 5V)
  549.                          |+--------  0: 16 Bit-Videobus
  550.                          |           1: 32 Bit-Videobus (Falcon)
  551.                          +---------  Hz base offset
  552.                                      0: 128 cycles (ST Low/Mid on RGB and
  553.                                                     ST Hi on SM124)
  554.                                      1:  64 cycles (all the others)
  555.  
  556. Bits 1 and 0 are set same as bits 7 and 6 in $ffff8006:
  557.  
  558. 00 Monochrome
  559. 01 RGB - Colormonitor
  560. 10 VGA - Colormonitor
  561. 11 TV
  562.  
  563. -------------------------------------------------------------------------------
  564. $FFFF82C2 [R/W] W ____________3210  Video Mode
  565.                               ||||
  566.                               |||+- 0: Double lines off
  567.                               |||   1: Double lines on
  568.                               ||+-- 0: Interlace off
  569.                               ||    1: Interlace on
  570.                               ++--- 00: 4 cycles/pixel
  571.                                     01: 2 cycles/pixel
  572.                                     10: 1 cycle/pixel
  573.                                     11: n/a
  574.  
  575. -------------------------------------------------------------------------------
  576. Phew, finally we  reached  the  end  !  :-)  I  tried  to  write  it  in a more
  577. efficient/clear way than Chris/Tat did.
  578.  
  579. <link=art51b.scr>Go to NEXT PART</l>
  580. </frame>
  581. </body>
  582.  
  583.