All Colors

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Post Reply
fripperama
Newbie
Posts: 6
Joined: Tue Jan 15, 2013 4:44 pm
Location: Brazil
Contact:

All Colors

Post by fripperama » Fri Jul 12, 2013 3:18 am

I developed, to train in the Genesis system, a program that shows all 512 Genesis colors, 64 simultaneously. After working for quite some time, I'm publishing it for the genny comunnity.

Built in the SGDK with the code for further studying, it is a good example to understand how to work with colors and palettes in Genesis.

Here is the zipped file:
https://www.dropbox.com/s/0fq0n0sx4xmuq3d/allcolors.rar

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Fri Jul 12, 2013 7:55 pm

..
Last edited by eteream on Sat Jul 20, 2013 8:00 pm, edited 1 time in total.

fripperama
Newbie
Posts: 6
Joined: Tue Jan 15, 2013 4:44 pm
Location: Brazil
Contact:

Post by fripperama » Sat Jul 13, 2013 2:17 pm

Thanks for the hint! :D

Yes, I've seen here and there that there are many ways to show more than 64 colors at the same time, but my aim here was:
- to understand how to work with colors
- to make a didactic example when working with the SGDK

Now, I can deep my knowledge working with other techniques to explore the capacities of the hardware.

Xynxyn
Very interested
Posts: 54
Joined: Fri Jun 15, 2012 10:32 am
Location: Poland

Post by Xynxyn » Sun Jul 14, 2013 9:06 am

Highlight/shadow mode, ok you are right.
But there are 64/61*3=192/183 colors on MD with this mode. ;)

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 Jul 14, 2013 3:08 pm

Shadow/Highlight has duplicate colors, so it won't be that high.
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

Xynxyn
Very interested
Posts: 54
Joined: Fri Jun 15, 2012 10:32 am
Location: Poland

Post by Xynxyn » Sun Jul 14, 2013 9:39 pm

You're right. I always forget about that. Probably closer value is fripperama's one. (but fripperama said only about highlight, only lightening in the Higlight/Shadow mode will have less colors than 121 ;) )

EDIT:
Correction,... IT IS possible to make a 192/183 colors on MD. It's a very rare combintation of colors on palette, but it's possible to do it without repeating colors.

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

Post by Chilly Willy » Mon Jul 15, 2013 4:38 am

If you use DMA mode, you can show 512 colors. :D

LocalH
Very interested
Posts: 152
Joined: Tue Dec 19, 2006 5:04 pm

Post by LocalH » Tue Jul 16, 2013 10:17 am

And if you use Charles MacDonald's test ROM (or the same method he used) you can show all "1536" colors including dupes :P

Don't guess it's possible with the direct color DMA "mode" to finagle in a way to work with S/H? I know that you can make S/H apply to backdrop pixels, but doesn't direct color disable the display so that you can spew the backdrop CRAM entry through DMA? Since disabling the display essentially extends the border to fill the whole screen, my guess is that S/H will never be possible with direct color unless one does it with the display on, which of course would very severely hamper horizontal resolution.

I wish it was possible to use DMA to spam the backdrop register (VDP$07 by the old nomenclature I used to use) itself, then one could get full 64-color bitmaps with sprites and tiles on top. I'm pretty sure that's impossible, though, since you can only have VDP RAM as the target of DMA, and VDP$07 is of course outside of VDP RAM, rather in the VDP itself. I know for a fact that VDP$07 is not privy to the same restrictions as VDP RAM access, from an unstable "raster split" proof-of-concept I coded years ago and subsequently lost in a drive crash. I explicitly left the display enabled and cleared all of VRAM, fed a palette into CRAM, waited until a scanline in the middle of the screen that I chose arbitrarily, and then simply wrote a tight loop that basically loaded the starting address in RAM of my color table as a byte value, wrote it to VDP$07, incremented the source address, and then looped until vblank. While it was indeed jittery as all hell since I wasn't synced to the beam, it was fairly obviously writing to VDP$07 outside of the slots.

Speaking of that, since it's been a while since I've paid attention to the techniques that have been developed, anyone care to share with me the basic method of beam synchronization, and whether or not it could be used to sync the 68k itself or just DMA? Since the invention of the direct color mode, I'd be interested to experiment and see if that same synch method could allow stable raster splits C64-style, with tiles and sprites on top (which is much more difficult to do on the C64 as sprites eat cycles from the CPU when they're merely present on a scanline, but this is not so on the Genesis for the most part from what I understand). I'm a bit rusty but wanting to get back into coding. Can't easily run code on a Genesis right now, still got my SMD setup but don't have a functional PC with LPT. Of course there's Exodus, but it doesn't run full frame rate on my PC.

eteream
Very interested
Posts: 81
Joined: Tue Dec 22, 2009 2:13 pm

Post by eteream » Tue Jul 16, 2013 12:29 pm

..
Last edited by eteream on Sat Jul 20, 2013 7:59 pm, edited 1 time in total.

Post Reply