Changing character set

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
shreder95ua
Vic 20 Newbie
Posts: 2
Joined: Wed Apr 13, 2022 11:17 am
Location: Ukraine

Changing character set

Post by shreder95ua »

Hi, I shreder95ua, I am new on this forum, and I wanna create a game. But I don't know, how to change the character sets.
Okay, I already know, that I must convert every line to a pixel to binary code, and then convert those binaries to numbers. (I watched an 8-bit guy video)
But what do I have to do with that binary lines?
I think I need to use POKE commands, but what registry do I have to change, for example, set the character up to look like a small stickman, who's looking up?
I don't want to write code in Assembly language. I know it may be faster, but it's very hard to understand.
Thanks, who reads this. I never started such a project.
change da world. my final message. bye-bye!
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: Changing character set

Post by srowe »

Welcome to Denial.

There are many books and articles that explain the principles behind user-defined graphics. There are online copies of books like "Programmers Reference" and "VIC Revealed" here

https://commodore.bombjack.org/vic-20/books-vic.htm

The basic principles are
  • you store the 8 bytes which define each character in memory
  • you change the registers in the VIC to point to this memory instead of the built-in ROM
Doing this in BASIC is possible but requires some steps to prevent your character set being overwritten. See the section titled "Programmable Characters" on page 82 of the "VIC-20 Programmers Reference" for an example.
User avatar
shreder95ua
Vic 20 Newbie
Posts: 2
Joined: Wed Apr 13, 2022 11:17 am
Location: Ukraine

Re: Changing character set

Post by shreder95ua »

Thanks, it's really works, I tried the same code from VIC-20 Programmer's Reference Guide, and it worked fine!
Image

Code: Select all

1 poke 36869,255
5 poke 52,28:poke56,28:clr
10 for i=7169 to 7679:poke i,peek(i+25600):next
15 forc=7328 to 7335:read a:poke c,a:next
20 data 60,66,165,129,165,153,66,60
change da world. my final message. bye-bye!
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: Changing character set

Post by srowe »

Great! Look forward to seeing your first game.
Post Reply