home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 4630 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  4.7 KB

  1. Path: bruce.cs.monash.edu.au!not-for-mail
  2. From: bmeyer@bruce.cs.monash.edu.au (Bernd Meyer)
  3. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.advocacy,comp.os.ms-windows.advocacy
  4. Subject: Re: intuition inefficient ?
  5. Followup-To: comp.sys.amiga.programmer,comp.sys.amiga.advocacy,comp.os.ms-windows.advocacy
  6. Date: 2 Mar 1996 13:24:25 GMT
  7. Organization: Computer Science, Monash University, Australia
  8. Distribution: world
  9. Message-ID: <4h9i69$fi6@harbinger.cc.monash.edu.au>
  10. References: <4gm2qg$8lk@sunsystem5.informatik.tu-muenchen.de> <4grs7r$plr@harbinger.cc.monash.edu.au> <4gtq1c$mu0@sunsystem5.informatik.tu-muenchen.de>
  11. NNTP-Posting-Host: molly.cs.monash.edu.au
  12. X-NNTP-Posting-User: bmeyer
  13. X-Newsreader: TIN [UNIX 1.3 950823BETA PL0]
  14.  
  15. Juergen "Rally" Fischer (fischerj@Informatik.TU-Muenchen.DE) wrote:
  16. : Bernd Meyer (bmeyer@bruce.cs.monash.edu.au) wrote:
  17. : : Juergen "Rally" Fischer (fischerj@Informatik.TU-Muenchen.DE) wrote:
  18. : : what --- there is two standard ways to catch the vblank signal on a 
  19. : : VGA card, and one of them is using an interrupt.
  20. : Are you sure vblank interrupt is something "standard" on PC ?
  21. : I believe each newer VGA got the possibility to send such an
  22. : interrupt signal, but what about the _compatible_ way of using it ?
  23.  
  24. What is the compatible way of using an interrupt? Sorry, I can't really
  25. answer this question for you, Juergen. If you don't know how to use
  26. an interrupt, you probably shouldn't discuss things like this. And
  27. BTW, it's not "newer" VGA cards --- it's been every VGA compatible card
  28. since the very first VGA card IBM delivered.
  29.  
  30. : : register. This is due to the fact that almost everyone quickly disables
  31. : : the vblank interrupt as wasting valuable resources.
  32. : _polling_ is waste of respources!
  33.  
  34. No, using an IRQ line for something as trivial as the vblank signal is
  35. a waste of resources. 
  36.  
  37. : so double buffering is waste of
  38. : recources. efficient rastersplit free animation needs tripple buffering,
  39.  
  40. No problem with that --- although you only need triple buffering if
  41. you can't guarantee that you get one screenful of data created in the
  42. time it takes to display one screen. If you could guarantee that, you'd
  43. have no need for triple buffering.
  44.  
  45. : which needs either an interrupt or a gfx-hardware that will use a
  46. : write to adress-registers not immedeately, but after next vblank.
  47.  
  48. *Grin* Well, Juergen, this sophisticated hardware you just described
  49. is _also_ in every single VGA card since the very first IBM has
  50. ever produced. At the start of every frame (at the vblank signal, so to
  51. say), the value of the "start of image memory" register is sampled into
  52. an internal latch. So you don't even have to get the timing of the
  53. register write right.....
  54.  
  55. : : want an interrupt, you get one. How?
  56. : :[...]
  57. : : vblank signals. You can then set up one of those high precision timers
  58. : one of those ? :) The _one and only_ which is able to cause interrupts
  59. : in a normal PC.
  60.  
  61. There is two of them, actually.
  62.  
  63. : : Now was that really so hard? All of the functionality used in this 
  64. : No :) I knew, my friend told me. He also told that there are some
  65. : problems. Such as interrupts occuring for the time the vblank bit
  66. : is set. bzzzt, another frame cpu busy-wait. Won't occur on a DOS demo,
  67. : but on a tasking environment it will.
  68.  
  69. a) you could disable other interrupts for the time you wait. Very easy,
  70.    and if you programmed your timer well, they are only disabled for
  71.    a very short time
  72.  
  73. b) You could set a certain timeout, after which you assume you missed
  74.    the vblank and pretend it has been there, anyway. Be a bit more
  75.    wasteful when reprogramming the timer, because you don't know how far
  76.    down the image you are
  77.  
  78. c) But most importantly: I don't think the VGA vblank bit gets reset
  79.    by anything other than reading the register. Which would mean
  80.    there is no way of "missing" it. I'm not sure, though, and I don't
  81.    have a tech spec of the VGA standard handy at the moment.
  82. : : You probably know where my money is. Have a look at the SVGALIB for
  83. : Yes, Bill Gates got it ;)
  84.  
  85. If you still think that, Juergen, you are a lost case. I never paid
  86. a single cent, Pfennig, Oere, pecne or centime (and no other denomiations,m
  87. either) for an MS product. Never. Not once.
  88.  
  89. : : : I can't believe they'll ever implement those nice little things A500 
  90. : : : already had (vblank & stuff) into PC hardware _and_ the OSes (win, linux).
  91. : : And I can't believe how narrow-minded you are, sorry.
  92. : You didn't read exactly, I didn't tell about vblank-polling.
  93.  
  94. And I explained two standard methods of getting vblank interrupts.
  95. Now I really can't do any more than offering TWO methods, right?
  96.  
  97. : But as narrow-minded resource-wasting PCer you probably can't
  98. : think of anything more :)
  99.  
  100. I can. Can you?
  101.  
  102. Bernie
  103.  
  104.