cps1.cpp : Move palette init into machine_config

This commit is contained in:
cam900 2019-07-11 19:39:30 +09:00
parent 12eb294124
commit 3b8f4000e7
4 changed files with 15 additions and 18 deletions

View File

@ -3404,7 +3404,7 @@ void cps_state::cps1_10MHz(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -1322,7 +1322,7 @@ void cps2_state::cps2(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "lspeaker").front_left();

View File

@ -654,7 +654,7 @@ void cps_state::fcrash_build_palette()
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
m_palette->set_pen_color (offset, rgb_t(r, g, b));
m_palette->set_pen_color(offset, rgb_t(r, g, b));
}
}
@ -1741,7 +1741,7 @@ void cps_state::fcrash(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(4096);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(4096);
// sound hardware
SPEAKER(config, "mono").front_center();
@ -1804,7 +1804,7 @@ void cps_state::kodb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -1845,7 +1845,7 @@ void cps_state::mtwinsb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -1886,7 +1886,7 @@ void cps_state::sf2mdt(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(4096);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(4096);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -1937,7 +1937,7 @@ void cps_state::knightsb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -2319,7 +2319,7 @@ void cps_state::dinopic(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -2506,7 +2506,7 @@ void cps_state::sgyxz(machine_config &config)
m_screen->screen_vblank().set(FUNC(cps_state::screen_vblank_cps1));
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
EEPROM_93C46_8BIT(config, "eeprom");
@ -2631,7 +2631,7 @@ void cps_state::punipic(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -2819,7 +2819,7 @@ void cps_state::sf2m1(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -3198,7 +3198,7 @@ void cps_state::slampic(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();
@ -3296,7 +3296,7 @@ void cps_state::varthb(machine_config &config)
m_screen->set_palette(m_palette);
GFXDECODE(config, m_gfxdecode, m_palette, gfx_cps1);
PALETTE(config, m_palette).set_entries(0xc00);
PALETTE(config, m_palette, palette_device::BLACK).set_entries(0xc00);
/* sound hardware */
SPEAKER(config, "mono").front_center();

View File

@ -2279,9 +2279,6 @@ void cps_state::video_start()
/* front masks will change at runtime to handle sprite occluding */
cps1_update_transmasks();
for (i = 0; i < cps1_palette_entries * 16; i++)
m_palette->set_pen_color(i, rgb_t(0,0,0));
m_buffered_obj = make_unique_clear<uint16_t[]>(m_obj_size / 2);
/* clear RAM regions */
@ -2387,7 +2384,7 @@ void cps_state::cps1_build_palette( const uint16_t* const palette_base )
g = ((palette >> 4) & 0x0f) * 0x11 * bright / 0x2d;
b = ((palette >> 0) & 0x0f) * 0x11 * bright / 0x2d;
m_palette->set_pen_color (0x200 * page + offset, rgb_t(r, g, b));
m_palette->set_pen_color(0x200 * page + offset, rgb_t(r, g, b));
}
}
else