pmgraphics Posted July 9, 2019 Share Posted July 9, 2019 I have redefined characters to use as graphics. The following code creates my border using the letter Z redefined in blue. 115 COLOR 218:PLOT 0,0:DRAWTO 0,23:DRAWTO 19,23:DRAWTO 19,0:DRAWTO 0,0 I can use COLOR 90 (orange), 122 (green), and 218 (blue) for color registers 0, 1, and 2. If I use COLOR 186 for color register 3 (inverse lower case) a blue colon is printed and not the red/pink redefined letter Z. ?#6;"inverse-lower-z" creates a red/pink border piece. How do you use color register 3 (186 in this case) in the above code to create a border with the redefined character z? Thanks Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 9, 2019 Share Posted July 9, 2019 (edited) This listing: 10 GRAPHICS 1+16 20 FOR I=0 TO 255 25 IF I=125 THEN GOTO 40 30 COLOR I:PLOT I-(INT(I/20)*20),INT(I/20) 40 NEXT I 50 GOTO 50 gives: So the 'Z's are at 90 = 0x5A (orange), 122 = 0x7A (green), 218 = 0xDA (blue) and 250 =0xFA (pink) So as screen character for 'Z' is actually 0x3A, adding 0x00, 0x40, 0x80 or 0xC0 would give you the character in different colours So the listing: 10 GRAPHICS 1+16 20 FOR I=0 TO 255 30 POKE PEEK(88)+256*PEEK(89)+I,I 40 NEXT I 50 GOTO 50 gives: And here the 'Z's are at 58 = 0x3A (orange), 122 = 0x7A (green), 186 = 0xBA (blue) and 250 =0xFA (pink) So it can be concluded the 'COLOR' value does not directly correlate with the screen-code values, so consistently either use COLOR/PLOT or POKEs. Edited July 9, 2019 by Wrathchild Quote Link to comment Share on other sites More sharing options...
pmgraphics Posted July 10, 2019 Author Share Posted July 10, 2019 So 250 worked to crate a pink boarder. I was using the attached atari ascii code list, which color registers 0,1,2 worked but not 3. Is there a document out there that sorts this all out with what values work with what conditions like poke and color plot? thanks ascii_atascii_table.pdf Quote Link to comment Share on other sites More sharing options...
+Stephen Posted July 10, 2019 Share Posted July 10, 2019 Just a quick glance after a LONG day work. I am guessing the issue is ASCII vs ATASCII vs internal character codes. Sorry I can't locate a chart at the moment. 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 10, 2019 Share Posted July 10, 2019 The chart shows the 'Z' character's color0-3 values at character 90 which is then repeated at 122 (lower z): which mirror the 'COLOR' statements results first 3 values but appear to have got the color3 value wrong, especially the values for "C.3" in the right two grids are the same as "C.2" in the left two grids. They should be updated to range from 224-255 instead. Quote Link to comment Share on other sites More sharing options...
Yaron Nir Posted July 10, 2019 Share Posted July 10, 2019 7 hours ago, Wrathchild said: This listing: 10 GRAPHICS 1+16 20 FOR I=0 TO 255 25 IF I=125 THEN GOTO 40 30 COLOR I:PLOT I-(INT(I/20)*20),INT(I/20) 40 NEXT I 50 GOTO 50 gives: So the 'Z's are at 90 = 0x5A (orange), 122 = 0x7A (green), 218 = 0xDA (blue) and 250 =0xFA (pink) So as screen character for 'Z' is actually 0x3A, adding 0x00, 0x40, 0x80 or 0xC0 would give you the character in different colours So the listing: 10 GRAPHICS 1+16 20 FOR I=0 TO 255 30 POKE PEEK(88)+256*PEEK(89)+I,I 40 NEXT I 50 GOTO 50 gives: And here the 'Z's are at 58 = 0x3A (orange), 122 = 0x7A (green), 186 = 0xBA (blue) and 250 =0xFA (pink) So it can be concluded the 'COLOR' value does not directly correlate with the screen-code values, so consistently either use COLOR/PLOT or POKEs. As wrathchild stated, please see this reference : https://www.atariarchives.org/c2bag/page029.php Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 11, 2019 Share Posted July 11, 2019 In OS graphics modes 1 and 2 the colour is decided by the top 2 bits of the "screen code". The screen code is often not the same as ATASCII - this is by design because if you grouped ASCII into 2 lots of 64, like 0-63 and 64-127 you'd have the numbers and many of the punctuation symbols in one half and the upper/lower case characters in the other. The way they did it gives you upper case, numbers and most of the special characters you need for everyday use. Another side effect is Space becomes 0 so the clear-screen operation can be much the same between character and graphics modes, for what that's worth. 1 Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted July 11, 2019 Share Posted July 11, 2019 It seemed an odd choice of implementation that a PLOT of character 125 would cause a clear screen (along with PRINT) Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 11, 2019 Share Posted July 11, 2019 Normal Ascii sees such control characters with the low values (12) but Atari wanted the graphics characters and most of the existing control characters were a bit irrelevant to the computer so they just used "spares". Really the biggest impact is probably the CR/LF difference, the other stuff doesn't seem to matter too much. Quote Link to comment Share on other sites More sharing options...
pmgraphics Posted July 11, 2019 Author Share Posted July 11, 2019 On 7/10/2019 at 12:16 AM, Wrathchild said: The chart shows the 'Z' character's color0-3 values at character 90 which is then repeated at 122 (lower z): which mirror the 'COLOR' statements results first 3 values but appear to have got the color3 value wrong, especially the values for "C.3" in the right two grids are the same as "C.2" in the left two grids. They should be updated to range from 224-255 instead. Is there a definitive table that provides all the correct values to use when use poke and color to display a character as a certain color register? 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.