delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/16/23:58:36

From: DavMac AT iname DOT com (Davin McCall)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Writing to a Selector?
Date: Sun, 17 Oct 1999 02:49:42 GMT
Organization: Monash Uni
Lines: 38
Distribution: world
Message-ID: <3809382e.2775103@newsserver.cc.monash.edu.au>
References: <7u9jra$a2t$1 AT news8 DOT svr DOT pol DOT co DOT uk>
NNTP-Posting-Host: damcc5.halls.monash.edu.au
X-Trace: towncrier.cc.monash.edu.au 940128505 10474 130.194.198.138 (17 Oct 1999 02:48:25 GMT)
X-Complaints-To: abuse AT monash DOT edu DOT au
NNTP-Posting-Date: 17 Oct 1999 02:48:25 GMT
X-Newsreader: Forte Free Agent 1.1/32.230
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

To do this, you have two choices. One is to map the video memory into
a space that you can access directly (I don't think this is possible
if you intend to run the program under Windows). The other is to use
what is known as "the nearptr hack".

More information about both is in the FAQ. Read it!

If you want an example program that does exactly what you want, using
the nearptr hack, and a standard VGA mode rather than VESA modes, see
the source to a small (mostly incomplete) game I wrote a while back:

http://yoyo.cc.monash.edu.au/~davmac/raiden_source.zip

(there is a link to it from my main page, see my signature)

Davin.


On Sat, 16 Oct 1999 11:24:25 +0100, "Hammy"
<darren AT grayce DOT freeserve DOT co DOT uk> wrote:

>Okay, this maybe the dumbest question.  But I found some source
>code to write to the video card usingt he VESA...blah...blah.
>and once switched to the mode, it sets up a selector using the PhysbasePtr,
>with*height of the mode, stuff like that.
>
>to write to the screen it uses a command called _farpokeb or something like
>that.  Anyway, I was wondering,  how can you address the base memory fromt
>he selector?
>
>
>say the selector is  VideoRam, its type is an Int and its not a pointer, so
>you can do this  VideoRam[place on screen] = color
>so, how do you do it without that poke thingy?

__________________________________________________________
       *** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019