Mail Archives: djgpp/1996/02/15/19:49:36
In article <311E4482 DOT 4B0F AT unm DOT edu>,
<strider7 AT unm DOT edu> (Not his real name) wrote:
>Pieter Kunst wrote:
>>
>> In article <4fbqgg$ljm AT dziuxsolim DOT rutgers DOT edu> Anthony Cowley <acowley AT erclab DOT rutgers DOT edu> writes:
>> >
>> >Please, I'm not looking for libraries to do everything for me. I'm a
>> >do-it-yourself kind of guy, so I'd like to use my existing routines. I just
>> >need the info above to continue.
>> >
>> >Plus, I'm a total newbie when it comes to 32-bit coding, so I have no clue
>> >here. What should I know? Or where can I get the file that tells me that?
>> >
>
>I know how ya feel, ok, you can't access the video mem the same. V2
>has far pointer functions, they act like far pointers. It goes
>something like this.
>
>#include <sys\farptr.h> // far pointer functions
>#include <go32.h> // _dos_ds, dos selector
>
>int screen= 0xa0000;
>
>int main()
>{
> _farsetsel(_dos_ds); // set up selector for _farnspokeb
> set_video_mode(0x13);
>
> _farnspokeb(screen, 2); // "pokes" video mem with a green pixel
>
> set_video_mode(0x03);
>
> return 0;
>}
>
>you are prolly saying, "I don't want to use functions, I want to write
>directly to memory!" Well, don't worry, compile your programs with
>the -O3 and the far functions are lightening fast, just me, if you
>don't trust me, trust DJ. Also, look at the sys\farptr.h file.
You can find a slightly more eloquent (but not much) version of this at
http://www.rt66.com/~brennan/djgpp/
Plus a bunch of other nifty DJGPP+games related stuff.
--brennan
--
brennan AT rt66 DOT com | "Disco Stu doesn't NEED to advertise."
- Raw text -