diff options
Diffstat (limited to 'src/mame/drivers/segas16b.cpp')
-rw-r--r-- | src/mame/drivers/segas16b.cpp | 68 |
1 files changed, 33 insertions, 35 deletions
diff --git a/src/mame/drivers/segas16b.cpp b/src/mame/drivers/segas16b.cpp index cae112405ba..1b5d130769e 100644 --- a/src/mame/drivers/segas16b.cpp +++ b/src/mame/drivers/segas16b.cpp @@ -3729,13 +3729,13 @@ void segas16b_state::system16b(machine_config &config) m_mapper->pbf().set_inputline(m_soundcpu, 0); // video hardware - GFXDECODE(config, m_gfxdecode, "palette", gfx_segas16b); - PALETTE(config, "palette").set_entries(2048*3); + GFXDECODE(config, m_gfxdecode, m_palette, gfx_segas16b); + PALETTE(config, m_palette).set_entries(2048*3); SCREEN(config, m_screen, SCREEN_TYPE_RASTER); m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224); m_screen->set_screen_update(FUNC(segas16b_state::screen_update)); - m_screen->set_palette("palette"); + m_screen->set_palette(m_palette); SEGA_SYS16B_SPRITES(config, m_sprites, 0); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); @@ -3913,28 +3913,28 @@ void segas16b_state::fpointbla(machine_config &config) m_sprites->set_local_originx(60); // these align the pieces with the playfield } -MACHINE_CONFIG_START(segas16b_state::lockonph) - +void segas16b_state::lockonph(machine_config &config) +{ // basic machine hardware - MCFG_DEVICE_ADD("maincpu", M68000, XTAL(16'000'000)/2) // ? - MCFG_DEVICE_PROGRAM_MAP(lockonph_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", segas16b_state, irq4_line_hold) + M68000(config, m_maincpu, XTAL(16'000'000)/2); // ? + m_maincpu->set_addrmap(AS_PROGRAM, &segas16b_state::lockonph_map); + m_maincpu->set_vblank_int("screen", FUNC(segas16b_state::irq4_line_hold)); - MCFG_DEVICE_ADD("soundcpu", Z80, XTAL(16'000'000)/4) // ? - MCFG_DEVICE_PROGRAM_MAP(lockonph_sound_map) - MCFG_DEVICE_IO_MAP(lockonph_sound_iomap) + Z80(config, m_soundcpu, XTAL(16'000'000)/4); // ? + m_soundcpu->set_addrmap(AS_PROGRAM, &segas16b_state::lockonph_sound_map); + m_soundcpu->set_addrmap(AS_IO, &segas16b_state::lockonph_sound_iomap); NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); // video hardware - GFXDECODE(config, m_gfxdecode, "palette", gfx_lockonph); - MCFG_PALETTE_ADD("palette", 0x2000*4) + GFXDECODE(config, m_gfxdecode, m_palette, gfx_lockonph); + PALETTE(config, m_palette).set_entries(0x2000*4); - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_RAW_PARAMS(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224) // wrong, other XTAL seems to be 17Mhz? - MCFG_SCREEN_UPDATE_DRIVER(segas16b_state, screen_update) - MCFG_SCREEN_PALETTE("palette") + SCREEN(config, m_screen, SCREEN_TYPE_RASTER); + m_screen->set_raw(MASTER_CLOCK_25MHz/4, 400, 0, 320, 262, 0, 224); // wrong, other XTAL seems to be 17Mhz? + m_screen->set_screen_update(FUNC(segas16b_state::screen_update)); + m_screen->set_palette(m_palette); SEGA_SYS16B_SPRITES(config, m_sprites, 0); SEGAIC16VID(config, m_segaic16vid, 0, m_gfxdecode); @@ -3950,12 +3950,10 @@ MACHINE_CONFIG_START(segas16b_state::lockonph) m_ym2151->add_route(0, "mono", 0.5); m_ym2151->add_route(1, "mono", 0.5); - MCFG_DEVICE_ADD("oki", OKIM6295, XTAL(16'000'000)/16, okim6295_device::PIN7_LOW) // clock / pin not verified - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.2) - - -MACHINE_CONFIG_END + okim6295_device &oki(OKIM6295(config, "oki", XTAL(16'000'000)/16, okim6295_device::PIN7_LOW)); // clock / pin not verified + oki.add_route(ALL_OUTPUTS, "mono", 0.2); + oki.add_route(ALL_OUTPUTS, "mono", 0.2); +} //************************************************************************** @@ -3981,11 +3979,11 @@ void segas16b_state::atomicp(machine_config &config) // 10MHz CPU Clock verified } -MACHINE_CONFIG_START(segas16b_state::system16c) +void segas16b_state::system16c(machine_config &config) +{ system16b(config); - MCFG_DEVICE_MODIFY("maincpu") - MCFG_DEVICE_PROGRAM_MAP(system16c_map) -MACHINE_CONFIG_END + m_maincpu->set_addrmap(AS_PROGRAM, &segas16b_state::system16c_map); +} @@ -9847,23 +9845,23 @@ void isgsm_state::machine_reset() } -MACHINE_CONFIG_START(isgsm_state::isgsm) +void isgsm_state::isgsm(machine_config &config) +{ system16b(config); // basic machine hardware config.device_remove("maincpu"); config.device_remove("mapper"); - MCFG_DEVICE_ADD("maincpu", M68000, 16000000) // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times - MCFG_DEVICE_PROGRAM_MAP(isgsm_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", isgsm_state, irq4_line_hold) + M68000(config, m_maincpu, 16000000); // no obvious CPU, but seems to be clocked faster than an original system16 based on the boot times + m_maincpu->set_addrmap(AS_PROGRAM, &isgsm_state::isgsm_map); + m_maincpu->set_vblank_int("screen", FUNC(isgsm_state::irq4_line_hold)); - MCFG_DEVICE_MODIFY("soundcpu") - MCFG_DEVICE_PROGRAM_MAP(bootleg_sound_map) - MCFG_DEVICE_IO_MAP(bootleg_sound_portmap) + m_soundcpu->set_addrmap(AS_PROGRAM, &isgsm_state::bootleg_sound_map); + m_soundcpu->set_addrmap(AS_IO, &isgsm_state::bootleg_sound_portmap); GENERIC_LATCH_8(config, m_soundlatch); -MACHINE_CONFIG_END +} void isgsm_state::init_isgsm() { |