The DOS Vsync

Started by
3 comments, last by Sponge99 24 years, 1 month ago
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
Advertisement
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.
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
}
}

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
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.

This topic is closed to new replies.

Advertisement