Street Fighter II Tribute by Arturo Dente
A downloadable project
********************************************************************* SF2 TRIBUTE "SCHAU" C64 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 ********************************************************************* SF2 TRIBUTE "SCHAU" C64 BASIC DEMO ********************************************************************* Hello, this is Francesco Clementoni aka Arturo Dente, I grew with Ryukens like most of us and I wanted to make a tribute to Street Fighter II in occasion of its 30th anniversary. I took, so, the Bonus Stage (the one with the car to crash) and I made an animated PETSCII of it. It's like a sort of screensaver. The main innovative (I hope) thing in the demo is to put a real petscii art in 10 rows/256 columns (as in my other submission, "MATRIX TRIBUTE"). 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-5), for the rest of code here is my explanation (code written on CBM PRG STUDIO): 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: s=1024:ifa>=0tHpOs+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: j=54272:ifa<-1tHcy=-a:rEa:fOt=1tocy: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: pO53280,11:?"{home}{reverse on}sf2 tribute":fOy=9to15:a$(1)="{reverse on}{yellow}{cm @}{sh @}{cm @}{reverse off} {left}{left}{left}{left}{white}{reverse on}{down}{left} {down}{left} {down}{left}{left}{red} {white} ":a$(2)="{reverse on}{white}{left} {left}{left}{left}{left}{yellow}{down}{left}{cm @}{down}{left} {down}{left}{left}{cm k}{reverse off}T":?"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}"sP12+a)a$(2+a):a=nota:gO9:dA... EXPLANATION: finally we have the animation of the main character, making him fisting the car. Basically I have a little array of string, A$(), where I put in a cell the arm towards the car and the masking of the body part covered by the arm in the previous moment, and - in opposite - the other cell contains the arm in rest position, with masking of the previous arm that tends towards the car. So, it's only a fact of switching from A$(1) to A$(2) (and viceversa) and to print it. Being A a boolean value, looping NOT operator on it makes it switching from -1 to 0 and so on, so the value A$(2+a) switches from A$(1) (when a=-1) and A$(2) (when a=0). This is how we get the animation working. ********************************************************************* THE WHOLE CODE (CBM PRG STUDIO format) ********************************************************************* 0dA-286,160,228,226,121,98,-11,160,-6,228,-18,160,105,-3,160,173,-8,160,198,-2,160,-7,70,-2,228,-15,160,97,-2,160,226,160,252,-6,160,206,160,97,248,-3,98,-3,227,247,227,160,205,-14,160,97,229,231,160,32,239,-5,160,126,-2,160,118,-4,160,-2,248,236,173 1pO53281,11:dA251,-2,160,118,-13,160,231,251,-8,160,236,140,155,231,212,99,120,239,95,187,160,117,124,95,-2,160,127,124,120,251,-12,160,210,160,118,212,-3,160,236,227,120,226,231,245,228,82,100,210,-2,100,121,32,254,189,198,124,253,108,-11,160,231,160,161 2dA212,231,-4,160,97,251,207,247,103,222,-4,160,98,197,-4,160,210,198,252,111,160,95,-9,160,97,160,199,118,231,-4,160,117,32,74,200,207,160,220,-3,239,120,239,-7,228,-3,160,251,-17,160,117,-3,32,199,-2,160,198,192,-2,198,72,-7,120,171,-2,196,-11,160,207 3dA201,160,225,-3,160,246,204,70,100,81,160,229,-4,160,157,111,32,68,167,68,-2,32,-2,160,228,8,-8,160,229,160,245,97,-5,160,217,84,99,89,101,126,197,-5,196,-6,82,192,-2,247,227,198,225,-7,160,97,160,246,160,251,160,229,-2,160,246,89,84,32,118,68,82,68,249 4dA-2,64,-2,239,227,-3,98,123,-2,226,207,247,160,118,-7,160,252,160,199,-3,160,225,-2,160,246,118,227,104,118,97,119,120,-2,226,120,-3,32,229,-2,160,97,82,32,61,68,248,229,-7,160,246,210,212,-3,160,118,-2,160,97,204,239,99,118,101,32,68,-5,119,-3,82,61,-2 5dA111,121,120,119,45,229,-16,160,252,123,-2,32,74,225,98,-7,100,-2,82,-2,70,-2,45,247,227,231,-18,160,252,223,-2,32,-2,226,-13,32,-2,239,245,-21,160,98,121,-14,100,-2,98,-23,160,-16,227,-5,160,-288,1,-2,7,-36,1,-2,10,-2,7,-9,1,13,15,-25,1,7,10,7,-2,10,-7 6rEa:ifa=-1tH9:dA1,12,13,12,-3,3,-3,12,-2,3,-17,1,-3,7,6,7,-6,1,-10,3,12,-18,1,-4,10,7,-5,1,-3,3,-4,12,3,-2,5,12,5,-3,3,-15,1,-3,2,-2,7,-4,1,13,12,5,12,3,-2,12,15,12,15,-2,12,6,-2,12,3,1,12,-13,1,10,-3,2,-5,1,5,-2,13,-2,12,-4,5,-2,15,5,-3,12,1,-2,13,1,13 7s=1024:ifa>=0tHpOs+n-53272*(n>999),a:n=n+1:gO6:dA-11,1,10,2,10,2,-5,1,6,-2,12,-2,13,15,-14,1,13,-9,1,10,-2,2,10,2,-5,1,-3,6,13,5,-2,12,13,-3,12,13,15,-5,13,15,-2,3,12,-8,1,10,2,1,-2,10,-5,1,-3,12,0,5,-6,3,0,6,12,15,12,-2,6,-2,3,13,3,-8,1,-2,2,-2,1,10,2,-4 8j=54272:ifa<-1tHcy=-a:rEa:fOt=1tocy:pOs+n-53272*(n>999),a:n=n+1:nE:gO6:dA1,0,-2,12,0,-7,12,-6,15,-5,12,-9,1,-2,2,1,2,10,-4,1,-2,0,6,-2,12,9,-4,12,-2,5,-4,12,14,-2,5,-3,2,-9,1,10,-3,1,10,-4,1,-3,0,15,12,10,8,-2,2,8,-3,6,-4,12,0,6,-2,0,12,-9,1,7,-3,1,7,-3 9pO53280,11:?"{home}{reverse on}sf2 tribute":fOy=9to15:a$(1)="{reverse on}{yellow}{cm @}{sh @}{cm @}{reverse off} {left}{left}{left}{left}{white}{reverse on}{down}{left} {down}{left} {down}{left}{left}{red} {white} ":a$(2)="{reverse on}{white}{left} {left}{left}{left}{left}{yellow}{down}{left}{cm @}{down}{left} {down}{left}{left}{cm k}{reverse off}T":?"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}"sP12+a)a$(2+a):a=nota:gO9:dA1,12,-2,0,-3,12,6,-6,12,-4,0,-6,12,-18,1,12,-2,6,12,-18,0,-19,1,12,-2,6,-2,0,-13,6,-2,0,-21,1,-19,12,-44,1,-1
Status | Released |
Category | Other |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | BASIC 10Liner |
Tags | 8-Bit, basic, basic10liner, Commodore 64 |
Development log
- Image downloadApr 08, 2021
Leave a comment
Log in with itch.io to leave a comment.