www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/15/06:10:08

From: Yamaha / XYZZ <scriven AT CS DOT ColoState DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Can't get 'nearptr' to work in linear 640x480x24-bit
Date: Tue, 14 Jan 1997 12:49:38 -0700
Organization: XYZZ Software Co.
Lines: 33
Message-ID: <32DBE352.1CFB@CS.ColoState.edu>
References: <32D72607 DOT 3A55 AT osha DOT igs DOT net>
NNTP-Posting-Host: miro.vis.colostate.edu
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Delong wrote:
> I took a look at the method used in VBE.ZIP by Charles Sandmann and
> found that his rather nice 'nearptr' method worked in 640x480x256 colour
> mode but when I tried it in 640x480x16.7M I get SIGSEGV errors whenever
> I try to access any vid mem, even the first 3 bytes.

I recently got/modified the same source.  It helped a lot to get the
vbe2.0 specs along with Charles' source.  At first, I had problems using
highcolor/truecolor modes too (using far pointers (I guess I'm
old-fashioned)), but my problem turned out to be that I wasn't
requesting access to enough memory.

I just forgot to multiply the width*height by (BitsPerPixel/8) when
figuring how much memory to request.  This might be what isn't working
for you, though maybe not.

> Also, I tried both asm and dosmemput() for faster bitmap routines but it
> (my vid_selector) seems to be set for a limit of 64k and so I can't seem
> to use it in linear mode. I tried __djgpp_set_segment_limit() but it
> didn't work (I doubt if it even has anything to do with selector limits)
> Any solution to this?

If you're using near pointers, why are you using another selector for
video memory?  And why would you use dosmemput() to access a linear
frame buffer?  Using near pointers pretty much disables memory
protection, so that you can access all memory without mucking about with
selectors all the time.


-- Yamaha / XYZZ          "May farce the with be you."
mailto:scriven AT CS DOT ColoState DOT edu          
mailto:scriven AT VIS DOT ColoState DOT edu
http://www.vis.colostate.edu/~scriven/

- Raw text -


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