Mail Archives: djgpp/1997/09/10/09:54:59
Lots of posts here ask about the best way to access
video memory, well I have been thinking about this
lately and have a few questions on selectors in
general.
There seems to be 3 accepted ways of accessing
video memory, near pointers (FAT DS Hack)
far pointers (use FS)
make a custom selector to video area
With near pointers your programs area is set to the
4Gb limimt but wont work with NT
Q)So this got me wondering, what is your programs
DS selectors value normally? Is it a default
value? is it related to your programs size?
what happens to it if you malloc large chunks of
memory? is it dynamically resized?
Now with far pointers or custom selectors, to access
a memory loctaion you will have to use ES,FS,or GS
but this causes a default selector override and
causes a 1 clock penalty for each access. I seem
to remember reading (from Shawn Hargreaves?) that
near pointers are only about 5 percent faster than
farpointers? Is this why? is there any way to get
around this?(probably not)
Its a minor thing but hey 5 percent is still 5
percent!(but that 5% probably isn't worth
disabling memory protection with a Fat DS!)
Kind of a long post, sorry.
Brad Fidler
Wind Engineering Consultants
Guelph Ontario Canada
www.rwdi.com
bf AT rwdi DOT com
- Raw text -