Mail Archives: djgpp/1997/01/15/06:10:08
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 -