diff options
Diffstat (limited to 'src/mame/drivers/toratora.cpp')
-rw-r--r-- | src/mame/drivers/toratora.cpp | 87 |
1 files changed, 43 insertions, 44 deletions
diff --git a/src/mame/drivers/toratora.cpp b/src/mame/drivers/toratora.cpp index 3bcf4021684..b53ba43f42c 100644 --- a/src/mame/drivers/toratora.cpp +++ b/src/mame/drivers/toratora.cpp @@ -395,12 +395,12 @@ void toratora_state::machine_reset() m_clear_tv = 0; } -MACHINE_CONFIG_START(toratora_state::toratora) - +void toratora_state::toratora(machine_config &config) +{ /* basic machine hardware */ - MCFG_DEVICE_ADD("maincpu", M6800, 5185000 / 8) /* 5.185 MHz XTAL divided by 8 (@ U94.12) */ - MCFG_DEVICE_PROGRAM_MAP(main_map) - MCFG_DEVICE_PERIODIC_INT_DRIVER(toratora_state, toratora_timer, 250) /* timer counting at 250 Hz */ + M6800(config, m_maincpu, 5185000 / 8); /* 5.185 MHz XTAL divided by 8 (@ U94.12) */ + m_maincpu->set_addrmap(AS_PROGRAM, &toratora_state::main_map); + m_maincpu->set_periodic_int(FUNC(toratora_state::toratora_timer), attotime::from_hz(250)); /* timer counting at 250 Hz */ PIA6821(config, m_pia_u1, 0); m_pia_u1->writepb_handler().set(FUNC(toratora_state::port_b_u1_w)); @@ -420,49 +420,48 @@ MACHINE_CONFIG_START(toratora_state::toratora) m_pia_u2->cb2_handler().set(FUNC(toratora_state::cb2_u2_w)); /* video hardware */ - MCFG_SCREEN_ADD("screen", RASTER) - MCFG_SCREEN_SIZE(256, 256) - MCFG_SCREEN_VISIBLE_AREA(0,256-1,8,248-1) - MCFG_SCREEN_REFRESH_RATE(60) - MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(0)) - MCFG_SCREEN_UPDATE_DRIVER(toratora_state, screen_update_toratora) + screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); + screen.set_size(256, 256); + screen.set_visarea(0,256-1,8,248-1); + screen.set_refresh_hz(60); + screen.set_vblank_time(ATTOSECONDS_IN_USEC(0)); + screen.set_screen_update(FUNC(toratora_state::screen_update_toratora)); /* audio hardware */ SPEAKER(config, "mono").front_center(); - MCFG_DEVICE_ADD("sn1", SN76477) - MCFG_SN76477_NOISE_PARAMS(RES_K(47), RES_K(470), CAP_P(470)) // noise + filter - MCFG_SN76477_DECAY_RES(RES_M(2)) // decay_res - MCFG_SN76477_ATTACK_PARAMS(CAP_U(0.2), RES_K(3.3)) // attack_decay_cap + attack_res - MCFG_SN76477_AMP_RES(RES_K(47)) // amplitude_res - MCFG_SN76477_FEEDBACK_RES(RES_K(50)) // feedback_res - MCFG_SN76477_VCO_PARAMS(0, CAP_U(0.1), RES_K(51)) // VCO volt + cap + res - MCFG_SN76477_PITCH_VOLTAGE(5.0) // pitch_voltage - MCFG_SN76477_SLF_PARAMS(CAP_U(1.0), RES_K(10)) // slf caps + res - MCFG_SN76477_ONESHOT_PARAMS(CAP_U(0.1), RES_K(100)) // oneshot caps + res - MCFG_SN76477_VCO_MODE(0) // VCO mode - MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C - MCFG_SN76477_ENVELOPE_PARAMS(0, 0) // envelope 1, 2 - MCFG_SN76477_ENABLE(1) // enable - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - - MCFG_DEVICE_ADD("sn2", SN76477) - MCFG_SN76477_NOISE_PARAMS(RES_K(47), RES_K(470), CAP_P(470)) // noise + filter - MCFG_SN76477_DECAY_RES(RES_M(2)) // decay_res - MCFG_SN76477_ATTACK_PARAMS(CAP_U(0.2), RES_K(3.3)) // attack_decay_cap + attack_res - MCFG_SN76477_AMP_RES(RES_K(47)) // amplitude_res - MCFG_SN76477_FEEDBACK_RES(RES_K(50)) // feedback_res - MCFG_SN76477_VCO_PARAMS(0, CAP_U(0.1), RES_K(51)) // VCO volt + cap + res - MCFG_SN76477_PITCH_VOLTAGE(5.0) // pitch_voltage - MCFG_SN76477_SLF_PARAMS(CAP_U(1.0), RES_K(10)) // slf caps + res - MCFG_SN76477_ONESHOT_PARAMS(CAP_U(0.1), RES_K(100)) // oneshot caps + res - MCFG_SN76477_VCO_MODE(0) // VCO mode - MCFG_SN76477_MIXER_PARAMS(0, 0, 0) // mixer A, B, C - MCFG_SN76477_ENVELOPE_PARAMS(0, 0) // envelope 1, 2 - MCFG_SN76477_ENABLE(1) // enable - MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) - -MACHINE_CONFIG_END + SN76477(config, m_sn1); + m_sn1->set_noise_params(RES_K(47), RES_K(470), CAP_P(470)); + m_sn1->set_decay_res(RES_M(2)); + m_sn1->set_attack_params(CAP_U(0.2), RES_K(3.3)); + m_sn1->set_amp_res(RES_K(47)); + m_sn1->set_feedback_res(RES_K(50)); + m_sn1->set_vco_params(0, CAP_U(0.1), RES_K(51)); + m_sn1->set_pitch_voltage(5.0); + m_sn1->set_slf_params(CAP_U(1.0), RES_K(10)); + m_sn1->set_oneshot_params(CAP_U(0.1), RES_K(100)); + m_sn1->set_vco_mode(0); + m_sn1->set_mixer_params(0, 0, 0); + m_sn1->set_envelope_params(0, 0); + m_sn1->set_enable(1); + m_sn1->add_route(ALL_OUTPUTS, "mono", 0.50); + + SN76477(config, m_sn2); + m_sn2->set_noise_params(RES_K(47), RES_K(470), CAP_P(470)); + m_sn2->set_decay_res(RES_M(2)); + m_sn2->set_attack_params(CAP_U(0.2), RES_K(3.3)); + m_sn2->set_amp_res(RES_K(47)); + m_sn2->set_feedback_res(RES_K(50)); + m_sn2->set_vco_params(0, CAP_U(0.1), RES_K(51)); + m_sn2->set_pitch_voltage(5.0); + m_sn2->set_slf_params(CAP_U(1.0), RES_K(10)); + m_sn2->set_oneshot_params(CAP_U(0.1), RES_K(100)); + m_sn2->set_vco_mode(0); + m_sn2->set_mixer_params(0, 0, 0); + m_sn2->set_envelope_params(0, 0); + m_sn2->set_enable(1); + m_sn2->add_route(ALL_OUTPUTS, "mono", 0.50); +} |