Skip to content

Commit

Permalink
passthru
Browse files Browse the repository at this point in the history
  • Loading branch information
holub committed Oct 2, 2024
1 parent e66fff5 commit a1c3f9c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/devices/bus/spectrum/musicmachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ void spectrum_musicmachine_device::device_add_mconfig(machine_config &config)
SPEAKER(config, "speaker").front_center();
ZN429E(config, m_dac, 0).add_route(ALL_OUTPUTS, "speaker", 0.2);

// passthru
SPECTRUM_EXPANSION_SLOT(config, m_exp, spectrum_expansion_devices, nullptr);
m_exp->irq_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::irq_w));
m_exp->nmi_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::nmi_w));
m_exp->fb_r_handler().set(DEVICE_SELF_OWNER, FUNC(spectrum_expansion_slot_device::fb_r));
}

//**************************************************************************
Expand Down
9 changes: 9 additions & 0 deletions src/devices/bus/spectrum/musicmachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ class spectrum_musicmachine_device : public device_t,
virtual u8 iorq_r(offs_t offset) override;
virtual void iorq_w(offs_t offset, u8 data) override;

// passthru
virtual void pre_opcode_fetch(offs_t offset) override { m_exp->pre_opcode_fetch(offset); }
virtual void post_opcode_fetch(offs_t offset) override { m_exp->post_opcode_fetch(offset); }
virtual void pre_data_fetch(offs_t offset) override { m_exp->pre_data_fetch(offset); }
virtual void post_data_fetch(offs_t offset) override { m_exp->post_data_fetch(offset); }
virtual u8 mreq_r(offs_t offset) override { return m_exp->romcs() ? m_exp->mreq_r(offset) : 0xff; }
virtual void mreq_w(offs_t offset, u8 data) override { if (m_exp->romcs()) m_exp->mreq_w(offset, data); }
virtual bool romcs() override { return m_exp->romcs(); }

private:
required_device<acia6850_device> m_acia;
required_device<dac_byte_interface> m_dac;
Expand Down

0 comments on commit a1c3f9c

Please sign in to comment.