diff options
Diffstat (limited to 'src/mame/drivers/scramble.cpp')
-rw-r--r-- | src/mame/drivers/scramble.cpp | 63 |
1 files changed, 25 insertions, 38 deletions
diff --git a/src/mame/drivers/scramble.cpp b/src/mame/drivers/scramble.cpp index 353c5a3a179..ef27e13b754 100644 --- a/src/mame/drivers/scramble.cpp +++ b/src/mame/drivers/scramble.cpp @@ -1346,10 +1346,9 @@ MACHINE_CONFIG_START(scramble_state::scramble) MCFG_SCREEN_UPDATE_DRIVER(scramble_state, screen_update_galaxold) MCFG_SCREEN_PALETTE("palette") - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_scramble) - MCFG_PALETTE_ADD("palette", 32+64+2+1) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ + GFXDECODE(config, "gfxdecode", m_palette, gfx_scramble); + PALETTE(config, m_palette, FUNC(scramble_state::scrambold_palette), 32+64+2+1); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background - MCFG_PALETTE_INIT_OWNER(scramble_state,scrambold) MCFG_VIDEO_START_OVERRIDE(scramble_state,scrambold) /* sound hardware */ @@ -1377,9 +1376,8 @@ MACHINE_CONFIG_START(scramble_state::mars) m_ppi8255_1->in_pc_callback().set_ioport("IN3"); /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MACHINE_CONFIG_END MACHINE_CONFIG_START(scramble_state::devilfsh) @@ -1391,9 +1389,8 @@ MACHINE_CONFIG_START(scramble_state::devilfsh) /* video hardware */ MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_devilfsh) - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MACHINE_CONFIG_END MACHINE_CONFIG_START(scramble_state::newsin7) @@ -1406,9 +1403,8 @@ MACHINE_CONFIG_START(scramble_state::newsin7) /* video hardware */ MCFG_GFXDECODE_MODIFY("gfxdecode", gfx_newsin7) - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MCFG_VIDEO_START_OVERRIDE(scramble_state,newsin7) MACHINE_CONFIG_END @@ -1424,9 +1420,8 @@ MACHINE_CONFIG_START(scramble_state::mrkougb) m_ppi8255_1->in_pc_callback().set_constant(0); /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MACHINE_CONFIG_END MACHINE_CONFIG_START(scramble_state::mrkougar) @@ -1444,9 +1439,8 @@ MACHINE_CONFIG_START(scramble_state::ckongs) MCFG_DEVICE_PROGRAM_MAP(ckongs_map) /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MCFG_VIDEO_START_OVERRIDE(scramble_state,ckongs) MACHINE_CONFIG_END @@ -1466,9 +1460,8 @@ MACHINE_CONFIG_START(scramble_state::hotshock) MCFG_MACHINE_RESET_OVERRIDE(scramble_state,galaxold) /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MCFG_VIDEO_START_OVERRIDE(scramble_state,pisces) subdevice<ay8910_device>("8910.1")->reset_routes(); @@ -1485,9 +1478,8 @@ MACHINE_CONFIG_START(scramble_state::cavelon) /* basic machine hardware */ /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets, 0/1 for background */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets, 0/1 for background + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MCFG_VIDEO_START_OVERRIDE(scramble_state,ckongs) MACHINE_CONFIG_END @@ -1516,9 +1508,8 @@ MACHINE_CONFIG_START(scramble_state::triplep) MCFG_DEVICE_REMOVE("konami_7474") /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets */ - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); /* sound hardware */ MCFG_DEVICE_MODIFY("8910.1") @@ -1537,10 +1528,9 @@ MACHINE_CONFIG_START(scramble_state::mariner) /* basic machine hardware */ /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+16) /* 32 for characters, 64 for stars, 2 for bullets, 16 for background */ + m_palette->set_entries(32+64+2+16); // 32 for characters, 64 for stars, 2 for bullets, 16 for background + m_palette->set_init(FUNC(scramble_state::mariner_palette)); - MCFG_PALETTE_INIT_OWNER(scramble_state,mariner) MCFG_VIDEO_START_OVERRIDE(scramble_state,mariner) MACHINE_CONFIG_END @@ -1559,10 +1549,8 @@ MACHINE_CONFIG_START(scramble_state::hunchbks) MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* video hardware */ - MCFG_PALETTE_MODIFY("palette") - MCFG_PALETTE_ENTRIES(32+64+2+0) /* 32 for characters, 64 for stars, 2 for bullets */ - - MCFG_PALETTE_INIT_OWNER(scramble_state,galaxold) + m_palette->set_entries(32+64+2+0); // 32 for characters, 64 for stars, 2 for bullets + m_palette->set_init(FUNC(scramble_state::galaxold_palette)); MACHINE_CONFIG_END MACHINE_CONFIG_START(scramble_state::hncholms) @@ -1602,12 +1590,11 @@ MACHINE_CONFIG_START(scramble_state::ad2083) MCFG_SCREEN_SIZE(32*8, 32*8) MCFG_SCREEN_VISIBLE_AREA(0*8, 32*8-1, 2*8, 30*8-1) MCFG_SCREEN_UPDATE_DRIVER(scramble_state, screen_update_galaxold) - MCFG_SCREEN_PALETTE("palette") + MCFG_SCREEN_PALETTE(m_palette) - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ad2083) - MCFG_PALETTE_ADD("palette", 32+64+2+8) /* 32 for characters, 64 for stars, 2 for bullets, 8 for background */ + GFXDECODE(config, "gfxdecode", m_palette, gfx_ad2083); + PALETTE(config, m_palette, FUNC(scramble_state::turtles_palette), 32+64+2+8); // 32 for characters, 64 for stars, 2 for bullets, 8 for background - MCFG_PALETTE_INIT_OWNER(scramble_state,turtles) MCFG_VIDEO_START_OVERRIDE(scramble_state,ad2083) /* sound hardware */ |