🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.ibm.pc.misc
Article #1465

VGA Vertical Sync Problems.

#1465
From: Noah Spurrier
Date: Wed, 02 Sep 1992 04:43
42 lines
1664 bytes
Does anyone know how to create a vertical sync for VGA? I am trying to
have a smooth color palette rotation, but the screen flickers. This is
essentialy the same problem that you encounter when trying to do flicker-free
animation... Standard VGA does not support IRQ2 as EGA does. My Card does have
an IRQ2 option, but I want my software to be portable... I tired adding the
following wait loop just before I update the palette, but I still get noise
in the upper 1/4 of the screen.

void set_all_rgb_palette(unsigned char far * pal)
{
 /* If a Vert Blank was already in progress then wait for next one */
 while (inportb (0x03da) & 0x08)
   ;

 /* Wait for Vertical Scan to end. Vert Blank Starts after this */
 while ( ! (inportb (0x03da) & 0x08))
   ;

 _AH = 0x10;
 _AL = 0x12;
 _BX = 0;
 _CX = 0x100;
 _ES = FP_SEG (pal);
 _DX = FP_OFF (pal);
 geninterrupt (0x10);
}

As you can se this uses Turbo-C psuedo register variables to about assembly.
Port Location 3da & 8 is the bit that goes high when the VGA is currently
in a Vertical Blank condition. My idea is to only update the palette while
the Vertical Sync is blanked. Seems obvious, but it isn't perfect.

What to do?

Please Email and Reply post your responses... Or at least Email...

Thanks!

Noah@wet.UUCP

OOPSS... That's supposed to be  noah@wet.UUCP   No capital N in noah...
Technical Details
Message-ID: <m0mPmUK-000BvOC@wet.uucp>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!gateway

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!elroy.jpl.nasa.gov!news.claremont.edu!ucivax!gateway
From: wet!noah@well.sf.ca.us (Noah Spurrier)
Subject: VGA Vertical Sync Problems.
Message-ID: <m0mPmUK-000BvOC@wet.uucp>
Newsgroups: comp.sys.ibm.pc.misc
Lines: 43
Date: 2 Sep 92 04:43:31 GMT