delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/06/16/11:08:32

Message-Id: <m0ylxEY-000S48C@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl>, djgpp AT delorie DOT com
Date: Tue, 16 Jun 1998 12:05:56 +0000
MIME-Version: 1.0
Subject: Re: 64k demo
In-reply-to: <358305BC.61AB@stud.warande.ruu.nl>

Elliott Oti <e DOT oti AT stud DOT warande DOT ruu DOT nl> wrote:

> Archee/CoNTRACT wrote:
> > 
> > Two guys made a demo only 64k with real time generated animation.
> > Most of 64k demos were made in assembly only.
> > I saw, they used __asm__(" ... "); a lot.
> > 
> > I think, it is not a good idea to make 64k demo in DJGPP
> > Because: the CWSDPMI takes 25Kb
> >          and djgpp produces too big exes for this. (sizeof "hello world"
> > too big)
> > 
> > How did they do that ?
> > What linker did they use ?
> > I think, they have got their own smaller extender.
> > They were beginner in PC.(they came from Amiga)
> > 
> > What is the way to use DJGPP in a 64k intro ?
> > 
> > I only can use WATCOM for this by using the extender called PMODE BY
> > TRAN
> > without default libs.(and some small asm lib)
> 
> Some idea's for keeping the size down:
> 
> * Use the PmodeDJ extender instead of cwsdpmi and merge it with your
> executable.
> (Get it from the same place you got djgpp)

I think that is part of the roules of the category. I think the intro must be 
64Kb in one file not 2 files (CWSDPMI + INTRO) so yes PMODE/DJ is the best 
choice. But if the intro will run in a Win95 box you could save a lot of code 
not including the DPMI host ;-))) (I doubt it's allowed).

> * Strip the executable (strip myexe.exe)
> * Use djp to compress the executable (get from same place you got djgpp)
> by about 40%

Yes, that's good. 
Note 1: djp strips the exe first so you don't need to do both.
Note 2: Markus and Laszlo are working on UPX, it compress wonderfull.

> * Don't use C++, use only C.

* Don't use C use ASM ;-)

> * Call as few libc functions as possible, and where possible replace
> them with short inline assembler eqivalents. This is not to say the libc
> functions are inefficient, but they may in turn call other functions, or
> set up error-handling code, or atexit() functions etc. We all know error
> handling is unneccessary -- Ctrl-Alt-Del is there to handle errors for
> us :-)
> * Take it easy on static arrays and static global variables and try and
> allocate as much dynamically as you can.

I think the C compiler (not C++) puts all the static arrays in BSS and hence 
they aren't in the EXE. Additionally if he will compress the file it doesn't 
matter. So I suggest the opposite: USE static arrays for any thing you can they 
are faster for what you want to do.

> * See the FAQ for more ideas on reducing code size.

Yes specially on how to avoid the globbing code and other unneeded features.
 
> 4K, 16K, and probably also 32K demo's are impossible with djgpp, but I
> think you could pull off a decent 64K demo stunt with plenty of good
> effects. I would love to see the result if you can make one :-)

I want to see it too.
I saw wonderfull intros of 64Kb and very good things in 1K and 4K (impossible 
to understand how they did so much with 1K).

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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