Beispiel #1
0
void ksayakyu_state::palette_init()
{
	const UINT8 *prom = machine().root_device().memregion("proms")->base();
	int r, g, b, i;

	for (i = 0; i < 0x100; i++)
	{
		r = (prom[i] & 0x07) >> 0;
		g = (prom[i] & 0x38) >> 3;
		b = (prom[i] & 0xc0) >> 6;

		palette_set_color_rgb(machine(), i, pal3bit(r), pal3bit(g), pal2bit(b));
	}
}
Beispiel #2
0
void ppu2c0x_rgb_device::init_palette()
{
	/* Loop through the emphasis modes (8 total) */
	int entry = 0;
	for (int color_emphasis = 0; color_emphasis < 8; color_emphasis++)
	{
		for (int color_num = 0; color_num < 64; color_num++)
			{
				int R = ((color_emphasis & 1) ? 7 : m_palette_data[color_num * 3]);
				int G = ((color_emphasis & 2) ? 7 : m_palette_data[color_num * 3 + 1]);
				int B = ((color_emphasis & 4) ? 7 : m_palette_data[color_num * 3 + 2]);

				set_pen_color(entry++, pal3bit(R), pal3bit(G), pal3bit(B));
			}
	}

	/* color tables are modified at run-time, and are initialized on 'ppu2c0x_reset' */
}
Beispiel #3
0
PALETTE_INIT_MEMBER(huc6260_device, huc6260)
{
	int i;

	for ( i = 0; i < 512; i++ )
	{
		int r = pal3bit( ( i >> 3 ) & 7 );
		int g = pal3bit( ( i >> 6 ) & 7 );
		int b = pal3bit( ( i      ) & 7 );
		int y = ( ( 66 * r + 129 * g + 25 * b + 128 ) >> 8 ) + 16;

		palette.set_pen_color( i, r, g, b );
		palette.set_pen_color( 512 + i, y, y, y );
	}
}