13.07.2015 Views

Download - Commodore Free

Download - Commodore Free

Download - Commodore Free

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

www.commodorefree.comyou typed it in and we have more places thatthings could go wrong, did a piece on thepitfalls of type in programs. DATA statementsare one of them that can frell you, I alreadymentioned fonts elsewhere.Taking that into consideration. If I typed it inhere right, and I did test and run it beforewriting the lines down, rare thing for me to do If you typed it correctly from what I did,then there is a small green hot air balloon thatgoes from the upper left of the screen towardsthe lower right. Doesn't make it all the waythough so if that is what you see. You typed itin right, at this time that balloon won't goacross the screen, to the other side.For row 2, the data would be:DATA 1, 255, 192Yeah I know that it looks complicated. But by the time you havedone a couple of these lines. You get the message that is beingapplied, granted that there are 21 lines to do of three series each.I cheat and use a calculator. Mind isn't what it used to bedecades ago.You should be able to see how to count the series, how topresent the chart where you see what is in each of the slots from128 to 1. Also how to do the mathfor adding and then how to writethat data line. I've seen the math to the point where all theseparate three part series wereadded up, making it the total for theline. This doesn't work worth asmeg. Frells your programme, likeyou can't believe. Next thing is totype in the balloon program and wewill go over the parts.So typenewPress return then enter1 rem up, up, and away5 print "(clr/home)"10 v = 53248 : rem start of display chip11 poke v + 21,4 : rem enable sprite 212 poke 2042,13 : rem sprite 2 data from block 1320 for n = 0 to 62 : read q : poke 832+n,q : next30 for x = 0 to 20040 poke v + 4,x : rem update x coordinates50 poke v + 5,x : rem update y coordinates60 next x70 goto 30200 data 0,127,0,1,255,192,3,255,224,3,231,224210 data 7,217,240,7,223,240,7,217,240,3,231,224220 data 3,255,224,3,255,224,2,255,160,1,127,64230 data 1,62,64,0,156,128,0,156,128,0,73,0,0,73,0240 data 0,62,0,0,62,0,0,62,0,0,28,0Book says "if you typed everything in correctly" That is anunderstatement, I had to type it in a few times and even now Iam not certain I did it right for you (EDITOR yep its fine). ThenI'm not great enough to tell you how all of the things and thisprogram work. In fact those that are clever enough to know allof these parts, can't seem to explain it to me easily, so I guessthat makes us both in the same boat. What I can tell you is onlya few things. Some of that is a constant refresher on stuff wehave done before.Line 1 and line 5we have done before. A REMARK and then clear the screenLine 10, now this is a new thing for us, The book doesn't go intoa lot of information. Not supposed to, just a primer to wet yourappetite about sprites. Or for many of us, confuse the smeg outof us. Well v=53248 is obviously a variable. The Remstatement says it is the start of thedisplay chip. I have heard that alsocalled the VIC chip. 53248 is thestarting memory location of the"v"ideo chip hence the V for thevariable name. Notice how close thatnumber is to the 53280 and 53281 thelocations that we used for border andscreen colour changes?Register(s) DescriptionThe book takes us to the followingchart thing. In an attempt to explainthe "picture making locations controlthe functions..." Called registers,these locations in their chart looklike...0 X coordinate of sprite 01 Y coordinate of sprite 02 - 15 Paired like 0 and 1 for sprites 1-716 Most Significant Bit -- X coordinate21 Sprite appear: 1 = appear, 0 = disappear29 Expand sprite in "X" Direction23 Expand sprite in "Y" Direction39-46 Sprite 0-7 colorIf you see that 23 comes after the 29, you are right, that is theway it is listed in the book. I don't know if it is a book typo ornot. Some of the above may make a little sense to you. Most ofit may not and it also may seem so alien that you feel you willnever understand it. Many - many of my members have felt thesame thing. A few have gone past that and made sprites on theirIssue 24 November 2008 Page 20

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!