Article View: rec.games.programmer
Article #1067Re: using video-ram in mde 13h (ibm pc)
From: John A. Slagel
Date: Tue, 10 Nov 1992 23:07
Date: Tue, 10 Nov 1992 23:07
36 lines
2289 bytes
2289 bytes
etljmme@etlxd10h.etlxd (jim moore xd/nda) writes:
>Hi Paal.
> Yes you can access a buffer which you declare in unused video ram but if you do,
>why not use page swapping rather than copy it across? All page swapping involves is
>telling the VGA to start the next scan from another place in VGA memory anyway!
[code deleted]
>I know this works in 320x400x256 mode so it should work in 320x200 mode. Be sure to
>clear your buffer or page before you use it otherwise your screen will fill will
>garbage.
I don't mean to say you're wrong, but unless you're using ModeX or
a derivative of it, this won't work. Standard VGA mode 13h takes
up 64K (320x200x1byte) which nicely fits into the video memory
page frame located at segment A000. There is no way to write to
the rest of the video memory. Which is why there is a modeX. In
this mode, there are 4 64K pages (0-3), where each page 'n' stores all
pixels that OFFSET MOD 4=n, so the offset that you use into the 64K
page frame is really divided by 4, so in the 64K page frame you can
access all 4 pages of video memory, which is 256K. So writing one
byte will light up 4 adjacent pixels. Then, to only light up
individual pixels, you turn on/off the cooresponding bit planes by
using standard VGA port writes.
Then, and only then, can you access anything past the first quarter
of VGA memory and use the code that was posted for setting the
starting address.
Hope this clears things up.
--
------------------------------------------------------------------------
John A. Slagel, email: jas37876@uxa.cso.uiuc.edu
Technical Details
Message-ID:
<BxIw8x.HKI@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876References:
<1992Nov10.102202.3413@alf.uib.no> <1992Nov10.175128.14865@ericsson.se>Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!ames!saimiri.primate.wisc.edu!sdd.hp.com!news.cs.indiana.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jas37876 From: jas37876@uxa.cso.uiuc.edu (John A. Slagel) Subject: Re: using video-ram in mde 13h (ibm pc) References: <1992Nov10.102202.3413@alf.uib.no> <1992Nov10.175128.14865@ericsson.se> Message-ID: <BxIw8x.HKI@news.cso.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: University of Illinois at Urbana Date: Tue, 10 Nov 1992 23:07:42 GMT Lines: 36