예제 #1
0
파일: subs.cpp 프로젝트: SailorSat/cabmame
void subs_state::subs_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t(0x00, 0x00, 0x00)); // BLACK - modified on video invert
	palette.set_pen_color(1, rgb_t(0xff, 0xff, 0xff)); // WHITE - modified on video invert
	palette.set_pen_color(2, rgb_t(0x00, 0x00, 0x00)); // BLACK - modified on video invert
	palette.set_pen_color(3, rgb_t(0xff, 0xff, 0xff)); // WHITE - modified on video invert
}
예제 #2
0
파일: canyon.cpp 프로젝트: PugsyMAME/mame
void canyon_state::canyon_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t(0x80, 0x80, 0x80)); // GREY
	palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); // BLACK
	palette.set_pen_color(2, rgb_t(0x80, 0x80, 0x80)); // GREY
	palette.set_pen_color(3, rgb_t(0xff, 0xff, 0xff)); // WHITE
}
예제 #3
0
파일: p2000t.cpp 프로젝트: PugsyMAME/mame
void p2000m_state::p2000m_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t::white()); // white
	palette.set_pen_color(1, rgb_t::black()); // black
	palette.set_pen_color(2, rgb_t::black()); // black
	palette.set_pen_color(3, rgb_t::white()); // white
}
예제 #4
0
파일: gamecom.cpp 프로젝트: k2-git/mame
	INPUT_PORTS_END

void gamecom_state::gamecom_palette(palette_device &palette) const
{
	palette.set_pen_color(0, 0x00, 0x00, 0x00); // Black
	palette.set_pen_color(1, 0x0f, 0x4f, 0x2f); // Gray 1
	palette.set_pen_color(2, 0x6f, 0x8f, 0x4f); // Gray 2
	palette.set_pen_color(3, 0x8f, 0xcf, 0x8f); // Grey 3
	palette.set_pen_color(4, 0xdf, 0xff, 0x8f); // White
}
예제 #5
0
파일: lazercmd.cpp 프로젝트: k2-git/mame
GFXDECODE_END

void lazercmd_state::lazercmd_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t(0xb0, 0xb0, 0xb0)); // white
	palette.set_pen_color(1, rgb_t(0x00, 0x00, 0x00)); // black

	palette.set_pen_color(2, rgb_t(0x00, 0x00, 0x00)); // black
	palette.set_pen_color(3, rgb_t(0xb0, 0xb0, 0xb0)); // white

	palette.set_pen_color(4, rgb_t(0xff, 0xff, 0xff)); // bright white
}
예제 #6
0
파일: cz101.cpp 프로젝트: PugsyMAME/mame
INPUT_PORTS_END


//**************************************************************************
//  MACHINE EMULATION
//**************************************************************************

void cz101_state::cz101_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t(138, 146, 148)); // background
	palette.set_pen_color(1, rgb_t( 92,  83,  88)); // lcd pixel on
	palette.set_pen_color(2, rgb_t(131, 136, 139)); // lcd pixel off
}
예제 #7
0
void alphatro_state::alphatro_palette(palette_device &palette) const
{
	// RGB colours
	palette.set_pen_color(0, 0x00, 0x00, 0x00);
	palette.set_pen_color(1, 0x00, 0x00, 0xff);
	palette.set_pen_color(2, 0xff, 0x00, 0x00);
	palette.set_pen_color(3, 0xff, 0x00, 0xff);
	palette.set_pen_color(4, 0x00, 0xff, 0x00);
	palette.set_pen_color(5, 0x00, 0xff, 0xff);
	palette.set_pen_color(6, 0xff, 0xff, 0x00);
	palette.set_pen_color(7, 0xff, 0xff, 0xff);
	// Amber
	palette.set_pen_color(8, 0xf7, 0xaa, 0x00);
}
예제 #8
0
파일: progolf.cpp 프로젝트: PugsyMAME/mame
/* verified from M6502 code */
static INPUT_PORTS_START( progolf )
	PORT_START("IN0")
	PORT_BIT( 0x7f, IP_ACTIVE_HIGH, IPT_UNUSED )
	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_CUSTOM ) PORT_VBLANK("screen")

	PORT_START("P1")
	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )
	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT )
	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )
	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )
	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )
	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START1 )

	PORT_START("P2")
	PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_JOYSTICK_RIGHT ) PORT_COCKTAIL
	PORT_BIT( 0x02, IP_ACTIVE_HIGH, IPT_JOYSTICK_LEFT )  PORT_COCKTAIL
	PORT_BIT( 0x04, IP_ACTIVE_HIGH, IPT_JOYSTICK_DOWN )  PORT_COCKTAIL
	PORT_BIT( 0x08, IP_ACTIVE_HIGH, IPT_JOYSTICK_UP )    PORT_COCKTAIL
	PORT_BIT( 0x10, IP_ACTIVE_HIGH, IPT_BUTTON1 )        PORT_COCKTAIL
	PORT_BIT( 0x20, IP_ACTIVE_HIGH, IPT_UNUSED )
	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_UNUSED )
	PORT_BIT( 0x80, IP_ACTIVE_HIGH, IPT_START2 )

	PORT_START("IN2")
	PORT_BIT( 0x3f, IP_ACTIVE_HIGH, IPT_UNUSED )
	PORT_BIT( 0x40, IP_ACTIVE_LOW,IPT_COIN1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)
	PORT_BIT( 0x80, IP_ACTIVE_LOW,IPT_COIN2 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)

	PORT_START("DSW1")
	PORT_DIPNAME( 0x03, 0x00, DEF_STR( Coin_B ) )
	PORT_DIPSETTING(    0x03, DEF_STR( 2C_1C ) )
	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
	PORT_DIPSETTING(    0x01, DEF_STR( 1C_2C ) )
	PORT_DIPSETTING(    0x02, DEF_STR( 1C_3C ) )  PORT_CONDITION("DSW2",0x40,EQUALS,0x00)
	PORT_DIPSETTING(    0x02, DEF_STR( 1C_6C ) )  PORT_CONDITION("DSW2",0x40,EQUALS,0x40)
	PORT_DIPNAME( 0x0c, 0x00, DEF_STR( Coin_A ) )
	PORT_DIPSETTING(    0x0c, DEF_STR( 2C_1C ) )
	PORT_DIPSETTING(    0x00, DEF_STR( 1C_1C ) )
	PORT_DIPSETTING(    0x04, DEF_STR( 1C_2C ) )
	PORT_DIPSETTING(    0x08, DEF_STR( 1C_3C ) )  PORT_CONDITION("DSW2",0x40,EQUALS,0x00)
	PORT_DIPSETTING(    0x08, DEF_STR( 1C_6C ) )  PORT_CONDITION("DSW2",0x40,EQUALS,0x40)
	PORT_DIPNAME( 0x10, 0x10, DEF_STR( Cabinet ) )
	PORT_DIPSETTING(    0x10, DEF_STR( Upright ) )
	PORT_DIPSETTING(    0x00, DEF_STR( Cocktail ) )
	PORT_DIPUNUSED( 0x20, IP_ACTIVE_HIGH )
	PORT_BIT( 0x40, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, progolf_state,coin_inserted, 0)    /* same coinage as COIN1 */
	PORT_SERVICE( 0x80, IP_ACTIVE_HIGH )

	PORT_START("DSW2")
	PORT_DIPNAME( 0x01, 0x00, DEF_STR( Lives ) )
	PORT_DIPSETTING(    0x00, "1" )
	PORT_DIPSETTING(    0x01, "2" )
	PORT_DIPNAME( 0x06, 0x00, DEF_STR( Bonus_Life ) )       /* table at 0xd16e (4 * 3 bytes, LSB first) - no multiple bonus lives */
	PORT_DIPSETTING(    0x00, "10000" )
	PORT_DIPSETTING(    0x02, "30000" )
	PORT_DIPSETTING(    0x04, "50000" )
	PORT_DIPSETTING(    0x06, DEF_STR( None ) )
	PORT_DIPNAME( 0x08, 0x00, DEF_STR( Difficulty ) )       /* code at 0xd188 */
	PORT_DIPSETTING(    0x00, DEF_STR( Easy ) )
	PORT_DIPSETTING(    0x08, DEF_STR( Hard ) )
	PORT_DIPNAME( 0x10, 0x00, "Display Strength and Position" )
	PORT_DIPSETTING(    0x10, DEF_STR( No ) )
	PORT_DIPSETTING(    0x00, DEF_STR( Yes ) )
	PORT_DIPNAME( 0x20, 0x00, "Force Coinage = A 1C/3C - B 1C/8C" )   /* SERVICE1 = 2C/1C */
	PORT_DIPSETTING(    0x00, DEF_STR( No ) )
	PORT_DIPSETTING(    0x20, DEF_STR( Yes ) )
	PORT_DIPNAME( 0x40, 0x00, "Coin Mode" )
	PORT_DIPSETTING(    0x00, "Mode 1" )
	PORT_DIPSETTING(    0x40, "Mode 2" )
	PORT_DIPUNUSED( 0x80, IP_ACTIVE_HIGH )
INPUT_PORTS_END

static const gfx_layout charlayout =
{
	8,8,            /* 8*8 characters */
	RGN_FRAC(1,3),  /* 512 characters */
	3,              /* 3 bits per pixel */
	{ RGN_FRAC(2,3), RGN_FRAC(1,3), RGN_FRAC(0,3) },  /* the bitplanes are separated */
	{ 0, 1, 2, 3, 4, 5, 6, 7 },
	{ 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8, 7*8 },
	8*8     /* every char takes 8 consecutive bytes */
};

static GFXDECODE_START( gfx_progolf )
	GFXDECODE_ENTRY( "gfx1", 0x0000, charlayout, 0, 8 ) /* sprites */
GFXDECODE_END


void progolf_state::progolf_palette(palette_device &palette) const
{
	const uint8_t *color_prom = memregion("proms")->base();

	for (int i = 0; i < palette.entries(); i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		int const 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);
		int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
		// blue component
		bit0 = 0;
		bit1 = BIT(color_prom[i], 6);
		bit2 = BIT(color_prom[i], 7);
		int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #9
0
파일: olibochu.cpp 프로젝트: k2-git/mame
void olibochu_state::olibochu_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();

	for (int i = 0; i < palette.entries(); i++)
	{
		int bit0, bit1, bit2;

		uint8_t const pen = (color_prom[0x20 + i] & 0x0f) | ((i < 0x100) ? 0x10 : 0x00);

		// red component
		bit0 = BIT(color_prom[pen], 0);
		bit1 = BIT(color_prom[pen], 1);
		bit2 = BIT(color_prom[pen], 2);
		int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// green component
		bit0 = BIT(color_prom[pen], 3);
		bit1 = BIT(color_prom[pen], 4);
		bit2 = BIT(color_prom[pen], 5);
		int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// blue component
		bit0 = BIT(color_prom[pen], 6);
		bit1 = BIT(color_prom[pen], 7);
		int const b = 0x4f * bit0 + 0xa8 * bit1;

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #10
0
파일: lgp.cpp 프로젝트: SailorSat/cabmame
void lgp_state::lgp_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();
	for (int i = 0; i < 0x20; i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = 0; //BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 0);
		bit2 = BIT(color_prom[i], 1);
		int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// green component
		bit0 = 0; //BIT(color_prom[i], 3);
		bit1 = BIT(color_prom[i], 2);
		bit2 = BIT(color_prom[i], 3);
		int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// blue component
		bit0 = 0; //BIT(color_prom[i], 5);
		bit1 = BIT(color_prom[i], 4);
		bit2 = BIT(color_prom[i], 5);
		int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		palette.set_pen_color(i,rgb_t(r,g,b));
	}
}
예제 #11
0
void mogura_state::mogura_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();
	for (int i = 0, j = 0; i < 0x20; i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		int const 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);
		int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
		// blue component
		bit0 = 0;
		bit1 = BIT(color_prom[i], 6);
		bit2 = BIT(color_prom[i], 7);
		int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		palette.set_pen_color(j, rgb_t(r, g, b));
		j += 4;
		if (j > 31)
			j -= 31;
	}
}
예제 #12
0
void funkybee_state::funkybee_palette(palette_device &palette) const
{
	const uint8_t *color_prom = memregion("proms")->base();

	// first, the character/sprite palette
	for (int i = 0; i < 32; i++)
	{
		int bit0, bit1, bit2;

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

		palette.set_pen_color(i, rgb_t(r, g, b));
		color_prom++;
	}
}
예제 #13
0
void docastle_state::docastle_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();

	for (int i = 0; i < 256; i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = BIT(color_prom[i], 5);
		bit1 = BIT(color_prom[i], 6);
		bit2 = BIT(color_prom[i], 7);
		int const r = 0x23 * bit0 + 0x4b * bit1 + 0x91 * bit2;

		// green component
		bit0 = BIT(color_prom[i], 2);
		bit1 = BIT(color_prom[i], 3);
		bit2 = BIT(color_prom[i], 4);
		int const g = 0x23 * bit0 + 0x4b * bit1 + 0x91 * bit2;

		// blue component
		bit0 = 0;
		bit1 = BIT(color_prom[i], 0);
		bit2 = BIT(color_prom[i], 1);
		int const b = 0x23 * bit0 + 0x4b * bit1 + 0x91 * bit2;

		/* because the graphics are decoded as 4bpp with the top bit used for transparency
		   or priority, we create matching 3bpp sets of palette entries, which effectively
		   ignores the value of the top bit */
		palette.set_pen_color(((i & 0xf8) << 1) | 0x00 | (i & 0x07), rgb_t(r, g, b));
		palette.set_pen_color(((i & 0xf8) << 1) | 0x08 | (i & 0x07), rgb_t(r, g, b));
	}
}
예제 #14
0
파일: yiear.cpp 프로젝트: SailorSat/cabmame
void yiear_state::yiear_palette(palette_device &palette) const
{
	uint8_t const *color_prom = memregion("proms")->base();

	for (int i = 0; i < palette.entries(); i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = BIT(*color_prom, 0);
		bit1 = BIT(*color_prom, 1);
		bit2 = BIT(*color_prom, 2);
		int const r = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// green component
		bit0 = BIT(*color_prom, 3);
		bit1 = BIT(*color_prom, 4);
		bit2 = BIT(*color_prom, 5);
		int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// blue component
		bit0 = 0;
		bit1 = BIT(*color_prom, 6);
		bit2 = BIT(*color_prom, 7);
		int const b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		palette.set_pen_color(i, rgb_t(r,g,b));
		color_prom++;
	}
}
예제 #15
0
void ettrivia_state::ettrivia_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();
	static constexpr int resistances[2] = { 270, 130 };

	// compute the color output resistor weights
	double weights[2];
	compute_resistor_weights(0, 255, -1.0,
			2, resistances, weights, 0, 0,
			2, resistances, weights, 0, 0,
			0, nullptr, nullptr, 0, 0);

	for (int i = 0; i < palette.entries(); i++)
	{
		int bit0, bit1;

		// red component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i+0x100], 0);
		int const r = combine_weights(weights, bit0, bit1);

		// green component
		bit0 = BIT(color_prom[i], 2);
		bit1 = BIT(color_prom[i+0x100], 2);
		int const g = combine_weights(weights, bit0, bit1);

		// blue component
		bit0 = BIT(color_prom[i], 1);
		bit1 = BIT(color_prom[i+0x100], 1);
		int const b = combine_weights(weights, bit0, bit1);

		palette.set_pen_color(bitswap<8>(i,5,7,6,2,1,0,4,3), rgb_t(r, g, b));
	}
}
예제 #16
0
void timeplt_state::timeplt_palette(palette_device &palette) const
{
	const uint8_t *color_prom = memregion("proms")->base();

	rgb_t palette_val[32];
	for (int i = 0; i < 32; i++)
	{
		int bit0, bit1, bit2, bit3, bit4;

		bit0 = BIT(color_prom[i + 1 * 32], 1);
		bit1 = BIT(color_prom[i + 1 * 32], 2);
		bit2 = BIT(color_prom[i + 1 * 32], 3);
		bit3 = BIT(color_prom[i + 1 * 32], 4);
		bit4 = BIT(color_prom[i + 1 * 32], 5);
		int const r = 0x19 * bit0 + 0x24 * bit1 + 0x35 * bit2 + 0x40 * bit3 + 0x4d * bit4;
		bit0 = BIT(color_prom[i + 1 * 32], 6);
		bit1 = BIT(color_prom[i + 1 * 32], 7);
		bit2 = BIT(color_prom[i + 0 * 32], 0);
		bit3 = BIT(color_prom[i + 0 * 32], 1);
		bit4 = BIT(color_prom[i + 0 * 32], 2);
		int const g = 0x19 * bit0 + 0x24 * bit1 + 0x35 * bit2 + 0x40 * bit3 + 0x4d * bit4;
		bit0 = BIT(color_prom[i + 0 * 32], 3);
		bit1 = BIT(color_prom[i + 0 * 32], 4);
		bit2 = BIT(color_prom[i + 0 * 32], 5);
		bit3 = BIT(color_prom[i + 0 * 32], 6);
		bit4 = BIT(color_prom[i + 0 * 32], 7);
		int const b = 0x19 * bit0 + 0x24 * bit1 + 0x35 * bit2 + 0x40 * bit3 + 0x4d * bit4;

		palette_val[i] = rgb_t(r, g, b);
	}

	color_prom += 2*32;
	// color_prom now points to the beginning of the lookup table


	// sprites
	for (int i = 0; i < 64 * 4; i++)
		palette.set_pen_color(32 * 4 + i, palette_val[*color_prom++ & 0x0f]);

	// characters
	for (int i = 0; i < 32 * 4; i++)
		palette.set_pen_color(i, palette_val[(*color_prom++ & 0x0f) + 0x10]);
}
예제 #17
0
파일: gb.cpp 프로젝트: PugsyMAME/mame
void gb_state::gbc_palette(palette_device &palette) const
{
	for (int i = 0; i < 32768; i++)
	{
		int const r = i & 0x1f;
		int const g = (i >> 5) & 0x1f;
		int const b = (i >> 10) & 0x1f;
		palette.set_pen_color(i, pal5bit(r), pal5bit(g), pal5bit(b));
	}
}
예제 #18
0
void clshroad_state::clshroad_palette(palette_device &palette) const
{
	const uint8_t *color_prom = memregion("proms")->base();
	for (int i = 0; i < 256; i++)
	{
		palette.set_pen_color(i,
				pal4bit(color_prom[i | 0x000]),
				pal4bit(color_prom[i | 0x100]),
				pal4bit(color_prom[i | 0x200]));
	}
}
예제 #19
0
파일: mrgame.cpp 프로젝트: PugsyMAME/mame
GFXDECODE_END

void mrgame_state::mrgame_palette(palette_device &palette) const
{
	static constexpr int resistances[3] = { 1000, 470, 220 };
	uint8_t const *const color_prom = machine().root_device().memregion("proms")->base();

	// compute the color output resistor weights
	double rweights[3], gweights[3], bweights[2];
	compute_resistor_weights(0, 255, -1.0,
			3, &resistances[0], rweights, 0, 0,
			3, &resistances[0], gweights, 0, 0,
			2, &resistances[1], bweights, 0, 0);

	// create a lookup table for the palette
	for (uint8_t i = 0; i < 32; i++)
	{
		uint8_t bit0, bit1, bit2;

		// red component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		uint8_t const r = combine_3_weights(rweights, bit0, bit1, bit2);

		// green component
		bit0 = BIT(color_prom[i], 3);
		bit1 = BIT(color_prom[i], 4);
		bit2 = BIT(color_prom[i], 5);
		uint8_t const g = combine_3_weights(gweights, bit0, bit1, bit2);

		// blue component
		bit0 = BIT(color_prom[i], 6);
		bit1 = BIT(color_prom[i], 7);
		uint8_t const b = combine_2_weights(bweights, bit0, bit1);

		palette.set_pen_color(i, rgb_t(r, g, b));
		palette.set_pen_color(i + 32, rgb_t(r, g, b));
	}
}
예제 #20
0
void fortecar_state::fortecar_palette(palette_device &palette) const
{
/* Video resistors...

O1 (LS374) R1K  RED
O2 (LS374) R510 RED
O3 (LS374) R220 RED
O4 (LS374) R1K  GREEN
O5 (LS374) R510 GREEN
O6 (LS374) R220 GREEN
O7 (LS374) R510 BLUE
O8 (LS374) R220 BLUE

R = 82 Ohms Pull Down.
*/
	static constexpr int resistances_rg[3] = { 1000, 510, 220 };
	static constexpr int resistances_b [2] = { 510, 220 };

	double weights_r[3], weights_g[3], weights_b[2];
	compute_resistor_weights(0, 255, -1.0,
			3,  resistances_rg, weights_r,  82, 0,
			3,  resistances_rg, weights_g,  82, 0,
			2,  resistances_b,  weights_b,  82, 0);

	uint8_t const *const color_prom = memregion("proms")->base();
	for (int i = 0; i < 512; i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		int const r = combine_weights(weights_r, bit0, bit1, bit2);

		// green component
		bit0 = BIT(color_prom[i], 3);
		bit1 = BIT(color_prom[i], 4);
		bit2 = BIT(color_prom[i], 5);
		int const g = combine_weights(weights_g, bit0, bit1, bit2);

		// blue component
		bit0 = BIT(color_prom[i], 6);
		bit1 = BIT(color_prom[i], 7);
		int const b = combine_weights(weights_b, bit0, bit1);

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #21
0
파일: a5105.cpp 프로젝트: rfka01/mame
GFXDECODE_END


void a5105_state::a5105_palette(palette_device &palette) const
{
	for (int i = 0; i < 16; i++)
	{
		int const x = (i & 8) ? 0xaa : 0xff;
		int const r = (i & 4) ? x : 0x00;
		int const g = (i & 2) ? x : 0x00;
		int const b = (i & 1) ? x : 0x00;

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #22
0
파일: microvsn.cpp 프로젝트: PugsyMAME/mame
void microvision_state::microvision_palette(palette_device &palette) const
{
	palette.set_pen_color( 15, 0x00, 0x00, 0x00 );
	palette.set_pen_color( 14, 0x11, 0x11, 0x11 );
	palette.set_pen_color( 13, 0x22, 0x22, 0x22 );
	palette.set_pen_color( 12, 0x33, 0x33, 0x33 );
	palette.set_pen_color( 11, 0x44, 0x44, 0x44 );
	palette.set_pen_color( 10, 0x55, 0x55, 0x55 );
	palette.set_pen_color(  9, 0x66, 0x66, 0x66 );
	palette.set_pen_color(  8, 0x77, 0x77, 0x77 );
	palette.set_pen_color(  7, 0x88, 0x88, 0x88 );
	palette.set_pen_color(  6, 0x99, 0x99, 0x99 );
	palette.set_pen_color(  5, 0xaa, 0xaa, 0xaa );
	palette.set_pen_color(  4, 0xbb, 0xbb, 0xbb );
	palette.set_pen_color(  3, 0xcc, 0xcc, 0xcc );
	palette.set_pen_color(  2, 0xdd, 0xdd, 0xdd );
	palette.set_pen_color(  1, 0xee, 0xee, 0xee );
	palette.set_pen_color(  0, 0xff, 0xff, 0xff );
}
예제 #23
0
void tankbust_state::tankbust_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();
	for (int i = 0; i < 128; i++)
	{
		int bit0, bit1, bit2;

		//7 6   5 4 3   2 1 0
		//bb    r r r   g g g - bad (for sure - no green for tank)
		//bb    g g g   r r r - bad (for sure - no yellow, no red)
		//gg    r r r   b b b - bad
		//gg    b b b   r r r - bad
		//rr    b b b   g g g - bad

		//rr    g g g   b b b - very close (green,yellow,red present)

		//rr    r g g   g b b - bad
		//rr    r g g   b b b - bad
		//rr    g g g   b b r - bad

		//rr    g g b   b x x - bad (x: unused)
		//rr    g g x   x b b - bad but still close
		//rr    g g r   g b b - bad but still close
		//rr    g g g   r b b - bad but still close

		// blue component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		int const b = 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);
		int const g = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;

		// red component
		bit0 = BIT(color_prom[i], 6);
		bit1 = BIT(color_prom[i], 7);
		int const r = 0x55 * bit0 + 0xaa * bit1;

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #24
0
void kontest_state::kontest_palette(palette_device &palette) const
{
	const uint8_t *color_prom = memregion("proms")->base();
	for (int i = 0; i < 0x20; ++i)
	{
		int bit0, bit1, bit2;

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

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #25
0
// guess: use the same resistor values as Crazy Climber (needs checking on the real hardware)
void jangou_state::jangou_palette(palette_device &palette) const
{
	uint8_t const *const color_prom = memregion("proms")->base();
	static constexpr int resistances_rg[3] = { 1000, 470, 220 };
	static constexpr int resistances_b [2] = { 470, 220 };

	// compute the color output resistor weights
	double weights_rg[3], weights_b[2];
	compute_resistor_weights(0, 255, -1.0,
			3, resistances_rg, weights_rg, 0, 0,
			2, resistances_b,  weights_b,  0, 0,
			0, nullptr, nullptr, 0, 0);

	for (int i = 0;i < palette.entries(); i++)
	{
		int bit0, bit1, bit2;

		// red component
		bit0 = BIT(color_prom[i], 0);
		bit1 = BIT(color_prom[i], 1);
		bit2 = BIT(color_prom[i], 2);
		int const r = combine_weights(weights_rg, bit0, bit1, bit2);

		// green component
		bit0 = BIT(color_prom[i], 3);
		bit1 = BIT(color_prom[i], 4);
		bit2 = BIT(color_prom[i], 5);
		int const g = combine_weights(weights_rg, bit0, bit1, bit2);

		// blue component
		bit0 = BIT(color_prom[i], 6);
		bit1 = BIT(color_prom[i], 7);
		int const b = combine_weights(weights_b, bit0, bit1);

		palette.set_pen_color(i, rgb_t(r, g, b));
	}
}
예제 #26
0
void mstation_state::mstation_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t(138, 146, 148));
	palette.set_pen_color(1, rgb_t(92, 83, 88));
}
예제 #27
0
파일: spinb.cpp 프로젝트: fesh0r/mame-full
void  spinb_state::spinb_palette(palette_device &palette) const
{
	palette.set_pen_color(0, rgb_t(0x00, 0x00, 0x00));
	palette.set_pen_color(1, rgb_t(0xf7, 0xaa, 0x00));
	palette.set_pen_color(2, rgb_t(0x7c, 0x55, 0x00));
}
예제 #28
0
void lucky74_state::lucky74_palette(palette_device &palette) const
{
	// There are 2 states (see the technical notes).
	// We're constructing a double-sized palette with one half for each state.
	uint8_t const *const color_prom = memregion("proms")->base();
	static constexpr int resistances_rgb[4] = { 2000, 1000, 470, 220 };

	double weights_r[4], weights_g[4], weights_b[4];
	compute_resistor_weights(0, 255,    -1.0,
			4,  resistances_rgb,    weights_r,  1000,   0,
			4,  resistances_rgb,    weights_g,  1000,   0,
			4,  resistances_rgb,    weights_b,  1000,   0);

	for (int i = 0; i < 256; i++)
	{
		int bit0, bit1, bit2, bit3;

		// red component (this 1, PROM E6)
		bit0 = BIT(color_prom[0x000 + i], 0);
		bit1 = BIT(color_prom[0x000 + i], 1);
		bit2 = BIT(color_prom[0x000 + i], 2);
		bit3 = BIT(color_prom[0x000 + i], 3);
		int const r1 = combine_weights(weights_r, bit0, bit1, bit2, bit3);

		// red component (this 2, PROM E7)
		bit0 = BIT(color_prom[0x100 + i], 0);
		bit1 = BIT(color_prom[0x100 + i], 1);
		bit2 = BIT(color_prom[0x100 + i], 2);
		bit3 = BIT(color_prom[0x100 + i], 3);
		int const r2 = combine_weights(weights_r, bit0, bit1, bit2, bit3);

		// green component (this 1, PROM D6)
		bit0 = BIT(color_prom[0x200 + i], 0);
		bit1 = BIT(color_prom[0x200 + i], 1);
		bit2 = BIT(color_prom[0x200 + i], 2);
		bit3 = BIT(color_prom[0x200 + i], 3);
		int const g1 = combine_weights(weights_g, bit0, bit1, bit2, bit3);

		// green component (this 2, PROM D7)
		bit0 = BIT(color_prom[0x300 + i], 0);
		bit1 = BIT(color_prom[0x300 + i], 1);
		bit2 = BIT(color_prom[0x300 + i], 2);
		bit3 = BIT(color_prom[0x300 + i], 3);
		int const g2 = combine_weights(weights_g, bit0, bit1, bit2, bit3);

		// blue component (this 1, PROM C6)
		bit0 = BIT(color_prom[0x400 + i], 0);
		bit1 = BIT(color_prom[0x400 + i], 1);
		bit2 = BIT(color_prom[0x400 + i], 2);
		bit3 = BIT(color_prom[0x400 + i], 3);
		int const b1 = combine_weights(weights_b, bit0, bit1, bit2, bit3);

		// blue component (this 2, PROM C7)
		bit0 = BIT(color_prom[0x500 + i], 0);
		bit1 = BIT(color_prom[0x500 + i], 1);
		bit2 = BIT(color_prom[0x500 + i], 2);
		bit3 = BIT(color_prom[0x500 + i], 3);
		int const b2 = combine_weights(weights_b, bit0, bit1, bit2, bit3);


		// PROMs circuitry, 1st state
		palette.set_pen_color(i, rgb_t(r1, g1, b1));

		// PROMs circuitry, 2nd state
		palette.set_pen_color(i + 256, rgb_t(r2, g2, b2));
	}
}
예제 #29
0
파일: gb.cpp 프로젝트: PugsyMAME/mame
void megaduck_state::megaduck_palette(palette_device &palette) const
{
	for (int i = 0; i < 4; i++)
		palette.set_pen_color(i, palette_megaduck[i]);
}
예제 #30
0
파일: gb.cpp 프로젝트: PugsyMAME/mame
void gb_state::gbp_palette(palette_device &palette) const
{
	for (int i = 0; i < 4; i++)
		palette.set_pen_color(i, palette_gb[i + 4]);
}