Article View: comp.sys.atari.st
Article #24654Re: double buffering using vdi ops
From: sansom
Date: Fri, 30 Jan 1987 03:37
Date: Fri, 30 Jan 1987 03:37
39 lines
1916 bytes
1916 bytes
In article <2430@mtgzz.UUCP> bds@mtgzz.UUCP writes:
>How does one use the Setscreen() xbios routine to do double buffering
>with vdi operations. Is there a trick to this? When I set the
>logical base to an array and do vdi operations followed by setting the
>physical base to the array, the result is garbage. Any suggestions?
You must make sure that your buffer starts on a 0x100 byte byte boundry
or the display _will_ be garbage. Try this:
char screenbuf[32256]; /* (160 x 200) + 256 */
long screenptr; /* address of new screen */
.
.
.
/* get the new screen's address & make sure it's on a 0x100 boundry */
screenptr = (long)(0x100L + ((long)&screenbuf[0] & 0xffff00L));
/* make the new screen both the physical & logical screen */
Setscreen(screenptr, screenptr, -1);
That should do the trick (warning - this code is untested in that I've
generated it here at my terminal; still, if I've made no typos, it
should work).
-Rich
--
__________ ______ ____ _____ ___
/_________//___ ||__|/____|/__/ Richard E. Sansom
___ ____/ / ____________ TRW Electronics & Defense Sector
/ / / /\ < | /| / One Space Park Drive, R3/1028
/ / / / \ \ | / | / Redondo Beach, CA 90278
/__/ /__/ \__\|__/ |__/ ...{decvax,ucbvax,ihnp4}!trwrb!sansom
Technical Details
Message-ID:
<1570@trwrb.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!sdcrdcf!trwrb!sansomReferences:
<2430@mtgzz.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!rutgers!sri-spam!sri-unix!hplabs!sdcrdcf!trwrb!sansom From: sansom@trwrb.UUCP Newsgroups: comp.sys.atari.st Subject: Re: double buffering using vdi ops Message-ID: <1570@trwrb.UUCP> Date: Thu, 29-Jan-87 22:37:07 EST Article-I.D.: trwrb.1570 Posted: Thu Jan 29 22:37:07 1987 Date-Received: Sat, 31-Jan-87 07:21:19 EST References: <2430@mtgzz.UUCP> Reply-To: sansom@trwrb.UUCP (Richard Sansom) Organization: TRW EDS, Redondo Beach, CA Lines: 39 Keywords: Help needed