WHY - by Extream for Atari Falcon 030, 2018
-------------------------------------------

Technical:
- Runs on "stock-Falcon", 4Mb/HDD/RGB (preferred)/VGA
- Runs on Hatari, but *really* not recommended (may fail from time to time)
- Whole demo uses 320x240x16bit graphics mode

Credits, etc:
- Music, VonDemus, Falling Stars
- Graphics, Niko Mannonen / Yle, photos of owls
- Graphics, Ilpo Laitinen, Moon over the lake Keitele
- Code, Emphii
- Party, Silly Venture 2k18 (3rd place), 1st non-releaseable release


Other graphics used in this project:
- "don't walk/walk" from bottomless storage of the internet
- "space" see above, modified by Emphii
- "monstera" see above
- "globe" modified strava heatmap
- landscape map, calculated from heightmap, terrain blocks from the internet
- "sword" planned by Emphii, based on moon bridge from Ilpo's picture
- "Why-logo" by Emphii using parts from the sceens
- "bacon/heaven" twister texture by Emphii, also the text blocks
- water animation by Emphii
- Exream-logo by Emphii


Other nice to know things:
- lz77 by Ray / .tSCc. (orig. Haruhiko Okumura & Adisak Pochanayon)
- Dynamic Difference PCM Encoder
  * ddpcm routine is based on Bits'n'Bites article by Marcus Geelnard
    68030 replay routine by Emphii / Extream basing the loader from
    mp2d2d routine by Ray / .tSCc.
- VGA is slower and timings has been made against the music and RGB.
  You probably miss something in couple of screens.
- Programs used in this project (by Emphii at least)
  * Devpac 3.1
  * Devpac DSP/56
  * GFA-basic 3.6TT
  * Gimp
  * Audacity
  * FL-Studio (VonDemus)
- 3d dsp screens have some bugs, but I couldn't find the fix for it. Even
  there are double buffering and screens runs in one vbl (on rgb!), they
  behaves like I'm drawing directly to visible screen.
- smooth running unfortunately stops/lags frequently (approx. 16 seconds
  intervals) because of need to load the data for the music.


Story of this project:
I started to plan this demo quite after I finished the Prepare. But
I was lacking the ideas and I was also decided to learn the secrets
of the DSP.

I started to study the DSP from the "red book of Motorola", reading
the Aggressions Motion code and asking help from the people in DHS.NU.
You guys really rocks. In time I succeeded to transfer the data from/to
DSP and could start make some interesting code with it.

The landscape -screen.
In Prepare I had first try-out, what it is. But it could only travel
in one direction (two actually). I wanted to have a bigger map, where
I can wander around and can even watch freely 360 degrees.
I made researc with gfa, and when I was happy enough with the base, I
moved to the DSP.
I made the viewing part with DSP. The viewable part of the map will be
delivered to the cpu, where I make raycasting and texturing. I had plans
to make a better curves with interesting camera rotating, but this time
camera moves towards "north-east" and the camera is just rotating around.
The scale of rotating is 1/4 degrees.
The heightmap is made with Gimp and the landscape is calculated with
gfa.

The sword -screen.
Ilpo put some pictures he has shot, to FB. When I saw that picture, I
immediately started to picturize the effect that moon bridge turns to
moon sword, like it more looks like. I contacted Ilpo and asked for the
permission to use that picture.
I started to build the 3d calculation engine for the DSP. It was pretty
hard work, but countless hours to used for debugging, it finally broke-
thru. There are only 558 dots calculated and projected in dsp.

Bacon/heaven twister -screen.
"Take something old, improve it and et voila".. This turned to greetings
screen without any question. And It's quite slow.
I started to call this to bacon/heaven-twister, because of the colors.
I realized that once, I was running the screen and took the bacon packet
for the cooking.. Someone may see it different way.

Julia island -screen.
While I was plannig, what would be the nice effect for the demo, I saw a
nice picture, where is sea, a boat and a small islands or something generated
with julia fractal. I started to see an evolution of island and wanted to
make one alive. Unfortunately I had a lot of work to do with the sea
animation and really I feel that I didn't succeed with it. It ruins the
beauty of the evolution, but it's better than pure still picture.

More 3D dots -screen.
This was a second generation of 3D routine for the DSP. I found the Strava
heatmap picture from some news regarding place information given to public.
I wanted to make that as a globe and this routine gave me more power to
make it. The routine calculates and projects 1600 dots on DSP and textures
the object on CPU. Three objects, hexaball or whatever, monstera and
"strava" globe.

The end -screen.
More like filler, but not static.

One major part, what you can't see, but hear of - The DDPCM player.
At first VonDemus introduced me a different song, as I was asking for
a repetitive, atmosphere making song. I did some examining with it and
came to resolution, 8-bit/mono/12.5KHz/sequenced song. That was quite
not-so-cool-hearing and I had to realize, that if I want to use the DSP
for the effects, I have to think something else for playing the music.
Ok - VonDemus told me that he don't know how to make modules, so it was
a bit risky. Then he introduced to me a new song, the Hikihumppa, as a
work name. It was the song, that woke up my interest. I asked him to
continue with it and started to search information for dpcm. I found
Kalms' ADPCM code, but for a short trying period I didn't succeed to make
any decent sound out of it (probably my mistake). Then I saw an article
by Marcus Geelnard. It was interesting. DDPCM (dynamic difference encoded
pcm sound) from 16bit -> 8bit. Oh yeah! Almost 50% from original. But then
I continued the reading and there it was, 16bit -> 4bit lossy packet.
That woke my interests again and I started to make an encoder and a decoder
to see if this really is it. It turned out to quite a work, but it was
worth it, as 28,125% from original size is pretty cool.
I stumbled a lot with endians. The big success was when I realized that
Audacity alwas saves a raw-16bit stereo file to little-endian. After that
things went forward a bit quicker than before.
There are drawbacks still, as the sound needs to be normalized quite
heavily, what affects the overall sound a little. Still you probably can
hear some clicks in the sound, but I'm not sure, if it is sound buffer
related or sample related problem. Sounds more like the first option.
Well, the playback routine then? The music is 16bit/stereo/25KHz. It takes
approx. 20% of CPU time to play the sound + loading time for new data.
Timer-D is used for the playroutine.

For me this demo has been more of technical achievement than a cool show.
I sincerely hope, that you can live with it. :)


Some statisctics during the project:
-Divorces, none - My wife still loves me.. ;)
-Engagements, none
-Kids moved out of the house, one - The younger one left first.
-Funerals, three - our beloved dog Blondi, my fathers side grandpa and
                   my mothers side grandma

This is it. Watch for the future releases from the Extream and meantime
check out the other releases of Extream from Demozoo / Pouet and Youtube
(Extream demoscene).

Final release date 6.1.2019


						Yours,
							Emphii / Extream
