Redefining the character set and moving it on screen

Basic and Machine Language

Moderator: Moderators

Post Reply
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Redefining the character set and moving it on screen

Post by 20questions »

In the 8 bit guy's video, he redefines a character and manages to move it on screen. How would i get this to happen on a stock vic 20? I am a novice and am not shy about it. I have come to learn, and so i shall :D

by the way, google lists this site as not secure. any reason why?
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
User avatar
Mike
Herr VC
Posts: 4849
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Redefining the character set and moving it on screen

Post by Mike »

20questions wrote:In the 8 bit guy's video, he [...]
You care to provide a link?
[...] redefines a character and manages to move it on screen. How would i get this to happen on a stock vic 20?
You find the basics of this already in the VIC-20 User Guide and anyhow, this requires more than a program with just a handful of PRINT statements. :?

Anyhow ...

Code: Select all

10 POKE55,0:POKE56,29:CLR:CO=30720
11 FORT=0TO15:READA:POKE7424+T,A:NEXT:POKE36869,255
12 X=0:Y=0
13 GETA$:AD=7680+22*Y+X:POKEAD,33:POKEAD+CO,0
14 IFA$="{UP}"ANDY>0THENPOKEAD,32:Y=Y-1
15 IFA$="{DOWN}"ANDY<22THENPOKEAD,32:Y=Y+1
16 IFA$="{LEFT}"ANDX>0THENPOKEAD,32:X=X-1
17 IFA$="{RIGHT}"ANDX<21THENPOKEAD,32:X=X+1
18 GOTO 13
19 DATA 0,0,0,0,0,0,0,0,60,126,255,255,255,255,126,60
Replace {UP}, {DOWN}, {LEFT} and {RIGHT} with the appropriate keys as you type this in.

Line 19 contains a 'redefined' space, and the redefined/movable character (a ball).

For more examples, take a look at my "Unexpanded VIC-20 Game Collection". Just load the games, press STOP+RESTORE to get back to BASIC and then LIST the programs.
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: Redefining the character set and moving it on screen

Post by 20questions »

my apologies, this should be it

https://www.youtube.com/watch?v=yg04GyhS3ss
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: Redefining the character set and moving it on screen

Post by 20questions »

all i get is a corrupted screen of blue lines. typed it in exactly as shown
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
TMR
Vic 20 Amateur
Posts: 65
Joined: Fri Jul 01, 2005 3:00 am

Re: Redefining the character set and moving it on screen

Post by TMR »

20questions wrote: Sun Dec 29, 2019 2:48 pm all i get is a corrupted screen of blue lines. typed it in exactly as shown
If you mean Mike's listing, that works fine but only on an unexpanded or 3K expanded VIC. You should end up with a screen of blue squares and a black ball at the top left corner which can be moved with the keys you set up whilst typing it in. The listing can be pasted into VICE via the Edit menu as long as everything is shifted to lower case first - a good text editor should be able to do that easily enough - to remove the chances of a typo sneaking in.
20questions
Vic 20 Hobbyist
Posts: 114
Joined: Sun Mar 10, 2019 7:39 pm
Location: lodi california
Occupation: student

Re: Redefining the character set and moving it on screen

Post by 20questions »

got it to work, thanks
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start 8)
Post Reply