A downloadable project

*********************************************************************
MATRIX TRIBUTE "SCHAU" BASIC DEMO - By Arturo Dente (from Retro Programmers Inside Facebook group)
*********************************************************************
*********************************************************************
ATTENTION!ATTENTION!ATTENTION!ATTENTION!ATTENTION!ATTENTION!
*********************************************************************
I wanted to put this in the end, but people tend to go away when I talk after 3 or 4 sentences, so to avoid the same I tell it here and now (if you are still here...are you still here?)
* * * DON'T USE VICE FOR C64 EMULATION OF THIS CODE! * * *
I REPEAT: DON'T USE VICE! IT'S NOT AN EXERCITATION!
USE HOXS64 INSTEAD  (https://www.hoxs64.net/) BECAUSE IT'S CYCLE-EXACT. VICE WILL CRASH
*********************************************************************
MATRIX TRIBUTE "SCHAU" BASIC DEMO
*********************************************************************
Hello,
this is Francesco Clementoni aka Arturo Dente, and I followed the white rabbit and I fell in his den with this PETSCII art demo + falling characters over Morpheus petscii.
The main innovative (I hope) thing in the demo is to put a real petscii art in 10 rows/256 columns.
I used RLE (Run Lenght Encoding) to acheive this result, and during the making of the demo I built my personal toolchain to start from a bitmap and to end with generated DATA in lines no longer than 256 chars.
So the most part of the code is simpy DATA (so I skip lines 0-4), for the rest of code here is my explanation (code written on CBM PRG STUDIO):
LINE 5
CODE:         q=32:dA......
EXPLANATION:    nothing interesting, only q=32. "q" is shorter than "32" and I needed to strip out some chars in the end of the code. After this, some DATA ("dA" it's abbreviation for DATA)
LINE 6 
CODE:        rEa:ifa=-1tH9:dA......
EXPLANATION:    First we read DATA with rEa (that is abbreviation for READ A). I gave to -1 the value to tell the program that the petscii loop is ended, so we go to the last program line.
About the petscii visualization, I have implemented a RLE decompression, in such a way that if I encounter a negative number - say -N -  then I am told that I have to get N times the number after this. 
So, for example:
        ..... , -7,2,.... means that we have 7 times the number 2.
Unique exception , is the number -1, as said. Anyway, -1 is not useful to sign a number repetition, so it's the most eligible to be used to tell "this is the end, my friend".
LINE 7
CODE:        ifa>=0tHpO1024+n-53272*(n>999),a:n=n+1:gO6:dA ....
EXPLANATION:    this is the normal reading, as for what said above, because we have a positive number. It has to be taken singularly. 
Now, let's explain the formula of the POKE: for room's sake, I have to make an unique read and poke both for screen memory and for colour screen memory. I know that after 1000 "real" numbers read (for "real" I mean also the ones becoming from RLE negative case, where they have to be count N times, where N is the number after the minus sign) I have finished to read the screen chars memory. When this happens, I sum to 1024 (the start of screen memory) a number such that I reach the currispondent colour ram position. This number takes in account both the difference between 55296 (the start of screen colour memory) and 1024 and the fact that the counter n has started from 1000, not from 0 as when doing screen ram.
So 55296-1024-1000=53272.
The factor (n>999) serves to make disappear this part from the computation when doing memory screen ram and to make it appear when doing colour ram (it gives -1 when reached 1000 or up)
Finally we increment the counter n and GOTO6 to loop again.
LINE 8
CODE:         s=1024:ifa<-1tHc=-a:rEa:fOt=1toc:pOs+n-53272*(n>999),a:n=n+1:nE:gO6:dA....
EXPLANATION:    As explained, when I get a negative number I am in the deep of RLE logic: it all goes like I have encountered N times the number A, where N is the negative number and A is the number after it.
Besides, I test a negative number under -1, because - as said - -1 is a reserved number.
The "if" part does this: if the read number "a" is <-1 then I put this counter in the variable c and I read again from DATA for c times. For each of these reads, I do the same like in line 7 (the "normal" case).
Finally we increment the counter n and GOTO6 to loop again.
LINE 9
CODE:        pO53281,0:o=rN(.)*39:fOt=1to24:p=t*40+s+o:pOp-40,q:q=pE(p):pOp,o:nE:gO9:dA...
EXPLANATION:    finally we have the falling chars rain. For room's sake I couldn't do something really similar to the original one from the movie, but it works, someway.
Basically, variable "o" serves both for the random char and for the random x position (I was out of room). Then, i start a loop for the 24 y positions, where I put in p the actual screen memory position, I poke the position one char up with the previous char (in the first loop it's set to 32 -space code- by default) ,I save the actual char in q and finally I poke actual position with the variable "o" for the random char. Then loop forever and - as always - some DATA.
*********************************************************************
THE WHOLE CODE (CBM PRG STUDIO format)
*********************************************************************
0dA-17,32,100,98,-2,247,98,100,-33,32,254,-6,160,223,96,-30,32,103,-8,160,97,-30,32,248,160,-4,249,-2,239,160,252,-29,32,103,169,252,-2,32,233,76,32,103,-2,160,126,-29,32,-2,160,247,160,-2,249,-2,247,160,231,-30,32,78,-2,160,249,-2,198,249,-2,160,73,-29
1dA32,78,-2,32,239,-5,160,126,124,97,-27,32,111,208,-3,32,-4,119,-3,32,77,100,-22,32,111,98,247,-2,160,101,73,-5,32,108,228,32,247,-2,160,167,98,111,-16,32,111,248,160,254,-4,160,246,103,46,-6,32,103,119,251,-5,160,247,-2,98,-11,32,9,95,236,-7,160,32,69
2dA-4,32,108,44,45,32,229,-7,160,172,12,-9,32,103,101,-2,32,124,226,-5,160,148,100,-2,32,248,70,124,32,108,248,246,-3,160,83,126,34,39,32,89,-9,32,118,-5,32,124,95,-5,160,252,103,255,251,97,108,-6,160,73,-5,32,84,-8,32,9,-7,32,95,-3,160,251,252,32,252
3dA32,250,245,-4,160,246,229,-15,32,89,-8,32,124,251,160,252,251,101,251,160,123,229,160,198,231,119,-8,32,89,-8,32,71,-10,32,-3,239,23,76,119,74,119,-2,120,68,99,-17,32,101,-13,32,160,223,226,98,-14,32,84,-6,32,89,-2,100,-13,32,120,198,32,124,70,32,46
4dA32,64,-6,32,-2,100,84,-3,32,108,248,-5,160,227,98,-12,32,119,226,119,-7,32,98,227,-4,160,227,248,123,228,120,173,-6,160,101,-20,32,103,-2,160,236,-4,160,120,160,32,108,254,-6,160,-22,32,160,173,252,-3,160,173,208,32,233,227,-2,160,236,-2,160,172,97
5q=32:dA-22,32,118,174,-2,160,251,197,160,227,223,229,172,254,-3,160,105,226,-24,32,226,95,-3,160,252,201,83,95,239,210,-34,100,-2,210,223,-17,11,15,-5,1,-32,11,12,15,-7,1,14,-31,11,15,-7,1,15,-30,11,15,12,15,-4,1,15,1,-2,15,-29,11,12,15,-2,11,-2,15,-2,11
6rEa:ifa=-1tH9:dA-2,15,-32,11,-4,12,15,-2,12,15,-33,11,-4,15,-2,12,-41,11,12,-26,11,9,12,-11,11,-2,15,-25,11,-2,12,-11,11,12,-4,15,-19,11,-3,15,-2,12,-11,11,-2,12,-7,15,12,-11,11,12,-2,11,-5,12,-3,11,9,-8,11,-3,12,15,12,11,12,-17,11,-4,12,-12,11,12,-2,11
7ifa>=0tHpO1024+n-53272*(n>999),a:n=n+1:gO6:dA12,-5,11,13,-9,11,9,11,9,-3,11,-3,12,-6,11,12,-2,11,-2,12,11,12,-7,11,9,-9,11,12,-8,11,12,-2,11,-2,12,11,12,-3,11,12,-5,11,9,-14,11,9,-18,11,12,-4,11,9,-6,11,9,-30,11,9,-16,11,12,-16,11,12,-7,11,9,-14,11,12,15
8s=1024:ifa<-1tHc=-a:rEa:fOt=1toc:pOs+n-53272*(n>999),a:n=n+1:nE:gO6:dA11,9,-14,11,9,-4,11,9,-8,11,15,-4,11,-9,1,-11,11,9,-2,11,9,-7,11,-9,1,11,-4,15,3,-3,1,15,-20,11,15,-3,1,10,-2,15,12,15,11,9,15,-2,1,6,3,-2,1,15,-22,11,15,-2,1,-2,10,-2,1,11,12,15,1,15
9pO53281,0:o=rN(.)*39:fOt=1to24:p=t*40+s+o:pOp-40,q:q=pE(p):pOp,o:nE:gO9:dA-3,1,-2,15,-13,11,9,-9,11,12,-2,15,-3,1,12,-2,1,-2,15,1,-3,15,-28,11,-3,15,1,12,1,12,1,12,11,12,11,12,15,12,15,12,15,12,15,-10,12,15,12,15,12,15,12,15,12,15,12,15,-2,11,12,1,15,-1
StatusReleased
CategoryOther
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorBASIC 10Liner
Tags8-Bit, basic, basic10liner, Commodore 64

Download

Download
matrix10liner.prg 2 kB
Download
matrix10liner.bas.txt 7 kB
Download
marix10liner.mp4 2 MB

Development log

Comments

Log in with itch.io to leave a comment.

This is innovative because you achieved it in BASIC, is that correct? Is there a video demo of what it does?