Xref: news2.mv.net comp.os.msdos.djgpp:2726 From: arcanix AT aol DOT com (Arcanix) Newsgroups: comp.os.msdos.djgpp Subject: Re: Transition from DJGPP1 to DJGPP 2.0 Date: 14 Apr 1996 11:25:37 -0400 Organization: America Online, Inc. (1-800-827-6364) Lines: 36 Sender: root AT newsbf02 DOT news DOT aol DOT com Message-ID: <4kr5dh$8vb@newsbf02.news.aol.com> References: <4kqabd$lo9 AT freenet-news DOT carleton DOT ca> Reply-To: arcanix AT aol DOT com (Arcanix) NNTP-Posting-Host: newsbf02.mail.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp >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.