Screen POKE - Help
Moderator: Moderators
Screen POKE - Help
Help, POKE 7680,X works fine, a character appears on the top left of the screen, but when I try to POKE other rows of the screen, it ignores it.
(mod: changed the topic title from "Help?" to something more verbose)
Re: Screen POKE - Help
With screen at 7680, color map is at 38400, so try
POKE7702,0:POKE38422,0
Should set the first character of the second line to @, then change the color from white to black.
POKE7702,0:POKE38422,0
Should set the first character of the second line to @, then change the color from white to black.
Re: Screen POKE - Help
By default the colour map is filled with 0 (white). The background is also white so your POKE is invisible. If you move the cursor to that location it will appear.
- Mike
- Herr VC
- Posts: 4842
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Screen POKE - Help
1 (white).srowe wrote:0 (white).
The issue at hand is already mentioned in the VIC-20 User's Manual, on pages 139 and 140:
Note these POKEs are only valid for unexpanded VIC-20 or with +3K RAM expansion. With +8K or more, the KERNAL sets the screen to start at 4096 and the colour RAM to 37888.VIC-20 User's Manual wrote:[...] type in a POKE statement with the number of the screen location (7800) and the number of the symbol (83) like this:
POKE 7800, 83
A white heart should appear in the middle area of the screen. Note that it will be invisible if the screen is white. [...] For example, to get a red heart, type the following:
POKE 38520, 2 [...]
(The funny thing is: when typed in directly on the start up message, POKE7800,83 will overwrite the "3" of the number 83, and will result in a blue heart at that position as the colour RAM there has already been changed to 6 (blue) - so you will be oblivious to the issue in that case. The other POKE then though will truly change the colour to red.
Try those two POKEs after a screen clear instead.)
- Stormcrow
- Vic 20 Enthusiast
- Posts: 177
- Joined: Mon Dec 24, 2012 9:46 pm
- Website: http://trimboli.name
- Location: Ronkonkoma, NY
Re: Screen POKE - Help
And if you're sure you're going to be poking characters all over the screen, you can just set the character color in every screen location to whatever you want ahead of time, and poke in characters later.
For example, you can start with
FOR I=38400 TO 38905: POKE I,0: NEXT
to prepare every space for black characters. Then just poke whatever you want and they'll all come out black. If you want different areas of the screen to have different color characters, you can set different colors to each area of the screen with a statement like that.
For example, you can start with
FOR I=38400 TO 38905: POKE I,0: NEXT
to prepare every space for black characters. Then just poke whatever you want and they'll all come out black. If you want different areas of the screen to have different color characters, you can set different colors to each area of the screen with a statement like that.
Re: Screen POKE - Help
So, the color's just not set, Thanks!
- Stormcrow
- Vic 20 Enthusiast
- Posts: 177
- Joined: Mon Dec 24, 2012 9:46 pm
- Website: http://trimboli.name
- Location: Ronkonkoma, NY
Re: Screen POKE - Help
The color IS set! It just happens to be set to the same color as the screen background.
-
- Vic 20 Hobbyist
- Posts: 114
- Joined: Sun Mar 10, 2019 7:39 pm
- Location: lodi california
- Occupation: student
Re: Screen POKE - Help
poke and peek also help a lot. for example poke 36879,peek*<36879>and13 gives a black screen whereas and2 prints reverse text
Bedroom coder=rock star
modern coder= pop star
i'd rather be a rock star than a pop start
modern coder= pop star
i'd rather be a rock star than a pop start