www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/04/25/16:30:56

Date: Thu, 25 Apr 1996 15:21:08 -0400 (EDT)
From: dunder <dunder AT nyongwa DOT montreal DOT qc DOT ca>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp AT delorie DOT com
Subject: Re: V2 = hmmm
In-Reply-To: <Pine.SUN.3.91.960425104335.23363N-100000@is>
Message-ID: <Pine.LNX.3.91.960425151105.18283A-100000@noether.nyongwa.montreal.qc.ca>
MIME-Version: 1.0


> `ScreenPrimary' is not an array, it's a number!  You cannot index into it
> in v2.0!  You should instead use it in calls to functions such as
> `dosmemput' that accept linear addresses (which is what `ScreenPrimary'

I kinda noticed that :) I figured out looking in the info files. But 
still, I don't have much more of a pointer!

> is).  If you want to access the screen directly with the ``nearptr'' 
> facility, you should generate a pointer to short using the value of 
> `ScreenPrimary' and then index into that pointer.  For an example, see 
> the section on `__djgpp_nearptr_enable' in the on-line docs of the C 
> library.

Hmm ok I'll check that...

> > I also had to add a #include "c:\djgpp\src\libc\co80\sc.h" in order for 
> > GCC to be able to actually recognise the variable ScreenPrimary (which 
> > now point to some other structure..)
> 
> That's not the correct way to do this.  You should include <pc.h> that 
> defines ScreenPrimary.

I know, even in v1.12 you always need pc.h, the problem was that pc.h did 
not define the go32 block to which ScreenPrimary points 
(xxx.linear_adress_of_primary_screen). I now use <go32.h>.


> No they won't.  Look at the games: almost every one of them comes with 
> such an external program, and nobody complains.  The latest and hottest 
> QUAKE (a successor to DOOM) is compiled with DJGPP and comes with 
> CWSDPMI, so apparently not everyone barks on it.

sigh, most games use XMS and EMS as drivers which are usually defaults on 
every machines. But I guess that poeple don't bark at Quake because it's 
... Quake! But take a smaller game, a shareware perhaps, will people 
bother for a shareware? One among thousands! And it uses some wierd 
driver! I'll check somewhere else.  no?

> > Yep, as stated I would, I read the FAQ. But the problem was with 
> > Smartdrive which ate 2.5M of my memory ;) 
> 
> Too much for a 8MB machine.  And if you run under Win95 (do you?) what do 
> you need SmartDrive for anyway?

I don't, I disabled it too!

> 
> > DPMI memory available: 5420 Kb
> > DPMI swap space available: 2556 Kb
> > 
> > and I setted the DOS Box to 16M which as far as I could set.
> 
> That is too low amount of swap space.  Please read section 15.8 of the
> FAQ; it tells you to set the EMS and XMS memory to -1 on the PIF file for
> the DOS box, so that Windows will let you use all the virtual memory it 
> can get.
> 
> For Win95, you should set the DPMI memory on the DOS box property sheet 
> to 65535K (not Auto!), for Win95 to let you use maximum virtual memory.

What you don't quite get is that it CAN'T be set to 64M! The limit is 16M!
anyhow, that's unimportant as I'm better off testing on the lowest memory 
machine to make programs compatible on any low-memory machine.

- Raw text -


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