------------------------------------------------------------------------------                                                             
         _____ _          _____ _         _    _____       _         
        |_   _| |_ ___   |  _  |_|_ _ ___| |  |_   _|_ _ _|_|___ ___ 
          | | |   | -_|  |   __| |_'_| -_| |    | | | | | | |   |_ -|
          |_| |_|_|___|  |__|  |_|_,_|___|_|    |_| |_____|_|_|_|___|
                                                                     
------------------------------------------------------------------------------


                      STNICCC 2015: "Zero Three Zero"



------------------------------------------------------------------------------
Requirements:
------------------------------------------------------------------------------

- 16MHz Falcon030 (68030 CPU)
- 68882 FPU (!)
- 4MB+ ram
- decently quick HD, for the audio stream
- RGB preferred, but will on VGA too



-------------------------------------------------------------------------------
Notes:
------------------------------------------------------------------------------


The executable code is 64k (packed) plus ~40k of static tables (unpacked), 
plus a large raw streaming audio track.

- *All* visual effects generated in realtime, combining CPU/DSP/FPU. 

- Precalc is used only for math tables, preparing stencils & the CRT-fx  
  pixel cells.

- Demo will write out 'crt.dat' file after first run, mainly to reduce startup 
  time on next run(s).

- Demo *can* run without audio stream, e.g. if it causes performance issues
  with untested HW/SW configs (by renaming the 'track.s16' file).

- VGA uses a 384-pixel mode and 32MHz clock. This will foil bus-boosted f030's
  so a post-party patch will appear later for that scenario!


------------------------------------------------------------------------------
What's actually in the demo (?):
------------------------------------------------------------------------------

- fixedpoint signed distancefield / sphere tracing algorithm
- combined with sparse rendering = 'caledonian realtime' ;)
- distancefield modulo/repeats
- multi-bounce raytracing + fresnel for reflections
- surface displacements (bumps, ripples)
- self-shadowing (menger)
- diffuse, lambert + specular highlight shading
- ambient occlusion for soft shadows
- edge halos (+ve, -ve)
- realtime fractals shapes (menger, mandelbrot)
- field animation (blobs, gallery cube, enigma balls etc.)
- CSG effects
- stencilled rendering
- nearly all screens use 19bit hicolour rendering (2-field pseudocolour)
- no bitmaps, no textures, no deltas, no animations
- zero polys and shaders!
- framerate independence, so it *should* run more smoothly (same duration)
  on faster machines, after the bugs are fixed ;)

------------------------------------------------------------------------------

Extra thanks to ggn + havoc for help testing, preparing the submission.

Greetings to all at STNICCC and the Atari scene at large!


dml/tpt : Dec 2015
