Andrea Posted August 12, 2020 Share Posted August 12, 2020 Hello User's ATARI, How to Define set characters in BASIC with POKE ?? Quote Link to comment Share on other sites More sharing options...
+gnusto Posted August 12, 2020 Share Posted August 12, 2020 Here's an article with basic examples that shows how to define, animate, and rotate character sets: https://www.atariarchives.org/agagd/chapter3.php Quote Link to comment Share on other sites More sharing options...
zzip Posted August 12, 2020 Share Posted August 12, 2020 45 minutes ago, Andrea said: Hello User's ATARI, How to Define set characters in BASIC with POKE ?? each character is 8-bytes, one byte for each row. They are stored in ATASCII order, first 128 characters only. The trick is there is a pointer that you need to change to point to your new character set, and I forget where that pointer is offhand. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted August 13, 2020 Share Posted August 13, 2020 (edited) I believe each character set is 1K in size, the register that points to the character sets is 756 (Hex $2F4) it's called CHBASE Default is 224 for upper case characters and 226 for lower case. So if you create your own character set, it must reside on a page boundary, then poke the high byte of the address into location 756 First reserve the memory you want Lower RAMTOP by 1K to place your new character set. 10 TOP=(PEEK(106)-4)*256 20 POKE 106,PEEK(106)-4 in your program, have the new character set as DATA statements then something like 30 I=0 40 RESTORE 10000 50 READ A: IF A = -1 THEN 100 60 POKE TOP+I 70 I=I+1: GOTO 50 100 YOUR PROGRAM HERE 110 POKE 756,PEEK(106) : REM POINT AT YOUR NEW SET . . 9999 END 10000 DATA 1,23,3,4,65,77,88,99 10010 DATA .... the rest of your CHAR set 11000 DATA , 33,44,55,66,77,88, -1 :REM end with a -1 Edited August 13, 2020 by TGB1718 Quote Link to comment Share on other sites More sharing options...
StickJock Posted August 13, 2020 Share Posted August 13, 2020 2 hours ago, TGB1718 said: 30 I=0 40 RESTORE 10000 50 READ A: IF A = -1 THEN 100 60 POKE TOP+I 70 I=I+1: GOTO 50 Your POKE is missing the value. Should be POKE TOP+I,A BTW: Since the character set is a known size, you could change this to use a FOR/NEXT loop, which would take less code, likely be faster and also save the extra -1 in the data statements. Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted August 13, 2020 Share Posted August 13, 2020 thanks, just knocked that up to give an idea 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.