diff options
Diffstat (limited to 'src/mame/drivers/ccastles.cpp')
-rw-r--r-- | src/mame/drivers/ccastles.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/mame/drivers/ccastles.cpp b/src/mame/drivers/ccastles.cpp index 99390bc6390..f3d68ab9f04 100644 --- a/src/mame/drivers/ccastles.cpp +++ b/src/mame/drivers/ccastles.cpp @@ -431,8 +431,8 @@ GFXDECODE_END * *************************************/ -MACHINE_CONFIG_START(ccastles_state::ccastles) - +void ccastles_state::ccastles(machine_config &config) +{ /* basic machine hardware */ M6502(config, m_maincpu, MASTER_CLOCK/8); m_maincpu->set_addrmap(AS_PROGRAM, &ccastles_state::main_map); @@ -454,28 +454,28 @@ MACHINE_CONFIG_START(ccastles_state::ccastles) X2212(config, "nvram_4a").set_auto_save(true); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_ccastles) - MCFG_PALETTE_ADD("palette", 32) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_ccastles); + PALETTE(config, m_palette, 32); - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(PIXEL_CLOCK, HTOTAL, 0, HTOTAL - 1, VTOTAL, 0, VTOTAL - 1) /* will be adjusted later */ - MCFG_SCREEN_UPDATE_DRIVER(ccastles_state, screen_update_ccastles) - MCFG_SCREEN_PALETTE("palette") + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(PIXEL_CLOCK, HTOTAL, 0, HTOTAL - 1, VTOTAL, 0, VTOTAL - 1); /* will be adjusted later */ + m_screen->set_screen_update(FUNC(ccastles_state::screen_update_ccastles)); + m_screen->set_palette(m_palette); /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("pokey1", POKEY, MASTER_CLOCK/8) + pokey_device &pokey1(POKEY(config, "pokey1", MASTER_CLOCK/8)); /* NOTE: 1k + 0.2k is not 100% exact, but should not make an audible difference */ - MCFG_POKEY_OUTPUT_OPAMP(RES_K(1) + RES_K(0.2), CAP_U(0.01), 5.0) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) + pokey1.set_output_opamp(RES_K(1) + RES_K(0.2), CAP_U(0.01), 5.0); + pokey1.add_route(ALL_OUTPUTS, "mono", 1.0); - MCFG_DEVICE_ADD("pokey2", POKEY, MASTER_CLOCK/8) + pokey_device &pokey2(POKEY(config, "pokey2", MASTER_CLOCK/8)); /* NOTE: 1k + 0.2k is not 100% exact, but should not make an audible difference */ - MCFG_POKEY_OUTPUT_OPAMP(RES_K(1) + RES_K(0.2), CAP_U(0.01), 5.0) - MCFG_POKEY_ALLPOT_R_CB(IOPORT("IN1")) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) -MACHINE_CONFIG_END + pokey2.set_output_opamp(RES_K(1) + RES_K(0.2), CAP_U(0.01), 5.0); + pokey2.allpot_r().set_ioport("IN1"); + pokey2.add_route(ALL_OUTPUTS, "mono", 1.0); +} |