Polling loop good here???



At the risk of beating a dead horse... This question just popped up on the linux-assembly list. Hasn't gotten any answers yet, and I don't know a good answer...

-------------------------------------------
Any ideas how I might sync to bit 3 of port 0x3DA, the video card's vertical sync signal?


Just watching the bit in a loop doesn't seem like a good idea, since the CPU could be off doing something else, but as far as I know any timer function I might use will only be accurate to 1/100 of a second, which wouldn't be much better than watching the bit in a loop.

Since things like DOOM run in Linux, I think there must be some way to do it. I've discovered that simutaneously changing the screen data and the color palette without synchronization creates a flicker of a mess on the screen, and DOOM doesn't do that in Linux, so I guess it must be synchronizing somehow.
------------------------------


I suspect we're all agreed (?) that it would be really cool if there were an interrupt on vertical retrace, but there isn't. There may be a way to "block" waiting for this, but I don't know how to do it. I fear we may be "stuck with" a polling loop here...

Anybody know the "right" way to do this?

Best,
Frank

.



Relevant Pages

  • Re: [OT?] Question about Linux AtariSIO
    ... > I had all but given up on ever using my Linux server to host files for my ... > it not for Doom 3. ... > download the driver installer and it said there wasn't a precompiled driver ...
    (comp.sys.atari.8bit)
  • Re: yet another reason not to buy vista...
    ... One can play Doom under Linux ... ... It looks like its the shareware version. ... The root install is for a system-wide install. ...
    (alt.os.linux)
  • Re: [SLE] FYI: Games for Linux
    ... Doom with attractive OpenGL graphics under linux? ... Download and install Jaakko Keranen's "doomsday". ... All sounds and musics play well. ...
    (SuSE)
  • Re: [SLE] FYI: Games for Linux
    ... I can never get Doom or UT to work on Linux. ... the screen that spashes for the game. ... Someone should do a CD with Quake, Doom and the DOS version of Wolfenstein ...
    (SuSE)