"Fli" source code explanation
Contents
How to compile the DOS version
How to compile the Windows version
Related pages
How to compile the DOS version
This version is designed to be compiled with TASM 3.2,
which was supplied with Borland's Turbo Pascal a long time ago.
Of course you have to modify the paths d:\tasm32\tasm and d:\tasm32\tlink in the MakeDOS.bat file
before running this makefile.
Once the exe has been created, it is packed by lzexe.exe, which allows to reach the final size of
4087 bytes (note :
in demo-parties, the competition reserved to coders sets a maximum limit of 4kb, that is 4096 bytes).
Despite it is a DOS intro, it runs correctly under Windows 98 and Windows 2000 : launch the exe, then
(under Windows 98) answer "no" to the question "do you want to modify the properties of the shortcut so that it always runs in
MS DOS mode". After the text screen, the resolution should change to 320*200 256 colors,
if this is not the case try the ALT+ENTER keys combination.
At any time in the intro you can jump to the next part by pressing ENTER, or quit with ESC.
How to compile the Windows version
This version is made to be compiled with MASM 6.14. If you don't have it, download
this file, and follow the installation process.
Then copy to the \include directory the
\OpenGL and \WinExtra folders
that are provided in \Masm32_Include with my sources. Replace in the file MakeGL.bat
the d:\masm32 paths by the one corresponding to the location where you have installed Masm. Run MakeGL.bat,
once the exe has been created it is packed by upx and its size goes from 10kb to 7kb.
Some information about this Windows version :
- it uses OpenGL only to send the images of the intro to the screen, but all calculations are made by the CPU like in the DOS version.
This is not a program accelerated by the 3D card.
- if the intro ever is slow and lasts more than 2 minutes, it means you have a problem with your graphic drivers or they're bad, and
the copy to the screen is done in software. This happened to me once, installing more recent drivers solved the issue. This intro has
been successfully tested on GeForce 1/2/3 and Radeon, under Windows 98 and 2000.
- the intro runs in a non resizable 640*400 pixels large window. In fact the calculations are still made in 320*200, and the picture
is enlarged at display time. Some drivers don't like having to transfer a big buffer in one time (with glDrawPixels), so the window
is divided in 4 equal parts.
- supporting Windows of course requires some additional code, hence the size of 7kb instead of 4. But I have not especially tried
to optimize the size of this port either. Apart from the use of OpenGL, the biggest modifications have consisted in replacing the
segment+offset 16 bits memory model by a 32 bits one, and in removing the self-modifying code (it is possible to write to the code's
pages under Windows, but it's not advisable).
- the ENTER and ESC keys have the same effect as in the DOS version (respectively 'next part', and 'quit').
Some useful links to code in assembly under Windows :
Iczelion's Win32 Assembly Homepage
Hutch's home page
UPX (packer for PE executables)
Related pages
donwload old school demos
old school demos' screenshots
the demoscene
back to top