Direct color demo

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Post Reply
Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Direct color demo

Post by Chilly Willy » Sun May 06, 2012 6:02 pm

I was over at Atari Age the other day and saw a thread on getting more color on the A8 - always a big deal for those early systems. The method was rather interesting: use the 16 luminance mode and change the base color via a display list interrupt on every line, changing from red to green to blue and back to red. It did a pretty good job on the A8, so I wondered how it would look on the Genesis.

Rather than use an interrupt to change the base color on every line, I made the scroll size 128x32; the first 40 entries are set for a palette of red colors, the next 40 for green, and the next 40 for blue. Then I set the hscroll to every line, and set the hscroll table so that the first line uses an hscroll of 0, the next 320, and the next 640. So we have each line set to a different color without any CPU overhead.

I use scroll layer B for the bitmap, and A for text overlay.

Because the Genesis only has 8 luminance levels, I use half of each palette for the different levels. That would leave the other half free for other uses. So you get 512 colors set directly over three lines. For better vertical resolution, I just use the values for the line in question, so the overall luminance is kept for 320x224. The color has a vertical resolution of one third that.

The result is kinda interesting - for such a simple method of displaying a 15-bit image, it looks better than most 16 color quantizer results that I have tried, like sixpack. It works better for some images than others. The slideshow demo linked below has several nature images, a few screenshots from Wolf3D, and one anime image.

http://www.mediafire.com/?lwxdzhfnohtxfwu

Oerg866
Very interested
Posts: 211
Joined: Sat Apr 19, 2008 10:58 am
Location: Frankfurt, Germany
Contact:

Post by Oerg866 » Sun May 06, 2012 7:40 pm

EDIT: Actually it's supposed to be secret so I deleted the links here :D

But interesting way you do it!

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Sun May 06, 2012 8:45 pm

Interesting. Could it look better with vertical strips? I guess they would blend better on a CRT TV rather than horizontal strips.

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Sun May 06, 2012 9:22 pm

Vertical lines would definitely work much better than horizontal ones, particularly in RF and composhit, RGB people won't have much luck though.
But you may try interlace mode to get vertical lines blend. they won't blend in any other way, unless you use some seriously small TV.
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sun May 06, 2012 10:29 pm

Yeah, I could do a horizontal/vertical blend... R/G on one line, then G/B on the next. Kind hard to do all three on the same line without using both layers or going with fewer colors. Sixteen colors means you can do two colors in the same line per cell (since there's only 8 levels per color on the MD). That would be better than just vertical blending. If there was a column scroll mode like the line scroll mode, it would be simple to get all three colors horizontally, but the best you get is two cell scroll. That was half the reason I did the line blend - I could set the scroll on every line.

EDIT: Okay, here's the same demo with R/G on the first line, and G/B on the second. It looks much better - the vertical line artifacts is gone, and you get more of a ordered dither look to it now. It's actually pretty nice - I could see someone using this for a general BMP viewer or something. One other benefit of this is it combines the color entries used into two palettes, leaving two entire palettes free instead of half of all four. Same number of entries free, but now frees the palettes as well.

http://www.mediafire.com/?rc3ptrcnv4y4vu5

EDIT 2: Okay, I noticed on demo3 that the whites were more greenish... that's because green had twice as many pixels as red or blue, and is a bright color to begin with. Here's demo4 which does R/B, B/G instead. Blue is the darkest color in video, so this does twice as many as red or green. This helps the already dark blue, and makes the whites whiter.

http://www.mediafire.com/?drr4h9a0lnu5t7h

EDIT 3: I tried demo4 on Fusion in TV mode... it looks really nice, if just a little dark. TV mode seems to blur the lines a bit, so the pixels blend on the line. This changes the ordered dither look to a simple and mild scanline look that isn't objectionable. Normal mode is more like my LCD TV... I'll have to try the CRT next. :)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon May 07, 2012 7:50 am

4th demo looks quite ok, but I got to get home to try on my setup to get a better view
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Post Reply