Example #1
0
static PALETTE_INIT( skydiver )
{
	palette_set_color(machine,0,0x00,0x00,0x00); /* black */
	palette_set_color(machine,1,0xff,0xff,0xff); /* white */
	palette_set_color(machine,2,0xa0,0xa0,0xa0); /* grey */

	memcpy(colortable,colortable_source,sizeof(colortable_source));
}
Example #2
0
		PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED
INPUT_PORTS_END

static PALETTE_INIT( lcmate2 )
{
	palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
	palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
}
Example #3
0
INPUT_PORTS_END


void alesis_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
	palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
}
Example #4
0
		PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_UNUSED
INPUT_PORTS_END

void lcmate2_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
	palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
}
Example #5
0
void boxer_state::palette_init()
{
	palette_set_color(machine(),0, MAKE_RGB(0x00,0x00,0x00));
	palette_set_color(machine(),1, MAKE_RGB(0xff,0xff,0xff));

	palette_set_color(machine(),2, MAKE_RGB(0xff,0xff,0xff));
	palette_set_color(machine(),3, MAKE_RGB(0x00,0x00,0x00));
}
Example #6
0
/* debug purpose*/
static PALETTE_INIT( taitowlf )
{
	palette_set_color(machine,0x70,MAKE_RGB(0xff,0xff,0xff));
	palette_set_color(machine,0x71,MAKE_RGB(0xff,0xff,0xff));
	palette_set_color(machine,0x01,MAKE_RGB(0x55,0x00,0x00));
	palette_set_color(machine,0x10,MAKE_RGB(0xaa,0x00,0x00));
	palette_set_color(machine,0x00,MAKE_RGB(0x00,0x00,0x00));
}
Example #7
0
/* swapped r/g/b hook-up */
PALETTE_INIT_MEMBER(galaxold_state,dambustr)
{
	const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
	int base = BACKGROUND_COLOR_BASE;
	int i, len;

	/* first, the character/sprite palette */
	len = machine().root_device().memregion("proms")->bytes();

	for (i = 0;i < len;i++)
	{
		int bit0,bit1,bit2,r,g,b;

		/* red component */
		bit0 = BIT(*color_prom,0);
		bit1 = BIT(*color_prom,1);
		bit2 = BIT(*color_prom,2);
		b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
		/* green component */
		bit0 = BIT(*color_prom,3);
		bit1 = BIT(*color_prom,4);
		bit2 = BIT(*color_prom,5);
		r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
		/* blue component */
		bit0 = BIT(*color_prom,6);
		bit1 = BIT(*color_prom,7);
		g = 0x4f * bit0 + 0xa8 * bit1;

		palette_set_color_rgb(machine(),i,r,g,b);
		color_prom++;
	}


	galaxold_init_stars(machine(), STARS_COLOR_BASE);


	/* bullets - yellow and white */
	palette_set_color(machine(),BULLETS_COLOR_BASE+0,MAKE_RGB(0xef,0xef,0x00));
	palette_set_color(machine(),BULLETS_COLOR_BASE+1,MAKE_RGB(0xef,0xef,0xef));

	/*
	Assumption (not clear from the schematics):
	The background color generator is connected this way:

	    RED   - 470 ohm resistor
	    GREEN - 470 ohm resistor
	    BLUE  - 470 ohm resistor */


	for (i = 0; i < 8; i++)
	{
		int r = BIT(i,0) * 0x47;
		int g = BIT(i,1) * 0x47;
		int b = BIT(i,2) * 0x4f;
		palette_set_color_rgb(machine(),base+i,r,g,b);
	}
}
Example #8
0
INPUT_PORTS_END


static PALETTE_INIT( mgolf )
{
	palette_set_color(machine, 0, MAKE_RGB(0x80, 0x80, 0x80));
	palette_set_color(machine, 1, MAKE_RGB(0x00, 0x00, 0x00));
	palette_set_color(machine, 2, MAKE_RGB(0x80, 0x80, 0x80));
	palette_set_color(machine, 3, MAKE_RGB(0xff, 0xff, 0xff));
}
Example #9
0
INPUT_PORTS_END


void mgolf_state::palette_init()
{
    palette_set_color(machine(), 0, MAKE_RGB(0x80, 0x80, 0x80));
    palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00));
    palette_set_color(machine(), 2, MAKE_RGB(0x80, 0x80, 0x80));
    palette_set_color(machine(), 3, MAKE_RGB(0xff, 0xff, 0xff));
}
Example #10
0
INPUT_PORTS_END


void pokemini_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(0xff, 0xfb, 0x87));
	palette_set_color(machine(), 1, MAKE_RGB(0xb1, 0xae, 0x4e));
	palette_set_color(machine(), 2, MAKE_RGB(0x84, 0x80, 0x4e));
	palette_set_color(machine(), 3, MAKE_RGB(0x4e, 0x4e, 0x4e));
}
Example #11
0
GFXDECODE_END


static PALETTE_INIT( flyball )
{
	palette_set_color(machine, 0, MAKE_RGB(0x3F, 0x3F, 0x3F));  /* tiles, ball */
	palette_set_color(machine, 1, MAKE_RGB(0xFF, 0xFF, 0xFF));
	palette_set_color(machine, 2, MAKE_RGB(0xFF ,0xFF, 0xFF));  /* sprites */
	palette_set_color(machine, 3, MAKE_RGB(0x00, 0x00, 0x00));
}
Example #12
0
INPUT_PORTS_END


static PALETTE_INIT( pokemini )
{
	palette_set_color(machine, 0, MAKE_RGB(0xff, 0xfb, 0x87));
	palette_set_color(machine, 1, MAKE_RGB(0xb1, 0xae, 0x4e));
	palette_set_color(machine, 2, MAKE_RGB(0x84, 0x80, 0x4e));
	palette_set_color(machine, 3, MAKE_RGB(0x4e, 0x4e, 0x4e));
}
Example #13
0
INPUT_PORTS_END


static PALETTE_INIT( zac2650 )
{
	palette_set_color(machine,0,RGB_BLACK);
	palette_set_color(machine,1,RGB_WHITE);
	palette_set_color(machine,2,RGB_BLACK);
	palette_set_color(machine,3,RGB_BLACK);
}
Example #14
0
GFXDECODE_END

void lazercmd_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */
	palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x00, 0x00)); /* black */

	palette_set_color(machine(), 2, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
	palette_set_color(machine(), 3, MAKE_RGB(0xb0, 0xb0, 0xb0)); /* white */

	palette_set_color(machine(), 4, MAKE_RGB(0xff, 0xff, 0xff)); /* bright white */
}
Example #15
0
INPUT_PORTS_END


static PALETTE_INIT( zac2650 )
{
	palette_set_color(0,0x00,0x00,0x00); /* BLACK */
	palette_set_color(1,0xff,0xff,0xff); /* WHITE */
	colortable[0] = 0;
	colortable[1] = 1;
	colortable[2] = 0;
	colortable[3] = 0;
}
Example #16
0
GFXDECODE_END

static PALETTE_INIT( lazercmd )
{
	palette_set_color(machine, 0, MAKE_RGB(0xb0, 0xb0, 0xb0));	/* white */
	palette_set_color(machine, 1, MAKE_RGB(0x00, 0x00, 0x00));	/* black */

	palette_set_color(machine, 2, MAKE_RGB(0x00, 0x00, 0x00));	/* black */
	palette_set_color(machine, 3, MAKE_RGB(0xb0, 0xb0, 0xb0));	/* white */

	palette_set_color(machine, 4, MAKE_RGB(0xff, 0xff, 0xff));	/* bright white */
}
Example #17
0
INPUT_PORTS_END


/***************************************************************************
    PALETTE
***************************************************************************/

static PALETTE_INIT( apricot )
{
	palette_set_color(machine, 0, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
	palette_set_color(machine, 1, MAKE_RGB(0x00, 0x7f, 0x00)); /* low intensity */
	palette_set_color(machine, 2, MAKE_RGB(0x00, 0xff, 0x00)); /* high intensitiy */
}
Example #18
0
INPUT_PORTS_END

#endif

//**************************************************************************
//  PALETTE
//**************************************************************************

void px4_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
	palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
}
Example #19
0
INPUT_PORTS_END


/***************************************************************************
    PALETTE
***************************************************************************/

void apricot_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(0x00, 0x00, 0x00)); /* black */
	palette_set_color(machine(), 1, MAKE_RGB(0x00, 0x7f, 0x00)); /* low intensity */
	palette_set_color(machine(), 2, MAKE_RGB(0x00, 0xff, 0x00)); /* high intensitiy */
}
Example #20
0
INPUT_PORTS_END



//**************************************************************************
//  VIDEO
//**************************************************************************

void portfolio_state::palette_init()
{
	palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
	palette_set_color(machine(), 1, MAKE_RGB(92, 83, 88));
}
Example #21
0
GFXDECODE_END



/* Palette Initialization */


void zx_state::palette_init()
{
	palette_set_color(machine(),0,RGB_WHITE); /* white */
	palette_set_color(machine(),1,RGB_BLACK); /* black */
	palette_set_color(machine(),2,RGB_BLACK); /* black */
	palette_set_color(machine(),3,RGB_WHITE); /* white */
}
Example #22
0
GFXDECODE_END



/* Palette Initialization */


static PALETTE_INIT( zx80 )
{
	palette_set_color(machine,0,RGB_WHITE); /* white */
	palette_set_color(machine,1,RGB_BLACK); /* black */
	palette_set_color(machine,2,RGB_BLACK); /* black */
	palette_set_color(machine,3,RGB_WHITE); /* white */
}
Example #23
0
INPUT_PORTS_END

//**************************************************************************
//  VIDEO
//**************************************************************************

//-------------------------------------------------
//  PALETTE_INIT( portfolio )
//-------------------------------------------------

static PALETTE_INIT( portfolio )
{
	palette_set_color(machine, 0, MAKE_RGB(138, 146, 148));
	palette_set_color(machine, 1, MAKE_RGB(92, 83, 88));
}
Example #24
0
/* VIDEO GOODS */
UINT32 lgp_state::screen_update_lgp(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
	int charx, chary;

	/* make color 0 transparent */
	palette_set_color(machine(), 0, MAKE_ARGB(0,0,0,0));

	/* clear */
	bitmap.fill(0, cliprect);

	/* Draw tiles */
	for (charx = 0; charx < 32; charx++)
	{
		for (chary = 0; chary < 32; chary++)
		{
			int current_screen_character = (chary*32) + charx;

			/* Somewhere there's a flag that offsets the tilemap by 0x100*x */
			/* Palette is likely set somewhere as well (tile_control_ram?) */
			drawgfx_transpen(bitmap, cliprect, machine().gfx[0],
					m_tile_ram[current_screen_character],
					0,
					0, 0, charx*8, chary*8, 0);
		}
	}

	return 0;
}
Example #25
0
static void
namcofl_install_palette( void )
{
	int pen, page, dword_offset, byte_offset;
	UINT32 r,g,b;
	UINT32 *pSource;

	/* this is unnecessarily expensive.  Better would be to mark palette entries dirty as
     * they are modified, and only process those that have changed.
     */
	pen = 0;
	for( page=0; page<4; page++ )
	{
		pSource = &paletteram32[page*0x2000/4];
		for( dword_offset=0; dword_offset<0x800/4; dword_offset++ )
		{
			r = pSource[dword_offset+0x0000/4];
			g = pSource[dword_offset+0x0800/4];
			b = pSource[dword_offset+0x1000/4];

			for( byte_offset=0; byte_offset<4; byte_offset++ )
			{
				palette_set_color( pen++, r&0xff, g&0xff, b&0xff);
				r>>=8; g>>=8; b>>=8;
			}
		}
	}
}
Example #26
0
static void prom_to_palette(int number, UINT8 val)
{
	palette_set_color(number,
		(val & 4) ? 0xff : 0x00,
		(val & 2) ? 0xff : 0x00,
		(val & 1) ? 0xff : 0x00);
}
Example #27
0
PALETTE_INIT_MEMBER(ojankohs_state,ojankoy)
{
	const UINT8 *color_prom = memregion("proms")->base();
	int i;
	int bit0, bit1, bit2, bit3, bit4, r, g, b;

	for (i = 0; i < machine().total_colors(); i++)
	{
		bit0 = BIT(color_prom[0], 2);
		bit1 = BIT(color_prom[0], 3);
		bit2 = BIT(color_prom[0], 4);
		bit3 = BIT(color_prom[0], 5);
		bit4 = BIT(color_prom[0], 6);
		r = 0x08 * bit0 + 0x11 * bit1 + 0x21 * bit2 + 0x43 * bit3 + 0x82 * bit4;
		bit0 = BIT(color_prom[machine().total_colors()], 5);
		bit1 = BIT(color_prom[machine().total_colors()], 6);
		bit2 = BIT(color_prom[machine().total_colors()], 7);
		bit3 = BIT(color_prom[0], 0);
		bit4 = BIT(color_prom[0], 1);
		g = 0x08 * bit0 + 0x11 * bit1 + 0x21 * bit2 + 0x43 * bit3 + 0x82 * bit4;
		bit0 = BIT(color_prom[machine().total_colors()], 0);
		bit1 = BIT(color_prom[machine().total_colors()], 1);
		bit2 = BIT(color_prom[machine().total_colors()], 2);
		bit3 = BIT(color_prom[machine().total_colors()], 3);
		bit4 = BIT(color_prom[machine().total_colors()], 4);
		b = 0x08 * bit0 + 0x11 * bit1 + 0x21 * bit2 + 0x43 * bit3 + 0x82 * bit4;

		palette_set_color(machine(), i, MAKE_RGB(r, g, b));
		color_prom++;
	}
}
Example #28
0
/* VIDEO GOODS */
static SCREEN_UPDATE( lgp )
{
	lgp_state *state = screen->machine().driver_data<lgp_state>();
	int charx, chary;

	/* make color 0 transparent */
	palette_set_color(screen->machine(), 0, MAKE_ARGB(0,0,0,0));

	/* clear */
	bitmap_fill(bitmap, cliprect, 0);

	/* Draw tiles */
	for (charx = 0; charx < 32; charx++)
	{
		for (chary = 0; chary < 32; chary++)
		{
			int current_screen_character = (chary*32) + charx;

			/* Somewhere there's a flag that offsets the tilemap by 0x100*x */
			/* Palette is likely set somewhere as well (tile_control_ram?) */
			drawgfx_transpen(bitmap, cliprect, screen->machine().gfx[0],
					state->m_tile_ram[current_screen_character],
					0,
					0, 0, charx*8, chary*8, 0);
		}
	}

	return 0;
}
Example #29
0
/***************************************************************************

  Convert the color PROMs into a more useable format.

  Mat Mania is unusual in that it has both PROMs and RAM to control the
  palette. PROMs are used for characters and background tiles, RAM for
  sprites.
  I don't know for sure how the PROMs are connected to the RGB output,
  but it's probably the usual:

  bit 7 -- 220 ohm resistor  -- GREEN
        -- 470 ohm resistor  -- GREEN
        -- 1  kohm resistor  -- GREEN
        -- 2.2kohm resistor  -- GREEN
        -- 220 ohm resistor  -- RED
        -- 470 ohm resistor  -- RED
        -- 1  kohm resistor  -- RED
  bit 0 -- 2.2kohm resistor  -- RED

  bit 3 -- 220 ohm resistor  -- BLUE
        -- 470 ohm resistor  -- BLUE
        -- 1  kohm resistor  -- BLUE
  bit 0 -- 2.2kohm resistor  -- BLUE

***************************************************************************/
void matmania_state::palette_init()
{
	const UINT8 *color_prom = memregion("proms")->base();
	int i;

	for (i = 0; i < 64; i++)
	{
		int bit0, bit1, bit2, bit3, r, g, b;

		bit0 = BIT(color_prom[0], 0);
		bit1 = BIT(color_prom[0], 1);
		bit2 = BIT(color_prom[0], 2);
		bit3 = BIT(color_prom[0], 3);
		r = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
		bit0 = BIT(color_prom[0], 4);
		bit1 = BIT(color_prom[0], 5);
		bit2 = BIT(color_prom[0], 6);
		bit3 = BIT(color_prom[0], 7);
		g = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;
		bit0 = BIT(color_prom[64], 0);
		bit1 = BIT(color_prom[64], 1);
		bit2 = BIT(color_prom[64], 2);
		bit3 = BIT(color_prom[64], 3);
		b = 0x0e * bit0 + 0x1f * bit1 + 0x43 * bit2 + 0x8f * bit3;

		palette_set_color(machine(),i,MAKE_RGB(r,g,b));
		color_prom++;
	}
}
Example #30
0
static PALETTE_INIT( mogura )
{
	const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
	int i, j;

	j = 0;
	for (i = 0; i < 0x20; i++)
	{
		int bit0, bit1, bit2, r, g, b;

		/* red component */
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
		/* green component */
		bit0 = BIT(color_prom[i], 3);
		bit1 = BIT(color_prom[i], 4);
		bit2 = BIT(color_prom[i], 5);
		g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
		/* blue component */
		bit0 = 0;
		bit1 = BIT(color_prom[i], 6);
		bit2 = BIT(color_prom[i], 7);
		b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		palette_set_color(machine, j, MAKE_RGB(r, g, b));
		j += 4;
		if (j > 31) j -= 31;
	}
}