home *** CD-ROM | disk | FTP | other *** search
- Path: 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
-
-
- 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...
-
-