I've been working on a Pong clone using cc65, and I've run into something kind of strange: the character codes listed in the manual are inconsistent with the ones I'm POKE'ing to the screen. For example:
Code: Select all
#include <conio.h>
#include <peekpoke.h>
int main() {
// Using this to make the screen black & white with a blue-green border
bgcolor(0);
bordercolor(3);
textcolor(1);
clrscr();
// This prints a sort of checkerboard character.
// But in the manual, 127 is a triangle (kinda like a filled-in backslash)
// and the checkered character is listed with code 191. So I tried it in hex,
// and 0x127 is an apostrophe.
POKE(7680, 127);
return 0;
}
And here are some details that might be useful, in case it makes a difference: I'm using the VICE emulator and the latest version of cc65 on Ubuntu 18.04, and I didn't have a Vic-20 growing up, so I don't know much in the way of BASIC. I'd eventually like to work my way up to Assembly, but right now I just now like 4 commands (lda, sta, jsr and rts lol). But for now, cc65 works. I've used it for little intro tunes (and wrote a little sound library for it I'll be putting on my BitBucket later) so I know it works on the Vic-20.
Thanks in advance.