mirror of
https://github.com/holub/mame
synced 2025-04-19 23:12:11 +03:00
stfight: use device_array for ym2203
This commit is contained in:
parent
e5ae9d5b20
commit
988bf45404
@ -323,8 +323,8 @@ void stfight_state::cshooter_cpu1_map(address_map &map)
|
||||
void stfight_state::cpu2_map(address_map &map)
|
||||
{
|
||||
map(0x0000, 0x7fff).rom();
|
||||
map(0xc000, 0xc001).rw("ym1", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
||||
map(0xc800, 0xc801).rw("ym2", FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
||||
map(0xc000, 0xc001).rw(m_ym[0], FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
||||
map(0xc800, 0xc801).rw(m_ym[1], FUNC(ym2203_device::read), FUNC(ym2203_device::write));
|
||||
map(0xd000, 0xd000).nopr();
|
||||
map(0xd800, 0xd800).nopw();
|
||||
map(0xe800, 0xe800).nopw();
|
||||
@ -482,17 +482,17 @@ void stfight_state::stfight_base(machine_config &config)
|
||||
/* sound hardware */
|
||||
SPEAKER(config, "mono").front_center();
|
||||
|
||||
ym2203_device &ym1(YM2203(config, m_ym1, 12_MHz_XTAL / 8));
|
||||
ym1.add_route(0, "mono", 0.15);
|
||||
ym1.add_route(1, "mono", 0.15);
|
||||
ym1.add_route(2, "mono", 0.15);
|
||||
ym1.add_route(3, "mono", 0.10);
|
||||
YM2203(config, m_ym[0], 12_MHz_XTAL / 8);
|
||||
m_ym[0]->add_route(0, "mono", 0.15);
|
||||
m_ym[0]->add_route(1, "mono", 0.15);
|
||||
m_ym[0]->add_route(2, "mono", 0.15);
|
||||
m_ym[0]->add_route(3, "mono", 0.10);
|
||||
|
||||
ym2203_device &ym2(YM2203(config, m_ym2, 12_MHz_XTAL / 8));
|
||||
ym2.add_route(0, "mono", 0.15);
|
||||
ym2.add_route(1, "mono", 0.15);
|
||||
ym2.add_route(2, "mono", 0.15);
|
||||
ym2.add_route(3, "mono", 0.10);
|
||||
YM2203(config, m_ym[1], 12_MHz_XTAL / 8);
|
||||
m_ym[1]->add_route(0, "mono", 0.15);
|
||||
m_ym[1]->add_route(1, "mono", 0.15);
|
||||
m_ym[1]->add_route(2, "mono", 0.15);
|
||||
m_ym[1]->add_route(3, "mono", 0.10);
|
||||
|
||||
MSM5205(config, m_msm, 384_kHz_XTAL);
|
||||
m_msm->vck_callback().set(FUNC(stfight_state::stfight_adpcm_int)); // Interrupt function
|
||||
|
@ -21,8 +21,7 @@ public:
|
||||
, m_audiocpu(*this, "audiocpu")
|
||||
, m_mcu(*this, "mcu")
|
||||
, m_msm(*this, "msm")
|
||||
, m_ym1(*this, "ym1")
|
||||
, m_ym2(*this, "ym2")
|
||||
, m_ym(*this, "ym%u", 0)
|
||||
, m_main_bank(*this, "mainbank")
|
||||
, m_samples(*this, "adpcm")
|
||||
, m_decrypted_opcodes(*this, "decrypted_opcodes")
|
||||
@ -90,9 +89,7 @@ private:
|
||||
required_device<cpu_device> m_audiocpu;
|
||||
required_device<m68705p5_device> m_mcu;
|
||||
required_device<msm5205_device> m_msm;
|
||||
|
||||
required_device<ym2203_device> m_ym1;
|
||||
required_device<ym2203_device> m_ym2;
|
||||
required_device_array<ym2203_device, 2> m_ym;
|
||||
|
||||
required_memory_bank m_main_bank;
|
||||
|
||||
|
@ -81,8 +81,8 @@ void stfight_state::machine_start()
|
||||
m_int1_timer = timer_alloc(TIMER_STFIGHT_INTERRUPT_1);
|
||||
|
||||
// Set clock prescaler FM:1/2 PSG:1/1
|
||||
m_ym1->write(0, 0x2f);
|
||||
m_ym2->write(0, 0x2f);
|
||||
m_ym[0]->write(0, 0x2f);
|
||||
m_ym[1]->write(0, 0x2f);
|
||||
|
||||
save_item(NAME(m_coin_state));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user