(MESS) wangpc: Fixed palette regression. (nw)

This commit is contained in:
Curt Coder 2014-03-11 06:22:36 +00:00
parent c86b56168c
commit afa6dbee84
3 changed files with 20 additions and 6 deletions

View File

@ -138,10 +138,12 @@ static MACHINE_CONFIG_FRAGMENT( wangpc_tig )
MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500))
MCFG_SCREEN_REFRESH_RATE(60)
MCFG_PALETTE_ADD("palette", 3)
MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT("palette")
MCFG_UPD7220_ADD(UPD7720_0_TAG, XTAL_52_832MHz/28, hgdc0_intf, upd7220_0_map) // was /10?
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MCFG_UPD7220_ADD(UPD7720_1_TAG, XTAL_52_832MHz/28, hgdc1_intf, upd7220_1_map) // was /16?
MCFG_VIDEO_SET_SCREEN(SCREEN_TAG)
MACHINE_CONFIG_END
@ -181,11 +183,6 @@ wangpc_tig_device::wangpc_tig_device(const machine_config &mconfig, const char *
void wangpc_tig_device::device_start()
{
// initialize palette
m_palette->set_pen_color(0, 0, 0, 0);
m_palette->set_pen_color(1, 0, 0x80, 0);
m_palette->set_pen_color(2, 0, 0xff, 0);
// state saving
save_item(NAME(m_option));
save_item(NAME(m_attr));

View File

@ -760,6 +760,18 @@ void palette_device::palette_init_monochrome_green(palette_device &palette)
}
/*-------------------------------------------------
palette_init_monochrome_green_highlight - 3-color black & green
-------------------------------------------------*/
void palette_device::palette_init_monochrome_green_highlight(palette_device &palette)
{
palette.set_pen_color(0, rgb_t::black); // black
palette.set_pen_color(1, rgb_t(0x00, 0x80, 0x00)); // green
palette.set_pen_color(2, rgb_t(0x00, 0xff, 0x00)); // green
}
/*-------------------------------------------------
RRRR_GGGG_BBBB - standard 4-4-4 palette,
assuming the commonly used resistor values:

View File

@ -209,6 +209,10 @@
MCFG_PALETTE_ADD(_tag, 2) \
palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_green), downcast<palette_device *>(device)));
#define MCFG_PALETTE_ADD_MONOCHROME_GREEN_HIGHLIGHT(_tag) \
MCFG_PALETTE_ADD(_tag, 3) \
palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_monochrome_green_highlight), downcast<palette_device *>(device)));
#define MCFG_PALETTE_ADD_RRRRRGGGGGBBBBB(_tag) \
MCFG_PALETTE_ADD(_tag, 32768) \
palette_device::static_set_init(*device, palette_init_delegate(FUNC(palette_device::palette_init_RRRRRGGGGGBBBBB), downcast<palette_device *>(device)));
@ -372,6 +376,7 @@ public:
void palette_init_white_and_black(palette_device &palette);
void palette_init_monochrome_amber(palette_device &palette);
void palette_init_monochrome_green(palette_device &palette);
void palette_init_monochrome_green_highlight(palette_device &palette);
void palette_init_RRRRGGGGBBBB_proms(palette_device &palette);
void palette_init_RRRRRGGGGGBBBBB(palette_device &palette);
void palette_init_BBBBBGGGGGRRRRR(palette_device &palette);