Jump to content

Photo

Graphics 10 (9 color) palette suggestions needed.

colors palette gtia

32 replies to this topic

#26 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,472 posts
  • Location:knoxville, TN

Posted Thu Oct 29, 2015 5:39 PM

There is also another method that I have been meaning to experiment with, to see if we can get a 9-color Graphics 10 screen at 80x96 resolution, but using half the memory (2K)

 

You set the screen into Antic 7 (Graphics 2) and engage the GTIA into mode 10.  You also set the display list for horizontal scroll, and shift all character lines right by one color clock.

 

Graphics 2 with GTIA 10 behaves very differently.  You get only 7 of the 9 colors here, with only four colors per character cell.  I made a chart that shows how this works:

 

graphics 1.10 color chart.png

 

So basically the characters are a 4x8 grid like Antic 4 chars.  You only get three colors in the inverse uppercase range, and the normal uppercase range (0-32) will not display at all.

 

But, the experiment is, what happens if you shift the graphics right by one color clock, and then plot characters from differing ranges next to each other?  It may be possible to unlock the other two colors (PF0 and PF2) using this method, and then you'd have a full 9-color Graphics 10 low-res mode, with half the memory usage.  You would only need two fonts to cover the whole screen, and less memory.



#27 popmilo OFFLINE  

popmilo

    Stargunner

  • Topic Starter
  • 1,570 posts
  • Location:Senta, Srbija

Posted Fri Oct 30, 2015 8:24 AM

Don't know about scrolling 'trick' but could be interesting with some modes.

'Pure' hires text mode (Antic 2) can show all 9 colors and takes only 3K (2k chardef + 1k screen).
What's bad about it is strange combination of 7 bits and 9 colors... Hard divide one char in useful way...

#28 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,472 posts
  • Location:knoxville, TN

Posted Sat Oct 31, 2015 11:35 PM

Don't know about scrolling 'trick' but could be interesting with some modes.

'Pure' hires text mode (Antic 2) can show all 9 colors and takes only 3K (2k chardef + 1k screen).
What's bad about it is strange combination of 7 bits and 9 colors... Hard divide one char in useful way...

Actually 1K, unless you double the font for 2x16 characters.

 

I think the scrolling trick will work, in theory ... it's because of how Graphics 1 and 2 handle the characters ...

 

Remembering that in Antic 4, you have bitpairs, where 00 is the background, 01 is PF0, 10 is PF1, 11 is PF2, and 11 inversed is PF3.

 

But in Graphics 1, there are four ranges of colors depending on ATASCII screen code ranges, so ... in the PF0 (uppercase range), imagine a 01 placed on an 8x8 grid where a pixel should be, and a 00 for a blank space.  As so:

 

00 00 00 00 00 00 00 00

00 00 01 01 01 01 00 00

00 01 01 00 00 01 01 00

00 01 01 00 00 01 01 00

00 01 01 01 01 01 01 00

00 01 01 00 00 01 01 00

00 01 01 00 00 01 01 00

00 00 00 00 00 00 00 00

 

This is a representation of an "A" using this method.  For range two, you use "10" for the pixel, and ranges three and four both use "11" (remembering that PF3 lowercase inverse range sets the inverse bit)

 

So in normal Graphics 1 mode, the "01" pixels will light up as PF0 (default - orange).

 

When GTIA is engaged in Graphics 1, the sets of bit-pairs get combined into nybbles.  The colors are then looked up on this table:

 

0000 - 704 (background)
0001 - 704
0010 - 705 (p1)
0011 - 706 (p2) 707 (p3-inverse)
0100 - 704
0101 - 704
0110 - 705
0111 - 706 707 (inverse)
1000 - 712 (pf4 - graphics 10 color 8 )
1001 - 708 (pf0)
1010 - 709 (pf1)
1011 - 710 (pf2) 711 (pf3 inverse)
1100 - 712 712 (inverse)
1101 - 712 708 (inverse)
1110 - 712 709 (inverse)
1111 - 712 711 (inverse)

 

So with uppercase, you get only 0000, 0001,0100, and 0101, which all correspond to the BG color.  This is why uppercase characters are blank.

In lowercase, you get 0000, 0010, 1000, and 1010  (BG, 705, 712, and 709)

inverse uppercase gets you 0000, 0011, 1100, and 1111 (BG, 706, and two instance of 712) which is why that range only has three colors

inverse lowercase gets you the same nybbles, but you read the inverse table (BG, 707, 712, and 711).

 

This gets you 4x8 characters similar to ANTIC 4, but using the color combinations shown above.

 

This is all fine and dandy.  But if you shift the color clock to the right using HSCROL, the setup is altered.  By themselves, the colors don't change, only the bit position is shifted.  BUT, if you plot characters from different ranges next to each other, and set the appropriate pixels, it becomes possible, in theory, to unlock the two hidden colors PF0 and PF2 (708, and 710).

 

So for instance, say we wanted PF0 ... which shows up as nybble 1001 in one of the instances above.

 

Now let's say, we plotted a character from the lowercase range (bit pair 10) next to a character from the uppercase range (bit pair 01) then set the bits on pixels on adjoining characters, so that you get something like 00 10 | 01 00 ... which gets you color 705, next to the BG color (0100 is from the uppercase range, all values are the BG color).

 

Now, when you shift one color clock to the right, you get this:  .. 00 |10  01 | 00 ..

 

In the overlap area between the two characters, you get the hidden color pattern 1001 which should, in theory, activate PF0-708.

 

This means, of course, the two hidden colors will only show up in these overlap areas.  But different HSCROL settings should, in theory, allow these overlap areas to change on the screen.

 

This needs actual experimentation, but in theory one should be able to get (with limitations) all 9 colors in this mode with half the RAM needed for conventional GTIA text mode (remembering that a Graphics 1 font only takes 512K, and a Graphics 1 screenmap takes up 480 bytes, or 20x24 characters).  I may try whipping up an experiment to see if I can get these colors to show up.


Edited by Synthpopalooza, Sat Oct 31, 2015 11:46 PM.


#29 popmilo OFFLINE  

popmilo

    Stargunner

  • Topic Starter
  • 1,570 posts
  • Location:Senta, Srbija

Posted Sun Nov 1, 2015 2:48 PM

Actually 1K, unless you double the font for 2x16 characters.

Huuh... You're right, that's 30 years of C64 coding talking for me ;)

This needs actual experimentation, but in theory one should be able to get (with limitations) all 9 colors in this mode with half the RAM needed for conventional GTIA text mode (remembering that a Graphics 1 font only takes 512K, and a Graphics 1 screenmap takes up 480 bytes, or 20x24 characters).  I may try whipping up an experiment to see if I can get these colors to show up.

Looks good for testing to me.
My comment would be that it is less screen memory and smaller charset but on the other hand bit patterns are complex and maybe wouldn't be that fast at the end. Don't know if it can show 'any pixel in any color' or is there a kind of attribute clash between chars because of mixing bits between two of them ?
Paper and pencil (or a spreadsheet ;) ) can make sense out of this :)

#30 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,472 posts
  • Location:knoxville, TN

Posted Sun Nov 1, 2015 7:16 PM

Well with HSCROL left unchanged, you have a simple 7 colors, and 4 per 4x8 char cell.

 

When HSCROL is altered, I believe that you will get the same 4 colors per char cell, with the extra colors appearing on every 4th column when you plot characters from differing ranges.  For instance, when shifting between range 10 (lowercase) on the left and range 01 (uppercase) on the right you would likely get these four colors:

 

0000 - BG (704)

1000 - Color 9 (712)

0001 - BG (704)

1001 - PF0 (708)

 

When mixing the other ranges besides range 01 you would get fewer instances of the BG color.  The real mystery is, what happens when you overlap the inverse lowercase range (11 inverse) with other ranges.  It bears some experimentation.


Edited by Synthpopalooza, Sun Nov 1, 2015 11:12 PM.


#31 popmilo OFFLINE  

popmilo

    Stargunner

  • Topic Starter
  • 1,570 posts
  • Location:Senta, Srbija

Posted Sat Nov 14, 2015 2:53 PM

Couldn't leave this unfinished so I made a small test :)

Screenshot from 2015-11-14 21-44-45.png

 

Antic mode 6 (double width characters in 4 colors + background). Palette is one I use in my game maker project (black, dark grey, white and three pairs of darker and lighter RGB colors).

 

Every 8 scanlines HScroll is increased by one. As you can see something strange is going on and additional colors do appear.

All 9 colors are visible so it looks like its working.

 

To be honest I don't know if this can be used for anything. It's hard making those combinations and even then only width of one gtia pixel is changed. Not worth all the effort imho.

 

It's cool that you were right and it does show how GTIA works internally. Thanks for school ;)

 

Xex file:

Attached File  gtiascrolledtest.xex   782bytes   132 downloads



#32 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,472 posts
  • Location:knoxville, TN

Posted Sat Nov 14, 2015 3:37 PM

If you do the same test in Graphics 11, I believe it will also produce 14 out of the 16 chromas (with numbers 11 and 14 being absent), where normally you would only have 10 colors.  Nice to know I had it pegged right. :)

 

I am going to play around with it and see what can be done, and make a full documentation of the behavior.

 

EDIT:  Another thing that could maybe be done in this mode, is using the Konop's mode VSCROL trick, to get 20x32 characters.  This would mean that the characters would only be about 6 pixels high, not 8.  The more you increased the VSCROL, the shorter the characters would be, which would give you a little bit more freedom in placing those HSCROL-mixed pixels.  But then there is all that wasted RAM too.

 

I would like the source code to this please. :)


Edited by Synthpopalooza, Sat Nov 14, 2015 3:57 PM.


#33 Synthpopalooza OFFLINE  

Synthpopalooza

    Stargunner

  • 1,472 posts
  • Location:knoxville, TN

Posted Sat Nov 14, 2015 10:09 PM

Had a think about something else just now ...

 

When I use GTIA 10 in graphics 1 or 2 (usually with my Super IRG experiments) I tend to go with these settings:

 

BAK (712) - White. This color will be in all settings.

 

PM0 (704 - background) - Black

 

705 - light blue

706 - light green

707 - light red

709 - dark blue

711 - dark red

 

This setting allows both shades of blue to be in the same range (lowercase normal), and both shades of red to be in the lowercase inverse range.  The uppercaseinverse range will of course, only have light green and white.  The light colors, should be of a lower luminance than the white in 712, so that you can have 4 level (or 3-level) shading per character.

 

But, if we put the missing colors into 708 and 710 (grey, dark green) using the HSCROL trick, it might be possible to use them sparingly, say as a one-pixel shadow artifact to one side of the appropriately colored light graphics.  They would only show up every 4 pixels, but just enough to add shading to the graphics.  The key would be mapping out the best ranges to allow these colors to show, and setting it up so that the green characters on uppercase inverse interface with a neighboring range, to unlock the dark green.







Also tagged with one or more of these keywords: colors, palette, gtia

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users