summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/video/generic.c
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2013-07-15 08:58:49 +0000
committer Oliver Stöneberg <firewave@users.noreply.github.com>2013-07-15 08:58:49 +0000
commit1d806c7854e972404489fa9e0db8642dd3de3649 (patch)
tree4e7abfc6948b3711664c2dfe92d609ab9ea2136d /src/emu/video/generic.c
parent856227325e060dd5ddd3be9291b09a190ff95ebf (diff)
modernized generic palette initializations (nw)
Diffstat (limited to 'src/emu/video/generic.c')
-rw-r--r--src/emu/video/generic.c121
1 files changed, 1 insertions, 120 deletions
diff --git a/src/emu/video/generic.c b/src/emu/video/generic.c
index f2ebf58d3d2..dfc345ddbd8 100644
--- a/src/emu/video/generic.c
+++ b/src/emu/video/generic.c
@@ -101,30 +101,9 @@ const gfx_layout gfx_16x16x4_planar =
***************************************************************************/
/*-------------------------------------------------
- black - completely black palette
--------------------------------------------------*/
-
-PALETTE_INIT( all_black )
-{
- int i;
-
- for (i = 0; i < machine.total_colors(); i++)
- {
- palette_set_color(machine,i,RGB_BLACK); /* black */
- }
-}
-
-
-/*-------------------------------------------------
black_and_white - basic 2-color black & white
-------------------------------------------------*/
-PALETTE_INIT( black_and_white )
-{
- palette_set_color(machine,0,RGB_BLACK); /* black */
- palette_set_color(machine,1,RGB_WHITE); /* white */
-}
-
const rgb_t RGB_MONOCHROME_WHITE[] =
{
RGB_BLACK,
@@ -143,12 +122,6 @@ const rgb_t RGB_MONOCHROME_WHITE_HIGHLIGHT[] =
monochrome_amber - 2-color black & amber
-------------------------------------------------*/
-PALETTE_INIT( monochrome_amber )
-{
- palette_set_color(machine, 0, RGB_BLACK); /* black */
- palette_set_color_rgb(machine, 1, 0xf7, 0xaa, 0x00); /* amber */
-}
-
const rgb_t RGB_MONOCHROME_AMBER[] =
{
RGB_BLACK,
@@ -160,12 +133,6 @@ const rgb_t RGB_MONOCHROME_AMBER[] =
monochrome_green - 2-color black & green
-------------------------------------------------*/
-PALETTE_INIT( monochrome_green )
-{
- palette_set_color(machine, 0, RGB_BLACK); /* black */
- palette_set_color_rgb(machine, 1, 0x00, 0xff, 0x00); /* green */
-}
-
const rgb_t RGB_MONOCHROME_GREEN[] =
{
RGB_BLACK,
@@ -187,90 +154,4 @@ const rgb_t RGB_MONOCHROME_YELLOW[] =
{
RGB_BLACK,
MAKE_RGB(0xff, 0xff, 0x00)
-};
-
-
-/*-------------------------------------------------
- RRRR_GGGG_BBBB - standard 4-4-4 palette,
- assuming the commonly used resistor values:
-
- bit 3 -- 220 ohm resistor -- RED/GREEN/BLUE
- -- 470 ohm resistor -- RED/GREEN/BLUE
- -- 1 kohm resistor -- RED/GREEN/BLUE
- bit 0 -- 2.2kohm resistor -- RED/GREEN/BLUE
--------------------------------------------------*/
-
-PALETTE_INIT( RRRR_GGGG_BBBB )
-{
- const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
- int i;
-
- for (i = 0; i < machine.total_colors(); i++)
- {
- int bit0,bit1,bit2,bit3,r,g,b;
-
- /* red component */
- bit0 = (color_prom[i] >> 0) & 0x01;
- bit1 = (color_prom[i] >> 1) & 0x01;
- bit2 = (color_prom[i] >> 2) & 0x01;
- bit3 = (color_prom[i] >> 3) & 0x01;
- r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- /* green component */
- bit0 = (color_prom[i + machine.total_colors()] >> 0) & 0x01;
- bit1 = (color_prom[i + machine.total_colors()] >> 1) & 0x01;
- bit2 = (color_prom[i + machine.total_colors()] >> 2) & 0x01;
- bit3 = (color_prom[i + machine.total_colors()] >> 3) & 0x01;
- g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- /* blue component */
- bit0 = (color_prom[i + 2*machine.total_colors()] >> 0) & 0x01;
- bit1 = (color_prom[i + 2*machine.total_colors()] >> 1) & 0x01;
- bit2 = (color_prom[i + 2*machine.total_colors()] >> 2) & 0x01;
- bit3 = (color_prom[i + 2*machine.total_colors()] >> 3) & 0x01;
- b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
-
- palette_set_color(machine,i,MAKE_RGB(r,g,b));
- }
-}
-
-
-
-/*-------------------------------------------------
- RRRRR_GGGGG_BBBBB/BBBBB_GGGGG_RRRRR -
- standard 5-5-5 palette for games using a
- 15-bit color space
--------------------------------------------------*/
-
-PALETTE_INIT( RRRRR_GGGGG_BBBBB )
-{
- int i;
-
- for (i = 0; i < 0x8000; i++)
- palette_set_color(machine, i, MAKE_RGB(pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0)));
-}
-
-
-PALETTE_INIT( BBBBB_GGGGG_RRRRR )
-{
- int i;
-
- for (i = 0; i < 0x8000; i++)
- palette_set_color(machine, i, MAKE_RGB(pal5bit(i >> 0), pal5bit(i >> 5), pal5bit(i >> 10)));
-}
-
-
-
-/*-------------------------------------------------
- RRRRR_GGGGGG_BBBBB -
- standard 5-6-5 palette for games using a
- 16-bit color space
--------------------------------------------------*/
-
-PALETTE_INIT( RRRRR_GGGGGG_BBBBB )
-{
- int i;
-
- for (i = 0; i < 0x10000; i++)
- palette_set_color(machine, i, MAKE_RGB(pal5bit(i >> 11), pal6bit(i >> 5), pal5bit(i >> 0)));
-}
+}; \ No newline at end of file