MEGADRIVE : questions about colors
Posted: Sun Aug 23, 2015 10:10 pm
Hello,
I'm struggling with Megadrive colors.
So, information I gathered and questions :
- colors are in 9 bits
- we write it in the order B + G + R
=> in Binary it should be written 000 000 000 (9 bits), right ?
- for the Megadrive, the different Decimal values for each R, G and B can be : 000, 032, 064, 096, 128, 160, 192, 224
- in Hex, it is corresponding to 00, 20, 40, 60, 80, A0, C0, E0
- in Binary : 00000000, 01000000, 10000000, 11000000, 10000000, 10100000, 11000000, 11100000
=> Why do we write MD colors like that : 0x0BGR ?
example : is 0x0EEE a shortcut for #E0E0E0 ? Why don't we write #E0E0E0 ?
=> pure white :
Black will be 0x0000, but white ? Maximum we can get is 0x0EEE, that is quite light gray...
How to get a white color ?
=> What are the values for Shadow and Highlight colors ?
=> can we have Normal, Shadow and Higlight colors in a same palette ?
=> I saw this on the web but it's telling different values for MD RGB. What is the truth ? :
"Normal : 0, 36, 72, 108, 144, 180, 216, 252
Shadow : 0, 18, 36, 54, 72, 90, 108, 126
Highlight : 126, 144, 162, 180, 198, 216, 234, 252"
(Dec) 0, 36, 72, 108, 144, 180, 216, 252 = (Hex) 00, 24, 48, 6C, 90, B4, D8, FC
Does it mean that we can't have an accurate range of values ?
But this range "00, 24, 48, 6C, 90, B4, D8, FC" would not be possible to be written in the way 0x0BGR because we completely loose the second number, and there would be a lack of accuracy
For "00, 20, 40, 60, 80, A0, C0, E0", second number is always 0 so it's more easy.
=> I used "genitile" + "BMP to Tiles.bat" to get Palette and Tiles from a picture.
This is what I got for the palette :
dc.w 0x0eee
dc.w 0x0d0f
dc.w 0x0cbb
dc.w 0x0940
dc.w 0x0a40
dc.w 0x0630
dc.w 0x0a50
dc.w 0x0840
dc.w 0x0b60
dc.w 0x0a50
dc.w 0x0222
dc.w 0x0899
dc.w 0x08cf
dc.w 0x058d
dc.w 0x022a
dc.w 0x0000
Some of the colors don't match with none of the two range of values I showed above...
For information, I did this picture (40x64 pxl sprite) on Photoshop, with 15+1 transparent color, with colors not matching to Genesis Palette (because I don't know it).
I thougt Genitile would then take the nearest colours to match MD 512 colors Palette.
Am I wrong ?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
=> What are the colors values ranges in R, G, and B (Bin or Hex) that the MegaDrive understands (Normal / Shadow / Hilight) ? In Assembly or C <=
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This message is probably a little bit messy, sorry.
Thanks,
TAMA
I'm struggling with Megadrive colors.
So, information I gathered and questions :
- colors are in 9 bits
- we write it in the order B + G + R
=> in Binary it should be written 000 000 000 (9 bits), right ?
- for the Megadrive, the different Decimal values for each R, G and B can be : 000, 032, 064, 096, 128, 160, 192, 224
- in Hex, it is corresponding to 00, 20, 40, 60, 80, A0, C0, E0
- in Binary : 00000000, 01000000, 10000000, 11000000, 10000000, 10100000, 11000000, 11100000
=> Why do we write MD colors like that : 0x0BGR ?
example : is 0x0EEE a shortcut for #E0E0E0 ? Why don't we write #E0E0E0 ?
=> pure white :
Black will be 0x0000, but white ? Maximum we can get is 0x0EEE, that is quite light gray...
How to get a white color ?
=> What are the values for Shadow and Highlight colors ?
=> can we have Normal, Shadow and Higlight colors in a same palette ?
=> I saw this on the web but it's telling different values for MD RGB. What is the truth ? :
"Normal : 0, 36, 72, 108, 144, 180, 216, 252
Shadow : 0, 18, 36, 54, 72, 90, 108, 126
Highlight : 126, 144, 162, 180, 198, 216, 234, 252"
(Dec) 0, 36, 72, 108, 144, 180, 216, 252 = (Hex) 00, 24, 48, 6C, 90, B4, D8, FC
Does it mean that we can't have an accurate range of values ?
But this range "00, 24, 48, 6C, 90, B4, D8, FC" would not be possible to be written in the way 0x0BGR because we completely loose the second number, and there would be a lack of accuracy
For "00, 20, 40, 60, 80, A0, C0, E0", second number is always 0 so it's more easy.
=> I used "genitile" + "BMP to Tiles.bat" to get Palette and Tiles from a picture.
This is what I got for the palette :
dc.w 0x0eee
dc.w 0x0d0f
dc.w 0x0cbb
dc.w 0x0940
dc.w 0x0a40
dc.w 0x0630
dc.w 0x0a50
dc.w 0x0840
dc.w 0x0b60
dc.w 0x0a50
dc.w 0x0222
dc.w 0x0899
dc.w 0x08cf
dc.w 0x058d
dc.w 0x022a
dc.w 0x0000
Some of the colors don't match with none of the two range of values I showed above...
For information, I did this picture (40x64 pxl sprite) on Photoshop, with 15+1 transparent color, with colors not matching to Genesis Palette (because I don't know it).
I thougt Genitile would then take the nearest colours to match MD 512 colors Palette.
Am I wrong ?
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
=> What are the colors values ranges in R, G, and B (Bin or Hex) that the MegaDrive understands (Normal / Shadow / Hilight) ? In Assembly or C <=
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This message is probably a little bit messy, sorry.
Thanks,
TAMA