diff options
Diffstat (limited to 'src/mame/drivers/foodf.cpp')
-rw-r--r-- | src/mame/drivers/foodf.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/mame/drivers/foodf.cpp b/src/mame/drivers/foodf.cpp index ded2116a2c6..98182ab15d1 100644 --- a/src/mame/drivers/foodf.cpp +++ b/src/mame/drivers/foodf.cpp @@ -337,11 +337,11 @@ READ8_MEMBER(foodf_state::pot_r) * *************************************/ -MACHINE_CONFIG_START(foodf_state::foodf) - +void foodf_state::foodf(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", M68000, MASTER_CLOCK/2) - MCFG_DEVICE_PROGRAM_MAP(main_map) + M68000(config, m_maincpu, MASTER_CLOCK/2); + m_maincpu->set_addrmap(AS_PROGRAM, &foodf_state::main_map); adc0809_device &adc(ADC0809(config, "adc", MASTER_CLOCK/16)); adc.in_callback<0>().set_ioport("STICK1_Y"); @@ -353,39 +353,39 @@ MACHINE_CONFIG_START(foodf_state::foodf) WATCHDOG_TIMER(config, "watchdog").set_vblank_count(m_screen, 8); - MCFG_TIMER_DRIVER_ADD(m_scan_timer, foodf_state, scanline_update_timer) + TIMER(config, m_scan_timer).configure_generic(FUNC(foodf_state::scanline_update_timer)); /* video hardware */ - MCFG_DEVICE_ADD("gfxdecode", GFXDECODE, "palette", gfx_foodf) - MCFG_PALETTE_ADD("palette", 256) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_foodf); + PALETTE(config, m_palette, 256); - MCFG_TILEMAP_ADD_STANDARD_TRANSPEN("playfield", "gfxdecode", 2, foodf_state, get_playfield_tile_info, 8,8, SCAN_COLS, 32,32, 0) + TILEMAP(config, m_playfield_tilemap, "gfxdecode", 2, 8,8, TILEMAP_SCAN_COLS, 32,32, 0).set_info_callback(FUNC(foodf_state::get_playfield_tile_info)); - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK/2, 384, 0, 256, 259, 0, 224) - MCFG_SCREEN_UPDATE_DRIVER(foodf_state, screen_update_foodf) - MCFG_SCREEN_PALETTE("palette") - MCFG_SCREEN_VBLANK_CALLBACK(WRITELINE(*this, foodf_state, video_int_write_line)) + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(MASTER_CLOCK/2, 384, 0, 256, 259, 0, 224); + m_screen->set_screen_update(FUNC(foodf_state::screen_update_foodf)); + m_screen->set_palette(m_palette); + m_screen->screen_vblank().set(FUNC(foodf_state::video_int_write_line)); /* sound hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("pokey1", POKEY, MASTER_CLOCK/2/10) - MCFG_POKEY_POT0_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT1_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT2_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT3_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT4_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT5_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT6_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_POKEY_POT7_R_CB(READ8(*this, foodf_state, pot_r)) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) - - MCFG_DEVICE_ADD("pokey2", POKEY, MASTER_CLOCK/2/10) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) - - MCFG_DEVICE_ADD("pokey3", POKEY, MASTER_CLOCK/2/10) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.33) + pokey_device &pokey1(POKEY(config, "pokey1", MASTER_CLOCK/2/10)); + pokey1.pot_r<0>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<1>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<2>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<3>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<4>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<5>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<6>().set(FUNC(foodf_state::pot_r)); + pokey1.pot_r<7>().set(FUNC(foodf_state::pot_r)); + pokey1.add_route(ALL_OUTPUTS, "mono", 0.33); + + pokey_device &pokey2(POKEY(config, "pokey2", MASTER_CLOCK/2/10)); + pokey2.add_route(ALL_OUTPUTS, "mono", 0.33); + + pokey_device &pokey3(POKEY(config, "pokey3", MASTER_CLOCK/2/10)); + pokey3.add_route(ALL_OUTPUTS, "mono", 0.33); MACHINE_CONFIG_END |