#define PMG_SIZE_QUAD 0x2 /* four color clocks per pixel */
-/* COLPM0-COLPM3, COLPF0-COLPF3, COLBK color registers:
-** See the "HUE_..." #defines in "atari.h" for the hue values;
-** Bitwise OR (|) with 0x00 (darkest) through 0x0F (lightest) (only even values are unique)
+/* COLPM0-COLPM3, COLPF0-COLPF3, COLBK color registers */
+
+/*****************************************************************************/
+/* Color definitions */
+/*****************************************************************************/
+
+/* Make a GTIA color value */
+#define _gtia_mkcolor(hue,lum) (((hue) << 4) | ((lum) << 1))
+
+/* Luminance values go from 0 (black) to 7 (white) */
+
+/* Hue values */
+/* (These can vary depending on TV standard (NTSC vs PAL),
+** tint potentiometer settings, TV tint settings, emulator palette, etc.)
*/
+#define HUE_GREY 0
+#define HUE_GOLD 1
+#define HUE_GOLDORANGE 2
+#define HUE_REDORANGE 3
+#define HUE_ORANGE 4
+#define HUE_MAGENTA 5
+#define HUE_PURPLE 6
+#define HUE_BLUE 7
+#define HUE_BLUE2 8
+#define HUE_CYAN 9
+#define HUE_BLUEGREEN 10
+#define HUE_BLUEGREEN2 11
+#define HUE_GREEN 12
+#define HUE_YELLOWGREEN 13
+#define HUE_YELLOW 14
+#define HUE_YELLOWRED 15
+
+/* Color defines, similar to c64 colors (untested) */
+/* Hardware palette values (for GTIA colxxx registers) */
+#define GTIA_COLOR_BLACK _gtia_mkcolor(HUE_GREY,0)
+#define GTIA_COLOR_WHITE _gtia_mkcolor(HUE_GREY,7)
+#define GTIA_COLOR_RED _gtia_mkcolor(HUE_REDORANGE,1)
+#define GTIA_COLOR_CYAN _gtia_mkcolor(HUE_CYAN,3)
+#define GTIA_COLOR_VIOLET _gtia_mkcolor(HUE_PURPLE,4)
+#define GTIA_COLOR_GREEN _gtia_mkcolor(HUE_GREEN,2)
+#define GTIA_COLOR_BLUE _gtia_mkcolor(HUE_BLUE,2)
+#define GTIA_COLOR_YELLOW _gtia_mkcolor(HUE_YELLOW,7)
+#define GTIA_COLOR_ORANGE _gtia_mkcolor(HUE_ORANGE,5)
+#define GTIA_COLOR_BROWN _gtia_mkcolor(HUE_YELLOW,2)
+#define GTIA_COLOR_LIGHTRED _gtia_mkcolor(HUE_REDORANGE,6)
+#define GTIA_COLOR_GRAY1 _gtia_mkcolor(HUE_GREY,2)
+#define GTIA_COLOR_GRAY2 _gtia_mkcolor(HUE_GREY,3)
+#define GTIA_COLOR_LIGHTGREEN _gtia_mkcolor(HUE_GREEN,6)
+#define GTIA_COLOR_LIGHTBLUE _gtia_mkcolor(HUE_BLUE,6)
+#define GTIA_COLOR_GRAY3 _gtia_mkcolor(HUE_GREY,5)
/*****************************************************************************/