POKE 36869,255 (Unexpanded VIC-20)

Basic and Machine Language

Moderator: Moderators

Post Reply
User avatar
Ghislain
Realms of Quest
Posts: 1282
Joined: Sun Aug 08, 2004 12:54 am

POKE 36869,255 (Unexpanded VIC-20)

Post by Ghislain »

One of the most useful POKE commands for the unexpanded VIC-20 is POKE 36869,255. By modifying this pointer of the VIC chip you are telling it to replace the screen POKE characters 0-63 with the data contained between 7168 to 7679.

And even if you modify letters of the alphabet, you can still display these characters by printing those characters in reverse mode. Hence, characters 128-255 will show up as non-reversed characters on the screen.

First, you should reserve the last 512 bytes of memory:

10 POKE52,28:poke56,28:CLR

28 times 256 is 7168. If you only plan on using 31 custom characters or less, you save yourself 256 bytes by only reserving the last 256 bytes of memory.

10 POKE52,29:poke56,29:CLR

29 times 256 is 7424. So you'll be using the RAM between 7424 and 7679.

Screen character 32 is the space character, don't forget to fill 7424-7431 with 0s to make sure that the screen doesn't look funny when you clear it!

Here I will create a few custom characters contained in DATA statements

20 DATA 32,32,32,32,32,32,32,32
30 DATA 255,255,255,255,255,255,255,255
40 DATA 0,60,66,66,66,66,60,0


Now I will POKE them into memory

50 FOR X=0 TO 23:READ Y: POKE X+7424,Y: NEXT

Now I will PRINT the characters to the screen

60 PRINT"{CLR}{SPACE}!"CHR$(34)
65 PRINT"{REV-ON}{SPACE}!"CHR$(34)


And finally, a little routine that toggles between 255 and 240 in POKE 36869:

70 POKE36869,240
80 GET A$:IF A$="" THEN 80
90 POKE36869,255
100 GETA$:IF A$="" THEN 100
110 GOTO 70


Now when you run this program, you can see between the differences between the 240 and 255 modes in POKE 36869!!! *

(*) I suspect that 99% of you already knew this, but this being a retrocomputing message board I just decided to have a little fun and pretend I was writing an article for the old computer magazines from the early 1980s.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Heh. My big brother kept a notebook with useful stuff, and had written down this POKE twice or thrice, on different pages. He had given it a different label every time:

Cool numbers, rockets etc
POKE 36869,255

Strange stuff
POKE 36869,255

Your own characters
POKE 36869,255
Anders Carlsson

Image Image Image Image Image
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Ghislain! One of my first contributers to Denial (when it was a paper newsletter).... Good to hear from you again! :D
High Scores, Links, and Jeff's Basic Games page.
User avatar
Ghislain
Realms of Quest
Posts: 1282
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

Hi Jeff, I remember your newsletter from 8 years ago! I did send you a few programs on a disk, but then my landlady kicked me out and I had to move.... so I never got more than 1 issue. I assume that you must have sent it to my old address.

I did get issue #2 (or a photocopy of it) from Ward Shrake (if you're reading this, thank you very much for sending it). I'm just wondering, did you publish other issues after #2?
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

Unfortunately, Denial only had 4 issues... :(

I was very poor at the time; I could no longer afford to make photocopies. Thank goodness I finally got home internet connection shortly after that.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Ghislain
Realms of Quest
Posts: 1282
Joined: Sun Aug 08, 2004 12:54 am

Post by Ghislain »

4 issues? Since I only got to see 2, I'd love to see the final 2 issues.

I wonder if it would be possible for someone to scan these and upload them to this site. That would be great!
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Jeff-20
Denial Founder
Posts: 5761
Joined: Wed Dec 31, 1969 6:00 pm

Post by Jeff-20 »

I'll work on that... they were not very impressive. I am sure you've noticed that the type-in programs were upgraded and posted in the Basic Program section of the forum.
High Scores, Links, and Jeff's Basic Games page.
Post Reply