Mail Archives: djgpp/1996/04/15/13:41:33
>I have been wanting to upgrade to DJGPP 2.0 since most of the new tools
>and that are for 2.0 only, but one thing is holding me back.
>In DJGPP 2.0, the 0xD0000000 address for video memory was removed. This
>will break virtually all my already written programs, requiring me to
>rewrite all their video functions to use the slower libgr that routines,
>and requiring me to completely rewrite programs that use a blitting
>function I wrote.
>Is there any way to upgrade and preserve backward compatibility for these
>programs? (In fact it seems rather irresponsible, at least in hindsight,
>to make a feature on a program only to remove it later such that people
>have to rewrite lots of stuff... Was it known in advance when you made
the
>D0000000 thing that it wasn't permanent, as my docs never said not to use
>it...?)
>If there isn't, what the heck am I supposed to do to upgrade them?
Well, there's a couple of solutions to your problem. These are the ones I
know of.
1.Use the _farpoke functions. Seems rather slow to me.
2.Use asm with selectors and other stuff like that. (Not sure exactly how
to do this. Look at farptr.h and look at the asm there, this might help.)
3.Use the allegro game library.
4.The easiest method is to use nearpointers through nearptr.h. This is
also the most dangerous method, as it disables all protection, but it
works well. Use:
if(__djgpp_nearptr_enable())
{
unsigned char *video_mem= (unsigned char *)
0xA0000+__djgpp_conventional_base;
}
This sets up a pointer to the video memory.
- Raw text -