Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooking the sound cpu for captain lucky sigmab31.cpp #13274

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
28 changes: 23 additions & 5 deletions src/mame/sigma/sigmab31.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,9 @@ class sigmab31_state : public driver_device
public:
sigmab31_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_maincpu(*this, "maincpu")
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu")

{ }

void sigmab31(machine_config &config);
Expand All @@ -116,18 +118,31 @@ class sigmab31_state : public driver_device
virtual void machine_reset() override ATTR_COLD;

private:
void prg_map(address_map &map) ATTR_COLD;
void main_map(address_map &map) ATTR_COLD;
void sound_map (address_map &map) ATTR_COLD;

required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;

};


void sigmab31_state::prg_map(address_map &map)
void sigmab31_state::main_map(address_map &map)
{
map(0x6000, 0xf6ff).rom();
map(0xf800, 0xffff).rom();
}

void sigmab31_state::sound_map (address_map &map)
{
map(0x0000, 0x1fff).ram();
// map(0x6020, 0x6027).rw(m_6840ptm_2, FUNC(ptm6840_device::read), FUNC(ptm6840_device::write));
// map(0x6030, 0x6030).w(FUNC(sigmab31_state::audiocpu_irq_ack_w));
// map(0x6050, 0x6050).r("soundlatch", FUNC(generic_latch_8_device::read));
map(0x6060, 0x6061).rw("ymsnd", FUNC(ym3812_device::read), FUNC(ym3812_device::write));
map(0x8000, 0xffff).rom().region("audiocpu", 0);
}


static INPUT_PORTS_START( cptlucky )
PORT_START("IN0")
Expand Down Expand Up @@ -173,7 +188,10 @@ void sigmab31_state::machine_reset()
void sigmab31_state::sigmab31(machine_config &config)
{
MC6809(config, m_maincpu, 8_MHz_XTAL);
m_maincpu->set_addrmap(AS_PROGRAM, &sigmab31_state::prg_map);
m_maincpu->set_addrmap(AS_PROGRAM, &sigmab31_state::main_map);

MC6809(config, m_audiocpu, XTAL(8'000'000));
m_audiocpu->set_addrmap(AS_PROGRAM, &sigmab31_state::sound_map );

PTM6840(config, "6840ptm_1", 8_MHz_XTAL / 8);

Expand All @@ -193,7 +211,7 @@ ROM_START( cptlucky )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "b325107-084_captain_lucky_l93-0091.70", 0x00000, 0x10000, CRC(84c2ab4e) SHA1(3d388ba1c8e4718ca95df45f59d0315887385a27) )

ROM_REGION( 0x8000, "opl", 0 )
ROM_REGION( 0x8000, "audiocpu", 0 )
ROM_LOAD( "m-slot_03-00_l89-1625.57", 0x00000, 0x8000, CRC(268c8a7c) SHA1(90903428d6c0af3ebdcb462e80a7c28dc4ee7af2) )
ROM_END

Expand Down
Loading