Jump to content
IGNORED

Use 4 color registers with punctuation


Recommended Posts

My basic games redefine characters to create the graphics in graphics mode 1. If I define 4 letters to be my game graphics, I can use color registers 0 - 3 to set the color of each, so I have a different color for each character by using, upper case, lower case, or inverse upper case and inverse lower case. Letter 'Z' can be poked as 58, 180, 122, or 250 to display it in color register 0, 1, 2, or 3 (as you probably all know).

 

If I define punctuation as my graphics for the game, I am limited to just two colors (register 0 and 2). Is there a way to use punctuation and set the color using registers 1 and 3 as well, to have 4 characters on the screen at one time each with their own color?

Link to comment
Share on other sites

Using the asterisk with this in place: POKE 756,CH/256:SCREEN=PEEK(88)+256*PEEK(89):ME=SCREEN+5+20*8

POKE(ME),10 uses color reg 0 and displays my graphics

POKE(ME),138 uses color reg 2 and displays my graphics (inverse)

 

Adding 32 and POKE(me),42 it displays a J.

Subtracting 32 gives me a negative number thus an error.

 

I'm missing something.

Link to comment
Share on other sites

Sorry, that was a very quick response from me... my fault.

 

When you POKE values into screen memory area, you should use Internal Codes, not ATASCII codes.

 

To get internal codes, you should use range 0 to 63 to get the first set of ATASCII codes 32 to 95, so for that range, you must substract 32 and you'll get the first color.

 

For the second set (color), you should POKE the range 64 to 127, which represents the ATASCII codes 0 to 31 (control chars) and 96 to 127 (lowercase letters), so for the first half (numbers and punctuation), you should add 64, but use the same ATASCII code of lower case letters to get the uppper case.

 

Use the previous but add 128 for inverse video and you'll get the other 2 colors of graphics mode 1 and 2 (ANTIC mode 5 and 6) .

 

Better?

  • Like 1
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...