funkheld Posted March 8, 2019 Share Posted March 8, 2019 (edited) how can you please represent letters with different colors? program is "fastbasic". Thank you. greeting gr. 17 color 1 dpoke savmsc,ramadr for k=0 to 50 x=rand(400) poke (ramadr+x),32 next Edited March 8, 2019 by funkheld Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 8, 2019 Share Posted March 8, 2019 take a look here Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 8, 2019 Author Share Posted March 8, 2019 (edited) thanks for teh help. the color " red - yellow - green ? greeting Edited March 8, 2019 by funkheld Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 8, 2019 Share Posted March 8, 2019 Lines 15 to 30 are setting those, background was already black (which would be POKE 712,0) The values are derived from the hue (color) and luminance (brightness) - e.g. a byte made of with a high nibble of hue and low nibble of lum. So hex $CA for light green in decimal is (12 * 16) + 10 Quote Link to comment Share on other sites More sharing options...
funkheld Posted March 8, 2019 Author Share Posted March 8, 2019 (edited) hello thanks. greeting. why are the colors the same here? Thank you. greeting gr. 17 a=peek(88)+256*peek(89) setcolor 708,11,15 poke a+1,32 setcolor 709,7,8 poke a+2,32 do loop Edited March 8, 2019 by funkheld Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted March 8, 2019 Share Posted March 8, 2019 You are poking the same character value '32'. In the post I referenced, it states "a char value of 0-63 and the top two high bits control the colour of 0-3." So 32 in hex is $20 or in binary 00100000 - the top 2 bits are 00 and so Color 0 is being used. It looks like your 'setcolor' parameters are wrong, take a look at this page. Therefore if you wanted color 1, you add 64, color 2, add 128 and color 3, add 192. $20 = 00100000 = 32 $60 = 01100000 = 96 $A0 = 10100000 = 160 $E0 = 11100000 = 224 Maybe a word of warning, setting a colour before outputting a byte is not how the Atari functions. The colour is determined by the value of the byte output. If the colour was changed then if would change the colour of all characters associated with that register. 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.