                                guten tag! 04.07.2024

______________________________   _____      _____   
\_   ___ \______   \_   _____/  /  _  \    /     \  
/    \  \/|       _/|    __)_  /  /_\  \  /  \ /  \ 
\     \___|    |   \|        \/    |    \/    Y    \
 \______  /____|_  /_______  /\____|__  /\____|__  /
        \/       \/        \/         \/    2024 \/ 




STay4Evr Atari ST demo (SommarHack 2024 version)


Distribution notice
-------------------

The demo may not be distributed in video form (such 
as uploading captures to YouTube) without our 
explicit permission.

The Sommarhack team has the permission to stream the
demo during the compo.

If you have any questions please contact us:
ultrafex1@gmx.de


Prologue:
---------

During a thorough cleaning session in the attic we
found an old C64 demo disk of ours. 

In good old Cream tradition, the demo was forgotten
for decades and was never finished.

Now after decades we faced the challenge, freed
ourselves from the clutches of numbness and brought
it to a releasable state.

We used a transpiler we developed years ago to convert
the C64 disk into an Atari ST disk... 

The "menu" of the demo disk is a bit unusual and
interactive. As an old C64 fanboy you will surely 
find your way through it. Noobs can also just watch 
the video (shame on you).


The demo beams you directly into the year 1985/1986.
Due to some interferences from parallel universes,
there may also be temporal distortions.


You are trapped in a very small brown box...

Face it... You have to STay4Evr!



...in any case enough time to read the round about 55 kb
scroll texts... 

(If you want to read all the scroll texts you should not
watch the videos. The videos were recorded earlier and
the scroll texts were expanded afterwards.)


System requirements:
--------------------

STay4Evr should run on any Atari ST(E) with at
least 2mb. All screens are stored individually 
in the parts directory.
However, the individual screens only need 1mb.

The demo does not support Falcon or TT, i.e. it was not
tested on it. If it doesn't work use a ST or watch
the video.
A little tip. The reset protection in Basic will
certainly not run on the Falcon, so start the
individual parts.

Falcon or TT support is not planned.


Videos
------

You can find all videos for each part on ultra's
YouTube channel.


The playlist with all parts you can find here:
https://www.youtube.com/playlist?list=PLB2PJ92jWGeq4XvWJnkxbpuY6wXIAiyDV

Sommarhack presentation (does not show credits and greetings screen):
https://youtu.be/wPIV0U9w4pA

Credits screen
https://youtu.be/5_KkhtmFOtQ

Greetings screen
https://youtu.be/b5NdGGQlasg

The G.O.A.T. Demo (Full capture including all songs):
https://youtu.be/6_FOIYH9OCU

Under The Waves (Full capture including all songs):
https://youtu.be/9Xmhrz5C86E

Guardians of Mana (Full capture including all songs):
https://youtu.be/TII2xUr6Kws



Reset protection
----------------

The demo uses a reset protection to get into the c64
Basic again and again. Hence the name Stay4Evr :)

The reset protection is removed if a multiple reset
is made within 2 seconds.
Just do two resets with 1 second pause between them.




The demo screens
----------------

The G.O.A.T. Demo
-----------------

The initial idea was to make a little demo screen showing
the YM2149 playing the old songs using the new techniques. 
We planned to have stars and some songs that were fitting 
into the space ambiente like "Crazy Comets", "Cybernoid"
or "Mega Apocalypse". But when ultra was able to transpile 
the original Rob Hubbard songs in no-time, we suddenly 
had a "B.I.G. Demo" at hand. And to remember that demo and 
the author of these great songs we named it "G.O.A.T Demo".


Under the Waves
---------------

"Under the Waves" honours another outstanding composer 
from the early C64 soundchip era. One might recognise a 
visual reference here and there, but at least the sounds 
reveal the author. Martin Galway, with his very unique 
style leaves his remarkable footprint in the history 
of chipmusic.


Guardians of Mana
-----------------

"Mana" collects various songs from the early era and 
brings us the magic of classic chipmusic embedded 
in its very own visual appearance remembering the 
classic C64 intro. And when we listen to the opening 
song, we will remember the gifted Ben Daglish and his 
outstanding talent, may he rest in peace.


Playlist:
---------

All music screens have a powerful playlist, i.e.
after a song has finished playing, the screen
jumps to the next song.
Which song is next depends on the playlist mode.
The current mode is displayed at the bottom left
below the song list.

The following playlist modes are available:
-Linear...  All songs are played in the order in which
            they appear in the song list.
-Repeat...  The currently playing song is repeated
-Shuffle... The songs are played shuffled. The shuffle
            sequence is generated once at the start of
            the screen.

With the ignore feature, songs in the playlist are not
played. You can recognize an ignored song by a small x
icon in front of the song.

The following keys are available:

Atari        Steem
Key          Key
---------------------------------------------------------
 a-z         *      Short cut to jump to a song beginning
                    with this letter.
                    Pressing the same key multiple times
                    will select the next song
 Cursor Up   Up     Select prev
 Cursor Dw   Dw     Select next
 Cursor Left Left   Play prev song
 Cursor Left Right  Play next song
 Help        Page   Select prev page
             Up
 Undo        Page   Select next page
             Dw
 Clr Home    Pos1   Change playlist mode (linear,
                    shuffle or repeat)
 Insert      Insert Ignore on/off
 Return      Enter  Play song
 F1-F3       F1-F3  Mutes Voices
 F10         F10    Toggle YM Mode. Sets all waveforms to
                    square and deactivates effects such as
                    ringmod, sync and pwm. When YM mode is 
                    active, this is indicated by a small 
                    YM icon below the songlist. 
                    This little experiment turned out to 
                    be spectacular and brings you three
                    extra demos showing the real greatness
                    of the songs and what they could have
                    sounded on the YM2149 back then. 


Sid Emulation and (maybe) new tricks:
-------------------------------------

The emulation is fully YM 2149 based, based on modern timer
techniques.

The emulation includes:
- ADSR
- Ringmodulation and hard sync effect on all waveforms
- Waveforms: Square (PWM), triangle, sawtooth and noise
- Waveform mixing is partly implemented to make volume
  control via mixing possible (for ex. Parallax 4 or Ik+)
- Filters are not implemented

The Demo introduces a fast ring mod. effect and 64
volumes steps for square. The 64 volumes are essential 
to create a good linear to log convertion of the volumes. 

Without 64 volumes, the voice is always too loud or too
quiet, because you never hit the volume right.
 
You can hear the the 64 volumes very well in the Trap
song in Guardians of Mana.

During development, we also found a way to use the timer
preload reg for pwm voices or raster lines.
Read the the up scroller in the credit screen for more infos.


Atari ST C64 Basic:
-------------------

The Basic is not just emulated. It is running in 68k code.
Which means the original roms has been reassembled and 
transpiled to 68k code.
Due to the 68k code it is running faster than on a C64.

In principle, the Atari ST C64 Basic is fully functional,
i.e. with a few exceptions, all commands work (as far as we
could test them).
Of course we had to restrict some commands. Saving Basic
programs is not possible.

The Basic is of course not perfect. It surely has some bugs.
If you crash it you will get a lollipop :) It is simply too
big to be bug-free.
The source code has around 26000 lines and is 460kb in size.
And assembles to round about 62kb object code.

Apart from the screen and keyboard no other hardware is emulated.
And no, we are not planning a C64 emulator for Atari, even
if it looks a bit like that.

Porting the C64 kernel was a learning project to see how
the Basic was programmed back then. It tooks weeks to get
this to run...

The Basic has a few special keys.
Here is a list:

Atari        Steem
Key          Key
---------------------------------------------------------
 Run/Stop    F10        Run/Stop Restore. Basic warmstart
 Restore
 Undo        Page Pw    Home. Moves the cursor to the upper
                        left.
 Clr Home    Pos1       Clr Home. Clears the Screen
