From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: Newbie needs Help! Allegro + W95 :-( Date: Tue, 7 Jan 1997 20:04:00 +0000 Organization: None Lines: 32 Distribution: world Message-ID: References: <32d1828e DOT 750845 AT news DOT demon DOT co DOT uk> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Martin writes: >Anyone help me out, Im just a newbie and have written a scroller as >you can see from the below code and its ultr smooth in DOS however in >Win95 its kinda smooth well its smooth then it jumps every now and >then :-(. Is there any way to tell windows to leave my program alone >and give it priority? . Or is it my no doubt very lame scrolling >method? The scrolling method looks fine to me. Although I'm not 100% sure why you are using mode-X. Since you are using a system RAM -> video RAM blit rather than doing hardware scrolling, there isn't any need for mode-X, and mode 13h (320x200) would be quite a bit faster. The problem is, I think, with the vsync() call. Win95 seems very erratic in it's handling of retrace syncing. Sometimes it works, sometimes it doesn't, which is very irritating (if only IBM had seen fit to include a retrace interrupt in the VGA design!). In this case your best bet is probably to remove the vsync() and use a timer interrupt to make sure things go at a decent speed instead. >map = create_bitmap (640,480); >clear (map); > >map=load_pcx(file_pic1,pal); This is redundant... The load_pcx() function creates a bitmap of the required size, so you don't need the first two lines. /* * Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ * Ghoti: 'gh' as in 'enough', 'o' as in 'women', and 'ti' as in 'nation'. */