Six
Newbie
Posts: 10
|
Post by Six on Dec 15, 2004 15:08:12 GMT -5
thedarkside.ath.cx/dtv/dtvpal.zipThere's an Adobe Photoshop ACT palette, a standard RIFF PAL palette, a pic that simply uses the DTV palette, and a pic of the complete DTV palette. This should be enough to go by if you want to do some xdev graphics work. Hope you find this helpful. Six
|
|
|
Post by Jeff Ledger on Dec 15, 2004 20:29:19 GMT -5
Thats for submitting this!
I've been working on a map of the colors. (For use in BASIC) -- I'll adapt this..
Jeff
|
|
|
Post by Jeff Ledger on Dec 15, 2004 20:29:53 GMT -5
Thats = Thanks
|
|
Six
Newbie
Posts: 10
|
Post by Six on Dec 16, 2004 21:57:16 GMT -5
There are a few palette oddities that have been discovered.
The palette is 16 colors in normal mode, and 256 colors in hicolor mode.
The palette is located from $d200-$d20f in normal mode, and $d200-$d2ff in hicolor mode.
To set hicolor mode, you have to first set bit 1 of $d03f (POKE 53311,1), then you should set bit 2 of $d03c(POKE 53308,4).
There is a bug in the palette in hicolor mode. All writes to the palette discard the high nybble of the least significant byte. In other words, no matter where you write to the palette, your write actually goes to the entries from $d200-$d20f. So, if you write to $d21e, you are actually writing to $d20e. If you write to $d284, you are actually writing with $d204.
There is another bug in the palette in hicolor mode that has turned up. However, this may actually be more of a feature. I don't think it was intentional, but I think it may be one of the more useful and coolest features of the DTV palette.
In hicolor mode, the palette DOES have 256 entries, HOWEVER, the luma of all values $10-$ff is equal to the high nybble of the entry number, and the chroma is equal to the chroma of palette entry $0f. So if you write $88 to $d20f, $d210-$d2ff are instantly changed to a chroma of 8, with a luma equivalent to their position in the palette. ($d210-$d21f would be $81, $d220-$d22f would be $82, and so on...)
Now some of you are thinking "Weak! That means there are only 31 possible different colors in any given palette!" This is what I thought at first, as well. But after some thinking, it occurred to me that this was actually quite cool, because I could change 16 of my palette entries by changing a single byte. If you're trying to hide a palette change in that brief time when the raster is behind the border, this is an immensely useful feature.
To put this to the test, I did the following:
turn on extended mode. turn on hicolor mode.
fill $0400-$04ff with $a0 fill $d800-$d8ff with values $00 through $ff setup your palette, and you should see the changes on the screen as you do.
See what happens when you change $d20f? Pretty cool, eh?
That sums up my last evening of exploring the palette. I hope you've found this information useful.
Six
|
|