diff options
Diffstat (limited to 'src/mame/drivers/mainevt.cpp')
-rw-r--r-- | src/mame/drivers/mainevt.cpp | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/src/mame/drivers/mainevt.cpp b/src/mame/drivers/mainevt.cpp index 8bb6779b7f8..17cbd9be568 100644 --- a/src/mame/drivers/mainevt.cpp +++ b/src/mame/drivers/mainevt.cpp @@ -423,30 +423,30 @@ INTERRUPT_GEN_MEMBER(mainevt_state::devstors_sound_timer_irq) device.execute().set_input_line(0, HOLD_LINE); } -MACHINE_CONFIG_START(mainevt_state::mainevt) - +void mainevt_state::mainevt(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", HD6309E, 24_MHz_XTAL / 8) // E & Q generated by 052109 - MCFG_DEVICE_PROGRAM_MAP(mainevt_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mainevt_state, mainevt_interrupt) + HD6309E(config, m_maincpu, 24_MHz_XTAL / 8); // E & Q generated by 052109 + m_maincpu->set_addrmap(AS_PROGRAM, &mainevt_state::mainevt_map); + m_maincpu->set_vblank_int("screen", FUNC(mainevt_state::mainevt_interrupt)); - MCFG_DEVICE_ADD("audiocpu", Z80, 3.579545_MHz_XTAL) /* 3.579545 MHz */ - MCFG_DEVICE_PROGRAM_MAP(mainevt_sound_map) - MCFG_DEVICE_PERIODIC_INT_DRIVER(mainevt_state, mainevt_sound_timer_irq, 8*60) /* ??? */ + Z80(config, m_audiocpu, 3.579545_MHz_XTAL); /* 3.579545 MHz */ + m_audiocpu->set_addrmap(AS_PROGRAM, &mainevt_state::mainevt_sound_map); + m_audiocpu->set_periodic_int(FUNC(mainevt_state::mainevt_sound_timer_irq), attotime::from_hz(8*60)); /* ??? */ /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) -// MCFG_SCREEN_REFRESH_RATE(60) -// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) -// MCFG_SCREEN_SIZE(64*8, 32*8) -// MCFG_SCREEN_VISIBLE_AREA(14*8, (64-14)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 14*8, (64-14)*8, 256, 16, 240) // same hardware as Devastators so assume 59.17 - MCFG_SCREEN_UPDATE_DRIVER(mainevt_state, screen_update_mainevt) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 256) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); +// screen.set_refresh_hz(60); +// screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); +// screen.set_size(64*8, 32*8); +// screen.set_visarea(14*8, (64-14)*8-1, 2*8, 30*8-1); + screen.set_raw(XTAL(24'000'000)/3, 528, 14*8, (64-14)*8, 256, 16, 240); // same hardware as Devastators so assume 59.17 + screen.set_screen_update(FUNC(mainevt_state::screen_update_mainevt)); + screen.set_palette("palette"); + + palette_device &palette(PALETTE(config, "palette", 256)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 24_MHz_XTAL); m_k052109->set_palette("palette"); @@ -462,40 +462,40 @@ MACHINE_CONFIG_START(mainevt_state::mainevt) GENERIC_LATCH_8(config, "soundlatch"); - MCFG_DEVICE_ADD("k007232", K007232, 3.579545_MHz_XTAL) - MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, mainevt_state, volume_callback)) - MCFG_SOUND_ROUTE(0, "mono", 0.20) - MCFG_SOUND_ROUTE(1, "mono", 0.20) - - MCFG_DEVICE_ADD("upd", UPD7759) - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) -MACHINE_CONFIG_END + K007232(config, m_k007232, 3.579545_MHz_XTAL); + m_k007232->port_write().set(FUNC(mainevt_state::volume_callback)); + m_k007232->add_route(0, "mono", 0.20); + m_k007232->add_route(1, "mono", 0.20); + UPD7759(config, m_upd7759); + m_upd7759->add_route(ALL_OUTPUTS, "mono", 0.50); +} -MACHINE_CONFIG_START(mainevt_state::devstors) +void mainevt_state::devstors(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", HD6309E, 24_MHz_XTAL / 8) // E & Q generated by 052109 - MCFG_DEVICE_PROGRAM_MAP(devstors_map) - MCFG_DEVICE_VBLANK_INT_DRIVER("screen", mainevt_state, dv_interrupt) + HD6309E(config, m_maincpu, 24_MHz_XTAL / 8); // E & Q generated by 052109 + m_maincpu->set_addrmap(AS_PROGRAM, &mainevt_state::devstors_map); + m_maincpu->set_vblank_int("screen", FUNC(mainevt_state::dv_interrupt)); - MCFG_DEVICE_ADD("audiocpu", Z80, 3.579545_MHz_XTAL) - MCFG_DEVICE_PROGRAM_MAP(devstors_sound_map) - MCFG_DEVICE_PERIODIC_INT_DRIVER(mainevt_state, devstors_sound_timer_irq, 4*60) /* ??? */ + Z80(config, m_audiocpu, 3.579545_MHz_XTAL); + m_audiocpu->set_addrmap(AS_PROGRAM, &mainevt_state::devstors_sound_map); + m_audiocpu->set_periodic_int(FUNC(mainevt_state::devstors_sound_timer_irq), attotime::from_hz(4*60)); /* ??? */ /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) -// MCFG_SCREEN_REFRESH_RATE(60) -// MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) -// MCFG_SCREEN_SIZE(64*8, 32*8) -// MCFG_SCREEN_VISIBLE_AREA(13*8, (64-13)*8-1, 2*8, 30*8-1 ) - MCFG_SCREEN_RAW_PARAMS(XTAL(24'000'000)/3, 528, 13*8, (64-13)*8, 256, 16, 240) // measured 59.17 - MCFG_SCREEN_UPDATE_DRIVER(mainevt_state, screen_update_dv) - MCFG_SCREEN_PALETTE("palette") - - MCFG_PALETTE_ADD("palette", 256) - MCFG_PALETTE_ENABLE_SHADOWS() - MCFG_PALETTE_FORMAT(xBBBBBGGGGGRRRRR) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); +// screen.set_refresh_hz(60); +// screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); +// screen.set_size(64*8, 32*8); +// screen.set_visarea(13*8, (64-13)*8-1, 2*8, 30*8-1); + screen.set_raw(XTAL(24'000'000)/3, 528, 13*8, (64-13)*8, 256, 16, 240); // measured 59.17 + screen.set_screen_update(FUNC(mainevt_state::screen_update_dv)); + screen.set_palette("palette"); + + palette_device &palette(PALETTE(config, "palette", 256)); + palette.enable_shadows(); + palette.set_format(PALETTE_FORMAT_xBBBBBGGGGGRRRRR); K052109(config, m_k052109, 24_MHz_XTAL); m_k052109->set_palette("palette"); @@ -515,11 +515,11 @@ MACHINE_CONFIG_START(mainevt_state::devstors) YM2151(config, "ymsnd", 3.579545_MHz_XTAL).add_route(0, "mono", 0.30).add_route(1, "mono", 0.30); - MCFG_DEVICE_ADD("k007232", K007232, 3.579545_MHz_XTAL) - MCFG_K007232_PORT_WRITE_HANDLER(WRITE8(*this, mainevt_state, volume_callback)) - MCFG_SOUND_ROUTE(0, "mono", 0.20) - MCFG_SOUND_ROUTE(1, "mono", 0.20) -MACHINE_CONFIG_END + K007232(config, m_k007232, 3.579545_MHz_XTAL); + m_k007232->port_write().set(FUNC(mainevt_state::volume_callback)); + m_k007232->add_route(0, "mono", 0.20); + m_k007232->add_route(1, "mono", 0.20); +} |