Silly Venture 2k17 Invitro

Almost 4 years have passed since my last VCS release. In fact both effects in this demo are 4 years old an were originally planned for Sillyventure 2k14. But back then I didn't have any music and ultimately that kept me from coding for the VCS. Back then no usable tracker existed, so getting music are no feasible in the foreseeable future. The sine scroller used almost the complete RAM, so it was clear it was going to be tough. In addition kk and Kylearan created new stuff using k65, which is basically unbeatable when it comes to coding for bank switching modules. The latter is really a nightmare why you have to do it manually.

During that period, Kylearan created TIA Tracker and changed the VCS world. Finally musicians didn't have to be coders anymore. At Revision 2017 Flush released .bin with three 3 outstanding tunes created by Glafouk using TIA Tracker. That was very motivating, esp. with Nick Montfort, Flush and Kyleraran at the party place. Therefore, when Grey announced that there is going to be a Sillyventure in 2017, I decided to take the effects together with my favorite tune and create this invitation and finally release the stuff.

Intro Part

The intro part was inspired by loading screen of the Amiga OCS demo Rink a Dink Redux. The original screen was intended to show that this is real oldschool OCS demo and not fancy AGA stuff. When I saw it at Revision 2013, I immediately had the idea of taking that further back in time - and do the same with the VCS which is arguably the pre-predecessor of the Amiga.

In 2015 Joe Decuir and Ron Nicholson gave an in-depth talk about their work with Jay Miner, and discuss how the system architecture from the Atari 2600 was further developed to form the system architecture of the Atari 400/800 series, and how the Atari 400/800 design evolved into the Amiga. This lecture series is available on youtube. It was given for the IEEE, celebrates the Amiga system architecture, on it's 30th anniversary, and is a must watch for any serious Atari & Amiga computer enthusiast.

Stage 1: Rip of the original via screen capture from WinUAE. 

Stage 2: Downsize the picture to 48x156 pixel in two 2 colors. Then adapt the text pixel by pixel. 48 color clock pixels are the maximum that can be displayed per scanline. 

Stage 3: Invert the pixel image, define color for each scanline, implement kernel colors by changing the background color to add more details. I also added a fading effect which was later synced to the music. Note that fading is not that easy here, because the VCS with 128 bytes of RAM does not even have enough RAM to store the color for each of the 156 scanlines.

Sine Scroller

The sine scroller is the oldest and most complex effect I ever did on the VCS. The 12 characters sine scroller (DCYP) runs at a height of 160 scanlines and is the first sine scroller of that size. Each character is 7 scanlines high and has a different, position dependent color. The VCS can only display 2 players (i.e. characters) per scanline at variable horizontal positions. Repositioning a single player takes two scanlines. In addition there is not enough RAM to store the character/pixel information for the full screen height even for a single player. All this together yields a complex optimization problem with the parameters number of characters, height of characters, amplitude of the sine wave and frequency of the sine. I created a Java program to compute and visualize all possible solutions and determine the best, taking all constraints into account. Best in this case means, the maximum number of characters which can be displayed without causing collisions, i.e. situations where the timing for repositioning and loading the graphics from the RAM into the TIA cannot be maintained. Frames with collisions are marked red the image below.

Output of the scroll generator

For the best solution, the program also generates the determined number of frames as individual routines containing unrolled source code. In a second step the programs scans the resulting source code and performs optimizations. For example "JSR" followed by "RTS" is optimized to "JMP" to save stack frames. Also <n> consecutive lines of "STA WYSNC" are combined into "JSR WAIT.WSYNC_<n>" to save ROM space. The same logic is applied to the different patterns that occur in the generated source. Finally the source is split into different includes to fit into banks of 4k.

The best solution turned out achieve 12 characters with 30 different animation frames. The pure optimized code for all frames takes up 8068 bytes. 200 bytes of common code are required in each bank that contains frames. Hence two full banks and around 500 bytes of a third bank are required for this effect. To keep the challenge, the decision was to go for a 16k ROM, but not more and use the rest of the ROM wisely.

Silly Venture Logo Scroller

Because I found just having scroll texts boring, I looked for another ready-to-use effect that would fit into the remaining ROM. I remembered one of my favorite effects: The large animated chunky mode scroller was originally done for ISO. Because it does not require much ROM and only a reasonable amount of RAM. In ISO I had to use the global PAL color table of the demo, which made the raster bars look a little inconsistent. This cloud be fixed this time using ROM space.

Stage 1: Create Sillyventure logo in 64x7 Pixels

  

Stage 2: Convert logo into chunky texture per video norm, taking the distribution of the rainbow colors into account. 

Stage 3: Convert logo into chunky texture per video norm, taking the distribution of the rainbow colors into account. Later an AND mask is applied at runtime to achieve different effects: black logo, flashing logo, textured logo, cycling texture logo. Ultimately the height of the logo is scaled while keeping it centered vertically and padding it with my beloved rainbow colors.

       

Console Switches

At some point during the development I realized that all parts only use 160 scanlines. This was initially part of the design decisions for the 2013 release and never changed. So when I was mostly done with the PAL/50Hz version and had some space left, I though I could add switchable PAL/NTSC support in a single ROM like some games do. Because the intro and the scroller heavily use color tables, this meant also requiring twice the space and made it a hard job after all. Also adapting the music replay from 50 Hz to 60 Hz was not that easy. When everything including the actual scroll text content was done I tested on real hardware. There, and in fact also in Stella, I found that the color system (PAL/NTSC) and the vertical refresh rate (50 Hz /60 Hz) are independent and could be set differently. So I sat down and freed some more byte to give the user control:

  • Press "Reset" (F2) switch to restart the demo.
  • Press "Select" (F1) skip to the next part.
  • Use "Color/BW" (F3/F4) switch to select "PAL/NTSC" mode. 
  • Use "Left Player Difficulty" switch (F5/F6) switch to select "PAL50/NTSC60" and "PAL60/NTSC50" mode.
  • Use "Right Player Difficulty" switch (F7/F8) switch to select double/single width character mode.

References

Note that the "50 Hz" in the intro part text is just a reference to the original Rink a Dink Redux screen and has nothing to do with the actually selected mode. Also the "Winner's don't use ANTIC" subtitle of the production is a reference to Rink a Dink Redux. While Rink a Dink Redux shows what you you can achieve with with OCS instead of AGA, my release shows what you can achieve with the VCS TIA instead of the Atari 8-bit's ANTIC. Of course in reality all these Jay Miner chips sets are of course simply great and I own countless hours of fun to all of them. Or like Sheriff phrased it correctly "yeah, ANTIC is for lamers... ;)".

Winner don't use AGA, they use TIA of course