Skip to main content
GameDev.net gamedev.net
🔒 Locked

The DOS Vsync

Started by Sponge99 Feb 28, 2000 at 12:41 AM 3 replies 4k views
Original Post
Sponge99
Sponge99
I have finally figured out how to check the DOS Vsync (for mode13h) so that there is no flicker. However, I think it is a tad slow, and would like some ASM code for it. I''m using DOS, w/ a Turbo C++ 3.0 from Borland. Thanks -- David Rogers.
"Now watch as I run away in a womanly fashion." - Batman
Cloxs
Cloxs
I can''t remember exactly how (it''s been almost a year since I did a graphics routine in asm). But you contact the video port, and request a VSYNC. If you search the net, looking for vidcaps.zip or something like that, you should find a doc that explains it. Or, goto www.programmerheaven.com.
Nick Murphy
Nick Murphy
Hopefully this will be of help:


void wait_for_retrace(void)
{
_DX = 0x03DA;

l1: asm {
in al, dx
and al, 0x08
jnz l1
}

l2: asm {
in al, dx
and al, 0x08
jz l2
}
}

Sponge99
Sponge99
Thanks for your help. The ASM version is alot smoother than the C version. I finally got good graphics going, so a game is SOOOO close!

-David [sponge99]
"Now watch as I run away in a womanly fashion." - Batman
farmersckn
farmersckn
hey, if you could, i''d like to see the game when you''re done, cuz im using turbo c++ 3.0 as well, and i''m doing almost exactly what you are. anyway, even if your not done with it, if you wanna email me what you have so far that''d be great. if not, though, i understand... thanks. o, btw, if you need anymore routines for 13h, i have a few laying around...
Yesterday is the past, tomorrow is the future. Today is a gift, that is why we call it the present.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.