www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/18/20:13:01

Date: Thu, 18 Sep 1997 17:10:48 -0700 (PDT)
Message-Id: <199709190010.RAA25520@adit.ap.net>
Mime-Version: 1.0
To: abderahim DOT boukhairi AT hol DOT fr, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Graphics:OK with 320x200 ->problem with higher resolution

At 09:49  9/18/1997 GMT, abderahim DOT boukhairi AT hol DOT fr wrote:
>
>I'm using since one month the compiler v2 . In the old version i got
>v1.1 it was easy to swap from 320x200 to 640x200 or to higher
>resolution .the location into memory was always the same 0xD000000.
>  //version 1 of compiler
>  /*memmove((char*)0xD0000000,back.virt,DEFX*DEFY);*/
>Writing to this location was always good and  not depending of the
>resolution.
>Since new version of the compiler i use 
>  //version 2 of compiler
>   movedata(_my_ds(), back.virt ,_dos_ds, 0xA0000,DEFX*DEFY)
>
>This is acting well when DEFX*DEFY = 320*200;
>but i always obtain segmentation violation when DEFX*DEFY = 640*480 or
>higher.
>it's perhaps that i have to write directly to graphic cards memory
>bank !
>Please tell me how to do that 
>(my graphic card got 1 Mbyte of memory)
>thanks!
You're on the right track. The problem is that the video memory is mapped in
conventional memory as only 64K. To use more than that requires bank
switching. Unfortunately, I don't know exactly how that works. One possible
place to find out is Ralf Brown's Interrupt List. Or you could look at the
source to Allegro.

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019