diff options
author | mooglyguy <therealmogminer@gmail.com> | 2018-08-10 01:39:10 +0200 |
---|---|---|
committer | mooglyguy <therealmogminer@gmail.com> | 2018-08-10 18:07:27 +0200 |
commit | 0d4a4e5e95a58ca1cb821df1cf9afd8b559ccac2 (patch) | |
tree | 8faf4707071aef3e1f3bd29b78554f7d376fef20 | |
parent | 3d8dd35077eff0c9154b4afd9cbe223a7442bebe (diff) |
-68153bim: Removed MCFG and added devcb3, nw
-rw-r--r-- | src/devices/bus/vme/vme_fccpu20.cpp | 4 | ||||
-rw-r--r-- | src/devices/bus/vme/vme_fcisio.cpp | 2 | ||||
-rw-r--r-- | src/devices/machine/68153bim.h | 51 |
3 files changed, 15 insertions, 42 deletions
diff --git a/src/devices/bus/vme/vme_fccpu20.cpp b/src/devices/bus/vme/vme_fccpu20.cpp index 1e38411a44f..f863b8c1681 100644 --- a/src/devices/bus/vme/vme_fccpu20.cpp +++ b/src/devices/bus/vme/vme_fccpu20.cpp @@ -266,8 +266,8 @@ MACHINE_CONFIG_START(vme_fccpu20_device::device_add_mconfig) MCFG_PIT68230_TIMER_IRQ_CB(WRITELINE("bim", bim68153_device, int2_w)) /* BIM */ - MCFG_MC68153_ADD("bim", CLOCK32 / 8) - MCFG_BIM68153_OUT_INT_CB(WRITELINE(*this, vme_fccpu20_device, bim_irq_callback)) + bim68153_device &bim(MC68153(config, "bim", CLOCK32 / 8)); + bim.out_int_callback().set(FUNC(vme_fccpu20_device::bim_irq_callback)); /*INT0 - Abort switch */ /*INT1 - MPCC@8.064 MHz aswell */ /*INT2 - PI/T timer */ diff --git a/src/devices/bus/vme/vme_fcisio.cpp b/src/devices/bus/vme/vme_fcisio.cpp index 7db85954e23..3d26762bb55 100644 --- a/src/devices/bus/vme/vme_fcisio.cpp +++ b/src/devices/bus/vme/vme_fcisio.cpp @@ -365,7 +365,7 @@ MACHINE_CONFIG_START(vme_fcisio1_card_device::device_add_mconfig) MCFG_DEVICE_ADD ("pit", PIT68230, XTAL(20'000'000) / 2) MCFG_PIT68230_PB_INPUT_CB(READ8(*this, vme_fcisio1_card_device, config_rd)) - MCFG_MC68153_ADD("bim", XTAL(20'000'000) / 2) + MC68153(config, "bim", XTAL(20'000'000) / 2); MACHINE_CONFIG_END const tiny_rom_entry *vme_fcisio1_card_device::device_rom_region() const diff --git a/src/devices/machine/68153bim.h b/src/devices/machine/68153bim.h index a0e223b6b2e..3b5da05c9eb 100644 --- a/src/devices/machine/68153bim.h +++ b/src/devices/machine/68153bim.h @@ -35,38 +35,6 @@ //************************************************************************** -// DEVICE CONFIGURATION MACROS -//************************************************************************** - -/* Variant ADD macros - use the right one to enable the right feature set! */ -#define MCFG_MC68153_ADD(_tag, _clock) \ - MCFG_DEVICE_ADD(_tag, MC68153, _clock) - -#define MCFG_EI68C153_ADD(_tag, _clock) \ - MCFG_DEVICE_ADD(_tag, EI68C153, _clock) - -#define MCFG_BIM68153_OUT_INT_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_int_callback(DEVCB_##_devcb); - -// These callback sets INTAL0 and INTAL1 but is probably not needed as the -// shorthand OUT_IACK0..OUT_IACK3 below embedd the channel information -#define MCFG_BIM68153_OUT_INTAL0_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_intal0_callback(DEVCB_##_devcb); - -#define MCFG_BIM68153_OUT_INTAL1_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_intal1_callback(DEVCB_##_devcb); - -// LOCAL IACK callbacks emulating the INTAL0 and INTAL1 outputs for INTAE requesting a vector from a sub device -#define MCFG_BIM68153_OUT_IACK0_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_iack0_callback(DEVCB_##_devcb); -#define MCFG_BIM68153_OUT_IACK1_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_iack1_callback(DEVCB_##_devcb); -#define MCFG_BIM68153_OUT_IACK2_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_iack2_callback(DEVCB_##_devcb); -#define MCFG_BIM68153_OUT_IACK3_CB(_devcb) \ - downcast<bim68153_device &>(*device).set_out_iack3_callback(DEVCB_##_devcb); - -//************************************************************************** // TYPE DEFINITIONS //************************************************************************** @@ -140,14 +108,19 @@ public: int acknowledge(); int get_irq_level(); - template <class Object> devcb_base &set_out_int_callback(Object &&cb) { return m_out_int_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_intal0_callback(Object &&cb) { return m_out_intal0_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_intal1_callback(Object &&cb) { return m_out_intal1_cb.set_callback(std::forward<Object>(cb)); } + auto out_int_callback() { return m_out_int_cb.bind(); } + + // These callback set INTAL0 and INTAL1 but are probably not needed as the + // shorthand OUT_IACK0..OUT_IACK3 below embed the channel information + auto out_intal0_callback() { return m_out_intal0_cb.bind(); } + auto out_intal1_callback() { return m_out_intal1_cb.bind(); } - template <class Object> devcb_base &set_out_iack0_callback(Object &&cb) { return m_chn[CHN_0]->m_out_iack_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_iack1_callback(Object &&cb) { return m_chn[CHN_1]->m_out_iack_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_iack2_callback(Object &&cb) { return m_chn[CHN_2]->m_out_iack_cb.set_callback(std::forward<Object>(cb)); } - template <class Object> devcb_base &set_out_iack4_callback(Object &&cb) { return m_chn[CHN_3]->m_out_iack_cb.set_callback(std::forward<Object>(cb)); } + // LOCAL IACK callbacks emulating the INTAL0 and INTAL1 outputs for INTAE requesting a vector from a sub device + template <unsigned Bit> out_iack_callback() { return m_chn[Bit]->m_out_iack_cb.bind(); } + auto out_iack0_callback() { return m_chn[CHN_0]->m_out_iack_cb.bind(); } + auto out_iack1_callback() { return m_chn[CHN_1]->m_out_iack_cb.bind(); } + auto out_iack2_callback() { return m_chn[CHN_2]->m_out_iack_cb.bind(); } + auto out_iack3_callback() { return m_chn[CHN_3]->m_out_iack_cb.bind(); } DECLARE_READ8_MEMBER( read ); DECLARE_WRITE8_MEMBER( write ); |