8080bw: use an explicit monochrome palette

This commit is contained in:
Dirk Best 2015-07-30 20:51:31 +02:00
parent fa32ced4ce
commit 83626b8c4a
2 changed files with 7 additions and 3 deletions

View File

@ -788,6 +788,8 @@ MACHINE_CONFIG_START( spacecom, _8080bw_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 28*8-1)
MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_spacecom)
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(invaders_audio)
MACHINE_CONFIG_END
@ -2528,6 +2530,8 @@ MACHINE_CONFIG_START( shuttlei, _8080bw_state )
MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 0*8, 24*8-1)
MCFG_SCREEN_UPDATE_DRIVER(_8080bw_state, screen_update_shuttlei)
MCFG_PALETTE_ADD_BLACK_AND_WHITE("palette")
/* sound hardware */
MCFG_FRAGMENT_ADD(invaders_samples_audio)
MACHINE_CONFIG_END

View File

@ -379,9 +379,9 @@ UINT32 _8080bw_state::screen_update_shuttlei(screen_device &screen, bitmap_rgb32
for (int i = 0; i < 8; i++)
{
if (m_flip_screen)
bitmap.pix32(191-y, 255-(x|i)) = BIT(data, 7) ? rgb_t::white : rgb_t::black;
bitmap.pix32(191-y, 255-(x|i)) = m_palette->pen_color(BIT(data, 7));
else
bitmap.pix32(y, x|i) = BIT(data, 7) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x|i) = m_palette->pen_color(BIT(data, 7));
data <<= 1;
}
}
@ -402,7 +402,7 @@ UINT32 _8080bw_state::screen_update_spacecom(screen_device &screen, bitmap_rgb32
for (int i = 0; i < 8; i++)
{
bitmap.pix32(y, x | (i^flipx)) = BIT(data, 0) ? rgb_t::white : rgb_t::black;
bitmap.pix32(y, x | (i^flipx)) = m_palette->pen_color(BIT(data, 0));
data >>= 1;
}
}