示例#1
0
PALETTE_INIT_MEMBER(galaxold_state,mariner)
{
	int base = BACKGROUND_COLOR_BASE;
	int i;


	PALETTE_INIT_CALL_MEMBER(galaxold);


	/* set up background colors */

	/* 16 shades of blue - the 4 bits are connected to the following resistors:

	    bit 0 -- 4.7 kohm resistor
	          -- 2.2 kohm resistor
	          -- 1   kohm resistor
	    bit 0 -- .47 kohm resistor */

	for (i = 0; i < 16; i++)
	{
		int r,g,b;

		r = 0;
		g = 0;
		b = 0x0e * BIT(i,0) + 0x1f * BIT(i,1) + 0x43 * BIT(i,2) + 0x8f * BIT(i,3);

		palette_set_color_rgb(machine(),base+i,r,g,b);
	}
}
示例#2
0
PALETTE_INIT_MEMBER(galaxold_state,minefld)
{
	int base = BACKGROUND_COLOR_BASE;
	int i;


	PALETTE_INIT_CALL_MEMBER(galaxold);


	/* set up background colors */

	/* graduated blue */

	for (i = 0; i < 128; i++)
	{
		int r = 0;
		int g = i;
		int b = i * 2;
		palette_set_color_rgb(machine(),base+i,r,g,b);
	}

	/* graduated brown */

	for (i = 0; i < 128; i++)
	{
		int r = i * 1.5;
		int g = i * 0.75;
		int b = i / 2;
		palette_set_color_rgb(machine(),base+128+i,r,g,b);
	}
}
示例#3
0
PALETTE_INIT_MEMBER(galaxold_state,scrambold)
{
	PALETTE_INIT_CALL_MEMBER(galaxold);


	/* blue background - 390 ohm resistor */
	palette_set_color(machine(),BACKGROUND_COLOR_BASE,MAKE_RGB(0,0,0x56));
}
示例#4
0
文件: cave.c 项目: Ilgrim/MAMEHub
PALETTE_INIT_MEMBER(cave_state,korokoro)
{
	int color, pen;

	PALETTE_INIT_CALL_MEMBER(cave);

	for (color = 0; color < 0x40; color++)
		for (pen = 0; pen < 0x10; pen++)
			m_palette_map[(color << 8) | pen] = 0x3c00 | (color << 4) | pen;
}
示例#5
0
文件: cave.c 项目: Ilgrim/MAMEHub
PALETTE_INIT_MEMBER(cave_state,pwrinst2)
{
	int color, pen;

	PALETTE_INIT_CALL_MEMBER(cave);

	for (color = 0; color < 0x80; color++)
		for (pen = 0; pen < 0x10; pen++)
			m_palette_map[(color << 8) | pen] = (color << 4) | pen;

	for (pen = 0x8000; pen < 0xa800; pen++)
			m_palette_map[pen] = pen - 0x8000;
}
示例#6
0
文件: cave.c 项目: Ilgrim/MAMEHub
PALETTE_INIT_MEMBER(cave_state,dfeveron)
{
	int color, pen;

	/* Fill the 0-3fff range, used by sprites ($40 color codes * $100 pens)
	   Here sprites have 16 pens, but the sprite drawing routine always
	   multiplies the color code by $100 (for consistency).
	   That's why we need this function.    */

	PALETTE_INIT_CALL_MEMBER(cave);

	for (color = 0; color < 0x40; color++)
		for (pen = 0; pen < 0x10; pen++)
			m_palette_map[(color << 8) | pen] = (color << 4) | pen;
}
示例#7
0
文件: cave.c 项目: Ilgrim/MAMEHub
PALETTE_INIT_MEMBER(cave_state,ddonpach)
{
	int color, pen;

	/* Fill the 8000-83ff range ($40 color codes * $10 pens) for
	   layers 0 & 1 which are 4 bits deep rather than 8 bits deep
	   like layer 2, but use the first 16 color of every 256 for
	   any given color code. */

	PALETTE_INIT_CALL_MEMBER(cave);

	for (color = 0; color < 0x40; color++)
		for (pen = 0; pen < 0x10; pen++)
			m_palette_map[0x8000 | (color << 4) | pen] = 0x4000 | (color << 8) | pen;
}
示例#8
0
文件: cave.c 项目: Ilgrim/MAMEHub
PALETTE_INIT_MEMBER(cave_state,sailormn)
{
	int color, pen;

	PALETTE_INIT_CALL_MEMBER(cave);

	/* sprites (encrypted) are 4 bit deep */
	for (color = 0; color < 0x40; color++)
		for (pen = 0; pen < 0x100; pen++)
			m_palette_map[(color << 8) | pen] = (color << 4) + pen; /* yes, PLUS, not OR */

	/* layer 2 is 6 bit deep, there are 64 color codes but only $400
	   colors are actually addressable */
	for (color = 0; color < 0x40; color++)
		for (pen = 0; pen < 0x40; pen++)
			m_palette_map[0x4c00 | (color << 6) | pen] = 0xc00 | ((color & 0x0f) << 6) | pen;
}
示例#9
0
文件: apple2gs.c 项目: Ilgrim/MAMEHub
INPUT_PORTS_END



/* Initialize the palette */
PALETTE_INIT_MEMBER(apple2gs_state,apple2gs)
{
	int i;

	PALETTE_INIT_CALL_MEMBER(apple2);

	for (i = 0; i < 16; i++)
	{
		palette_set_color_rgb(machine(), i,
			apple2gs_palette[(3*i)]*17,
			apple2gs_palette[(3*i)+1]*17,
			apple2gs_palette[(3*i)+2]*17);
	}
}
示例#10
0
PALETTE_INIT_MEMBER(galaxold_state,turtles)
{
	int base = BACKGROUND_COLOR_BASE;
	int i;


	PALETTE_INIT_CALL_MEMBER(galaxold);


	/*  The background color generator is connected this way:

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

	for (i = 0; i < 8; i++)
	{
		int r = BIT(i,0) * 0x55;
		int g = BIT(i,1) * 0x47;
		int b = BIT(i,2) * 0x55;

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