************************************************************************** **** FAST FPU FRACTAL FUN (FFFF) v2.0 **** **** (C) 01/10/1995 Daniele Paccaloni [DDT/HBT] **** ************************************************************************** *** Contact me in Internet at: paccalon@linux.infosquare.it *** *** or paccalon@ghost.dsi.unimi.it *** ************************************************************************** 0.-1 : FFFF HISTORY * v1.0 : First release. Only used 320x200 with 256 colors (MCGA). * v1.1 : Never released. Added some little improvements as well as model specific registers support giving exact MFLOPS values (pentium or better CPU). Core routine a bit faster. * v2.0 : Uses 800x600 with 32768 colors (VESA SVGA, HiColor mode). Up to 32000 colors simultaneously on screen for unmatched rendering quality. Added a palette editor. Custom mouse pointer routines using old authentic golden-days Amiga's arrow shape. Added zoom-box. Added global zoom-out function that restores the whole set. Keyboard buffer is now flushed on exit. 0.0 : INTRODUCTION Another Mandelbrot set generator.... why should i care ? I have plenty. Well... there are 4 main reasons for you should care: 1) FFFF is the first Mandelbrot generator working in hicolor gfx modes thus using up to 32768 different colors on screen. ... or at least the first i have seen ... :) 2) FFFF has the fastest hi-res Mandelbrot core routine. Even faster than Fractint when using floating point maths. If my pentium's MSR says right FFFF should be calculating at a speed of about 26 MFLOPS (100 MHz pentium). 3) FFFF is SMALL !!! Executable is 4460 bytes (less than half this doc size) !!! You can fit it in any disk. (It's 100% machine code. 000% C code). 4) FFFF is FREEWARE! But if you want to send me money, hardware, food, girls, please DO IT ! :) You are free to use FFFF and to copy it, but you must NOT modify the original archive. If you register sending me $5 (five US dollars) you will receive all future updates (my address is at the end of this doc). 1.0 : WHAT DO I NEED TO RUN FFFF ? Read before you complain... Evenif the code is pentium optimized you just need a 80386 (at least) and of course a math coprocessor. If you have a pentium you will get the REAL performance, consider that FFFF is tuned for the pentium's FPU. Any of the following processors will run FFFF: * 80386 + 80387 * 80486SX + 80487 * 80486DX * 80486DX2 * 80486DX4 * Pentium (Don't worry, the Mandelbrot formula has no FDIV inside! :). * P6 (or Pentium-PRO) ? (not tested yet :) You need less than 80 KB of available RAM to run FFFF. You need a mouse driver (any should work since release 2.0 has custom built in cursor routines). ----- VERY IMPORTANT: ----- You need a SVGA supporting 800x600 with 32768 colors. Your SVGA should have a VESA BIOS supporting the bank change function (all decent new SVGA have this function). If your SVGA BIOS cant do this, please load a recent VESA TSR (like UNIVESA.EXE or UNIVBE.EXE). If you have some problems (you see only a mangled image on the top of the screen) this is probably due to your SVGA BIOS not correctly supporting the VESA bank change function: loading a recent VBE TSR (i like UNIVBE.EXE) should solve the problem. If printed messages appear splitted or stretched or do not appear at all it's not my fault. Especially on many Cirrus boards the BIOS print routine does not work right in hicolor modes. It's time for them to FIX this. I use a Diamond Stealth-64 and all's fine. 1.1 : HOW IS IT POSSIBLE ? FASTER THAN FRACTINT ? Well, not always. Fractint, at low zoom levels, uses integer-calculations and will be faster. Also, Fractint has a guessing algorithm, nice trick to speedup calculation of areas of the same color. When is FFFF faster ?? Well, when you go deep-zooming inside complicated areas of the mandelbrot set (like i do :). If you only want to see the entire set then use Fractint ! Fractint also uses mirroring on the X axis, that halves the time to render the entire set but is completely useless when you start to zoom ! 1.2 : HOW DO I USE FFFF ? When you start FFFF, it will calculate the entire Mandelbrot set. When it's done there will appear the mouse pointer arrow and you can zoom. You can stop the calculation any time, just keep SPACE pressed until it stops ! Remember that when the calculation is in progress you can't see the mouse arrow, nor you can zoom or edit the palette. The only thing you can do when FFFF is calculating is wait or press SPACE to stop it. Choose one... Now, click on the upper left corner of the box you want to zoom and KEEP the button pressed. Release it when you are on the lower right corner of the box to zoom. In this version of FFFF i have at last included a zoom-box so that even the dullest user can use it easily. If you want to increase/decrease the number of iterations used by the formula just keep the right mouse button pressed and move the mouse to the right/left. The default number of iterations is 255, you'll want to increase it when zooming if the black region is too large (up to 65535). More iterations mean more time to render ! If you zoom too many times then you will see the screen all filled with same-color pixels... congratulations, you've reached the 10^15 zoom limit of the floating point coprocessor. The fractal trip is one way. If you want to zoom on another area then press the 'R' key to zoom-out to the whole set. You can exit from FFFF using the ESC key. 1.3 : WHY 32000 COLORS ? HOW DO I EDIT THEM ? All other Mandelbrot programs use 256 or less colors. They are many but... sometimes, zooming in complicated zones using many iterations (like on big "galaxies") you will see your 256 colors repeated cyclically (i.e. iterations 1, 257, 513, 1025 will all use the same color: color 1) thus rendering a color-poor, boring or even confused image. FFFF v2.0 is using a palette of 32000 colors. Any color of the palette has 32 levels of R, B and G so the possible color hues are 32^3=32768. This allows you to associate a different color to any iteration in the range 1..32000. Since it's hard to calculate a Mandelbrot image with more than 32000 iterations (i haven't a Cray supercomputer, yet..), you can change the color of any iteration without affecting the color of another one. When the program starts the palette is the default one, generated by a simple parametric sawtooth function. All colors in the palette (0 to 31999) are defined. You can edit your 32000 colors palette using the Palette Editor (press the P key after the calculation stops). You will see four color bands, one representing the red function, another the green function, another the blue function and another the current palette. In the x-axis there's the color number. Since the screen is 800 pixels wide you can view only 800 colors at a time. When you first enter the Palette Editor you see color 0..799 (color page 0), pressing the "Cursor Right" or "Cursor Left" keys you can move to other color pages. Color page 27h, for example, shows colors 31200..31999. Color pages other than 0 are useful only if calculating the mandelbrot using more than 800 iterations (obviously). To edit each color just move the mouse to the corresponding x position and press the left key on the wanted value in the R,G or B function bands. Keep the button pressed and slowly move the mouse to edit adiacent colors. You CANT redefine color 0 (BLACK, the Mandelbrot inside color) because i hate mandelbrot inside colors other than BLACK. To rotate the palette left or right press the cursor DOWN or UP keys. When your palette looks nice, press the SPACE bar to return to the previous image. It will be recomputed because of the new color palette. 1.4 : FUTURE RELEASES Planning a 16M colors version. I will include a screen saver (TGA files) for all registered users ($5). If i get enough messages of people saying i should improve the GUI, i will :) But gimme feedback ! Model specific registers will report exact MFLOPS values for your system if you have a pentium or better CPU (this feature is already implemented but results are not shown, sorry). 1.5 : FINAL WORDS ! I coded FFFF because i love fractals. I also want to show that on an MSDOS machine there can be nice programs even if they do not need 10 MB of disk space (or require 8 Mb of RAM). The secret for FAST&SMALL is 100% MACHINE CODE !!! Let me know for any comment or suggestion ! Contact me: EMAIL : paccalon@linux.infosquare.it (use this if you can) or paccalon@ghost.dsi.unimi.it MAIL : Daniele Paccaloni Via Agadir 10/A, 20097 S.Donato (MILAN) ITALY