home *** CD-ROM | disk | FTP | other *** search
- Path: informatik.tu-muenchen.de!fischerj
- From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
- Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.advocacy,comp.os.ms-windows.advocacy
- Subject: Re: intuition inefficient ?
- Date: 5 Mar 1996 15:49:02 GMT
- Organization: Technische Universitaet Muenchen, Germany
- Distribution: world
- Message-ID: <4hhnpe$6tn@sunsystem5.informatik.tu-muenchen.de>
- References: <4gm2qg$8lk@sunsystem5.informatik.tu-muenchen.de> <4grs7r$plr@harbinger.cc.monash.edu.au> <4gtq1c$mu0@sunsystem5.informatik.tu-muenchen.de> <4h9i69$fi6@harbinger.cc.monash.edu.au>
- NNTP-Posting-Host: hphalle6g.informatik.tu-muenchen.de
- Originator: fischerj@hphalle6g.informatik.tu-muenchen.de
-
-
- In article <4h9i69$fi6@harbinger.cc.monash.edu.au>, bmeyer@bruce.cs.monash.edu.au (Bernd Meyer) writes:
- |> Organization: Computer Science, Monash University, Australia
- |> Lines: 97
- |> Distribution: world
- |> Message-ID: <4h9i69$fi6@harbinger.cc.monash.edu.au>
- |> References: <4gm2qg$8lk@sunsystem5.informatik.tu-muenchen.de> <4grs7r$plr@harbinger.cc.monash.edu.au> <4gtq1c$mu0@sunsystem5.informatik.tu-muenchen.de>
- |> NNTP-Posting-Host: molly.cs.monash.edu.au
- |> X-NNTP-Posting-User: bmeyer
- |> X-Newsreader: TIN [UNIX 1.3 950823BETA PL0]
- |> Xref: informatik.tu-muenchen.de comp.sys.amiga.programmer:88317 comp.sys.amiga.advocacy:152975 comp.os.ms-windows.advocacy:134701
- |>
- |> Juergen "Rally" Fischer (fischerj@Informatik.TU-Muenchen.DE) wrote:
- |> : Bernd Meyer (bmeyer@bruce.cs.monash.edu.au) wrote:
- |> : : Juergen "Rally" Fischer (fischerj@Informatik.TU-Muenchen.DE) wrote:
- |> :
- |> : : what --- there is two standard ways to catch the vblank signal on a
- |> : : VGA card, and one of them is using an interrupt.
- |> :
- |> : Are you sure vblank interrupt is something "standard" on PC ?
- |> : I believe each newer VGA got the possibility to send such an
- |> : interrupt signal, but what about the _compatible_ way of using it ?
- |>
- |> What is the compatible way of using an interrupt? Sorry, I can't really
-
- compatible means "runs on all computer of a certain class" :->
- i.e. "runs on all PCs".
- i.e. won't fail on any VGA card.
-
- |> answer this question for you, Juergen. If you don't know how to use
- |> an interrupt, you probably shouldn't discuss things like this. And
-
- don't talk about me, face my arguments ;)
- I know how interrupts work, thanks.
-
- And I guess you'll get some trouble on other OSes than MS-DOS
- when trying to set up a fake vbl-int.
-
- |> BTW, it's not "newer" VGA cards --- it's been every VGA compatible card
- |> since the very first VGA card IBM delivered.
-
- there are differences between VGAs, I do know. The one will flicker if
- you update scrollregs while vbl-bit active, the other one if you do this
- short after vbl bit active (reference: commercial game producing screwed
- up display why tring to softscroll on my friends VGA).
-
- |>
- |> : : register. This is due to the fact that almost everyone quickly disables
- |> : : the vblank interrupt as wasting valuable resources.
- |> :
- |> : _polling_ is waste of respources!
- |>
- |> No, using an IRQ line for something as trivial as the vblank signal is
- |> a waste of resources.
-
- Yes, seen from the user of a Workstation (i.e a computer you _WORK_ on)
- maybe, but the user of a Multimedia station wants fast clean animation,
- which needs a vblank _interrupt_.
- My point of view is multimedia, i.e. max efficient use of cpu for animations.
-
- |>
- |> : so double buffering is waste of
- |> : recources. efficient rastersplit free animation needs tripple buffering,
- |>
- |> No problem with that --- although you only need triple buffering if
- |> you can't guarantee that you get one screenful of data created in the
- |> time it takes to display one screen. If you could guarantee that, you'd
-
- which is true for all mapping games, even on PC!
- Only turbo-consoles manage to map a scene in 1 frame maybe.
- This is not the problem I told about!
-
- |> have no need for triple buffering.
-
- for example doom is reported to magically not run above 35fps.
- reason: almost all current cpus are to slow to do animation in
- 1 frame. if it's fast enough to render in 1.01 frames, you lose
- cpu time when using double buffering, because then cpu _busy waits_
- for the next vblank to occur (and drops to 2 frames in that example).
-
- That's why they don't wait for vblank in descent any more.
- Result: max usage of cpu, _but_ rastersplit. this would not
- happen on a real multimedia platform.
-
- I do admit that PCs give most cheap cpu power now.
-
- |>
- |> : which needs either an interrupt or a gfx-hardware that will use a
- |> : write to adress-registers not immedeately, but after next vblank.
- |>
- |> *Grin* Well, Juergen, this sophisticated hardware you just described
- ;)
-
- |> is _also_ in every single VGA card since the very first IBM has
- |> ever produced. At the start of every frame (at the vblank signal, so to
- |> say), the value of the "start of image memory" register is sampled into
- |> an internal latch. So you don't even have to get the timing of the
- |> register write right.....
-
- that's nice. so if I had 2 buffers on a VGA in mode 13h, it would work.
-
- the alternative, modex, seems to be too slow when acessed by cpu,
- or why do you think so much PC games either rastersplit or busywait ?
-
- Tell me a way to do it (not only under DOS), and I will tell my
- friend who is about to implement POOG (gfx/game library) on PC.
-
- |>
- |> : : want an interrupt, you get one. How?
- |> : :[...]
- |> : : vblank signals. You can then set up one of those high precision timers
- |> :
- |> : one of those ? :) The _one and only_ which is able to cause interrupts
- |> : in a normal PC.
- |>
- |> There is two of them, actually.
-
- on all PCs ? a 2nd timer interrupt ?
-
- |>
- |> : : Now was that really so hard? All of the functionality used in this
- |> :
- |> : No :) I knew, my friend told me. He also told that there are some
- |> : problems. Such as interrupts occuring for the time the vblank bit
- |> : is set. bzzzt, another frame cpu busy-wait. Won't occur on a DOS demo,
- |> : but on a tasking environment it will.
- |>
- |> a) you could disable other interrupts for the time you wait. Very easy,
- |> and if you programmed your timer well, they are only disabled for
- |> a very short time
-
- yesyes, you can do a lot of evil things on DOS, the "DEMO OPERATING SYSTEM" :)
- that's why DOS is for games. gotta shutddown your tasking-OS for playing
- a game though, not quite state-of-the-art in multimedia age...
-
- |>
- |> b) You could set a certain timeout, after which you assume you missed
- |> the vblank and pretend it has been there, anyway. Be a bit more
- |> wasteful when reprogramming the timer, because you don't know how far
- |> down the image you are
- |>
- |> c) But most importantly: I don't think the VGA vblank bit gets reset
- |> by anything other than reading the register. Which would mean
- |> there is no way of "missing" it. I'm not sure, though, and I don't
- |> have a tech spec of the VGA standard handy at the moment.
-
- It's all a DOS harddwarehack.
-
- |> :
- |> : : You probably know where my money is. Have a look at the SVGALIB for
- |> : Yes, Bill Gates got it ;)
- |>
- |> If you still think that, Juergen, you are a lost case. I never paid
- |> a single cent, Pfennig, Oere, pecne or centime (and no other denomiations,m
- |> either) for an MS product. Never. Not once.
-
- wow! :) even I paid some pence buying my 8bit computer (msx). _shudder_ :)
-
- |>
- |> : : : I can't believe they'll ever implement those nice little things A500
- |> : : : already had (vblank & stuff) into PC hardware _and_ the OSes (win, linux).
- |> :
- |> : : And I can't believe how narrow-minded you are, sorry.
- |> :
- |> : You didn't read exactly, I didn't tell about vblank-polling.
- |>
- |> And I explained two standard methods of getting vblank interrupts.
- under DOS, yes.
-
- |> Now I really can't do any more than offering TWO methods, right?
-
- wait a minute, you told me how to hack the timer under DOS.
- what's the 2nd fake-vblanbk-interrupt method ?
-
- |>
- |> : But as narrow-minded resource-wasting PCer you probably can't
- |> : think of anything more :)
- |>
- |> I can. Can you?
-
- hey, all my computers got a real vblank interrupt, even my small 8bit one!
-
- |>
- |> Bernie
- |>
- ------------------------------------------------------------------------
- fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) =:)
-