summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Curt Coder <curtcoder@mail.com>2014-03-17 14:16:27 +0000
committer Curt Coder <curtcoder@mail.com>2014-03-17 14:16:27 +0000
commit841b2cb5e929ac0fa80ff388adf5d47bc951194b (patch)
treee2b1ea7f6d6445c848cb036971da8653f2e486b8
parent6b6e43fa1c702ce692df4a63dbff44cbf868c001 (diff)
8530scc: devcb2. (nw)
-rw-r--r--src/mess/drivers/abc1600.c8
-rw-r--r--src/mess/drivers/apple2gs.c2
-rw-r--r--src/mess/drivers/atarist.c2
-rw-r--r--src/mess/drivers/ip20.c2
-rw-r--r--src/mess/drivers/lisa.c2
-rw-r--r--src/mess/drivers/mac.c27
-rw-r--r--src/mess/drivers/macpci.c3
-rw-r--r--src/mess/drivers/next.c5
-rw-r--r--src/mess/drivers/x68k.c2
-rw-r--r--src/mess/includes/abc1600.h2
-rw-r--r--src/mess/includes/lisa.h1
-rw-r--r--src/mess/includes/mac.h2
-rw-r--r--src/mess/includes/next.h2
-rw-r--r--src/mess/machine/8530scc.c10
-rw-r--r--src/mess/machine/8530scc.h10
-rw-r--r--src/mess/machine/lisa.c4
-rw-r--r--src/mess/machine/mac.c4
17 files changed, 44 insertions, 44 deletions
diff --git a/src/mess/drivers/abc1600.c b/src/mess/drivers/abc1600.c
index 035e8155abc..6f9539da966 100644
--- a/src/mess/drivers/abc1600.c
+++ b/src/mess/drivers/abc1600.c
@@ -650,11 +650,6 @@ WRITE8_MEMBER( abc1600_state::scc_w )
m_scc->reg_w(space, A1_A2, data);
}
-void abc1600_state::scc_irq(bool status)
-{
- m_maincpu->set_input_line(M68K_IRQ_5, status ? ASSERT_LINE : CLEAR_LINE);
-}
-
//-------------------------------------------------
// Z8536_INTERFACE( cio_intf )
@@ -926,7 +921,8 @@ static MACHINE_CONFIG_START( abc1600, abc1600_state )
MCFG_Z80DMA_ADD(Z8410AB1_1_TAG, XTAL_64MHz/16, dma1_intf)
MCFG_Z80DMA_ADD(Z8410AB1_2_TAG, XTAL_64MHz/16, dma2_intf)
MCFG_Z80DART_ADD(Z8470AB1_TAG, XTAL_64MHz/16, dart_intf)
- MCFG_SCC8530_ADD(Z8530B1_TAG, XTAL_64MHz/16, line_cb_t(FUNC(abc1600_state::scc_irq), static_cast<abc1600_state *>(owner)))
+ MCFG_DEVICE_ADD(Z8530B1_TAG, SCC8530, XTAL_64MHz/16)
+ MCFG_Z8530_INTRQ_CALLBACK(INPUTLINE(MC68008P8_TAG, M68K_IRQ_5))
MCFG_DEVICE_ADD(Z8536B1_TAG, Z8536, XTAL_64MHz/16)
MCFG_Z8536_IRQ_CALLBACK(INPUTLINE(MC68008P8_TAG, M68K_IRQ_2))
MCFG_Z8536_PA_IN_CALLBACK(READ8(abc1600_state, cio_pa_r))
diff --git a/src/mess/drivers/apple2gs.c b/src/mess/drivers/apple2gs.c
index 8016d1a0fa1..bfdf4cb39e9 100644
--- a/src/mess/drivers/apple2gs.c
+++ b/src/mess/drivers/apple2gs.c
@@ -394,7 +394,7 @@ static MACHINE_CONFIG_START( apple2gs, apple2gs_state )
MCFG_IWM_ADD("fdc", apple2_fdc_interface)
/* SCC */
- MCFG_SCC8530_ADD("scc", APPLE2GS_14M/2, line_cb_t())
+ MCFG_DEVICE_ADD("scc", SCC8530, APPLE2GS_14M/2)
MCFG_LEGACY_FLOPPY_APPLE_2_DRIVES_ADD(apple2gs_floppy525_floppy_interface,15,16)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADDITIONAL_ADD(apple2gs_floppy35_floppy_interface)
diff --git a/src/mess/drivers/atarist.c b/src/mess/drivers/atarist.c
index 8d72d34892b..f72b832d7c3 100644
--- a/src/mess/drivers/atarist.c
+++ b/src/mess/drivers/atarist.c
@@ -2378,7 +2378,7 @@ static MACHINE_CONFIG_DERIVED( megaste, ste )
MCFG_CPU_MODIFY(M68000_TAG)
MCFG_CPU_PROGRAM_MAP(megaste_map)
MCFG_RP5C15_ADD(RP5C15_TAG, XTAL_32_768kHz, rtc_intf)
- MCFG_SCC8530_ADD(Z8530_TAG, Y2/4, line_cb_t())
+ MCFG_DEVICE_ADD(Z8530_TAG, SCC8530, Y2/4)
/* internal ram */
MCFG_RAM_MODIFY(RAM_TAG)
diff --git a/src/mess/drivers/ip20.c b/src/mess/drivers/ip20.c
index b74f49e8ec2..c8186f1a6e5 100644
--- a/src/mess/drivers/ip20.c
+++ b/src/mess/drivers/ip20.c
@@ -609,7 +609,7 @@ static MACHINE_CONFIG_START( ip204415, ip20_state )
MCFG_SPEAKER_STANDARD_MONO("mono")
- MCFG_SCC8530_ADD("scc", 7000000, line_cb_t())
+ MCFG_DEVICE_ADD("scc", SCC8530, 7000000)
MCFG_SCSIBUS_ADD("scsi")
MCFG_SCSIDEV_ADD("scsi:cdrom", SCSICD, SCSI_ID_6)
diff --git a/src/mess/drivers/lisa.c b/src/mess/drivers/lisa.c
index a2e8c649c12..8b8be358b6e 100644
--- a/src/mess/drivers/lisa.c
+++ b/src/mess/drivers/lisa.c
@@ -181,7 +181,7 @@ static MACHINE_CONFIG_START( lisa, lisa_state )
MCFG_DEVICE_ADD("via6522_1", VIA6522, 500000)
- MCFG_SCC8530_ADD("scc", 7833600, line_cb_t(FUNC(lisa_state::set_scc_interrupt), static_cast<lisa_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, 7833600)
MACHINE_CONFIG_END
diff --git a/src/mess/drivers/mac.c b/src/mess/drivers/mac.c
index 810e3c49175..2ebc9214815 100644
--- a/src/mess/drivers/mac.c
+++ b/src/mess/drivers/mac.c
@@ -950,7 +950,8 @@ static MACHINE_CONFIG_START( mac512ke, mac_state )
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, 1000000)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1082,7 +1083,8 @@ static MACHINE_CONFIG_START( macprtb, mac_state )
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, 783360)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a_pmu))
MCFG_VIA6522_READPB_HANDLER(READ8(mac_state,mac_via_in_b_pmu))
@@ -1133,7 +1135,8 @@ static MACHINE_CONFIG_START( macii, mac_state )
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, C7M/10)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1195,7 +1198,8 @@ static MACHINE_CONFIG_START( maciifx, mac_state )
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, C7M/10)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1439,7 +1443,8 @@ static MACHINE_CONFIG_START( macse30, mac_state )
MCFG_SWIM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, 783360)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1500,7 +1505,8 @@ static MACHINE_CONFIG_START( macpb140, mac_state )
MCFG_SWIM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, 783360)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1581,7 +1587,8 @@ static MACHINE_CONFIG_START( macpb160, mac_state )
MCFG_SWIM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, 783360)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1776,7 +1783,8 @@ static MACHINE_CONFIG_START( pwrmac, mac_state )
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, 783360)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
@@ -1837,7 +1845,8 @@ static MACHINE_CONFIG_START( macqd700, mac_state )
MCFG_IWM_ADD("fdc", mac_iwm_interface)
MCFG_LEGACY_FLOPPY_SONY_2_DRIVES_ADD(mac_floppy_interface)
- MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(mac_state::set_scc_interrupt), static_cast<mac_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(mac_state, set_scc_interrupt))
MCFG_DEVICE_ADD("via6522_0", VIA6522, C7M/10)
MCFG_VIA6522_READPA_HANDLER(READ8(mac_state,mac_via_in_a))
diff --git a/src/mess/drivers/macpci.c b/src/mess/drivers/macpci.c
index e4c7cf26c48..ac49b6a7d6d 100644
--- a/src/mess/drivers/macpci.c
+++ b/src/mess/drivers/macpci.c
@@ -128,7 +128,8 @@ static MACHINE_CONFIG_START( pippin, macpci_state )
MCFG_VIA6522_CB2_HANDLER(WRITELINE(macpci_state, mac_adb_via_out_cb2))
MCFG_VIA6522_IRQ_HANDLER(WRITELINE(macpci_state,mac_via_irq))
-// MCFG_SCC8530_ADD("scc", C7M, line_cb_t(FUNC(macpci_state::set_scc_interrupt), static_cast<macpci_state *>(owner)))
+ //MCFG_DEVICE_ADD("scc", SCC8530, C7M)
+ //MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(macpci_state, set_scc_interrupt))
MCFG_CUDA_ADD(CUDA_341S0060)
MCFG_CUDA_RESET_CALLBACK(WRITELINE(macpci_state, cuda_reset_w))
MCFG_CUDA_LINECHANGE_CALLBACK(WRITELINE(macpci_state, cuda_adb_linechange_w))
diff --git a/src/mess/drivers/next.c b/src/mess/drivers/next.c
index 5e10d19bc08..62a956ca416 100644
--- a/src/mess/drivers/next.c
+++ b/src/mess/drivers/next.c
@@ -737,7 +737,7 @@ void next_state::timer_start()
timer_tm->adjust(attotime::from_usec(timer_vbase));
}
-void next_state::scc_irq(bool state)
+WRITE_LINE_MEMBER(next_state::scc_irq)
{
irq_set(17, state);
}
@@ -967,7 +967,8 @@ static MACHINE_CONFIG_START( next_base, next_state )
MCFG_NSCSI_BUS_ADD("scsibus")
MCFG_MCCS1850_ADD("rtc", XTAL_32_768kHz,
line_cb_t(), line_cb_t(), line_cb_t())
- MCFG_SCC8530_ADD("scc", XTAL_25MHz, line_cb_t(FUNC(next_state::scc_irq), static_cast<next_state *>(owner)))
+ MCFG_DEVICE_ADD("scc", SCC8530, XTAL_25MHz)
+ MCFG_Z8530_INTRQ_CALLBACK(WRITELINE(next_state, scc_irq))
MCFG_NEXTKBD_ADD("keyboard",
line_cb_t(FUNC(next_state::keyboard_irq), static_cast<next_state *>(owner)),
line_cb_t(FUNC(next_state::power_irq), static_cast<next_state *>(owner)),
diff --git a/src/mess/drivers/x68k.c b/src/mess/drivers/x68k.c
index 42a44029858..0c734c66201 100644
--- a/src/mess/drivers/x68k.c
+++ b/src/mess/drivers/x68k.c
@@ -1927,7 +1927,7 @@ static MACHINE_CONFIG_FRAGMENT( x68000_base )
MCFG_HD63450_ADD( "hd63450", dmac_interface )
- MCFG_SCC8530_ADD( "scc", 5000000, line_cb_t() )
+ MCFG_DEVICE_ADD( "scc", SCC8530, 5000000 )
MCFG_RP5C15_ADD(RP5C15_TAG, XTAL_32_768kHz, rtc_intf)
diff --git a/src/mess/includes/abc1600.h b/src/mess/includes/abc1600.h
index bcefc1e67d9..914680ab80f 100644
--- a/src/mess/includes/abc1600.h
+++ b/src/mess/includes/abc1600.h
@@ -138,8 +138,6 @@ public:
void update_drdy1();
void update_drdy2();
- void scc_irq(bool status);
-
// DMA
int m_dmadis;
int m_sysscc;
diff --git a/src/mess/includes/lisa.h b/src/mess/includes/lisa.h
index 96899ba3279..8f8619f4993 100644
--- a/src/mess/includes/lisa.h
+++ b/src/mess/includes/lisa.h
@@ -196,7 +196,6 @@ public:
DECLARE_READ16_MEMBER(lisa_IO_r);
DECLARE_WRITE16_MEMBER(lisa_IO_w);
- void set_scc_interrupt(bool value);
DECLARE_DRIVER_INIT(lisa210);
DECLARE_DRIVER_INIT(mac_xl);
DECLARE_DRIVER_INIT(lisa2);
diff --git a/src/mess/includes/mac.h b/src/mess/includes/mac.h
index c6aae19eeba..f6acd4b27bd 100644
--- a/src/mess/includes/mac.h
+++ b/src/mess/includes/mac.h
@@ -323,7 +323,7 @@ public:
void set_memory_overlay(int overlay);
void scc_mouse_irq( int x, int y );
void nubus_slot_interrupt(UINT8 slot, UINT32 state);
- void set_scc_interrupt(bool value);
+ DECLARE_WRITE_LINE_MEMBER(set_scc_interrupt);
void set_via_interrupt(int value);
void set_via2_interrupt(int value);
void field_interrupts();
diff --git a/src/mess/includes/next.h b/src/mess/includes/next.h
index f2a6d42945a..814430dee71 100644
--- a/src/mess/includes/next.h
+++ b/src/mess/includes/next.h
@@ -94,7 +94,7 @@ public:
UINT32 eventc_latch;
- void scc_irq(bool state);
+ DECLARE_WRITE_LINE_MEMBER(scc_irq);
void keyboard_irq(bool state);
void power_irq(bool state);
void nmi_irq(bool state);
diff --git a/src/mess/machine/8530scc.c b/src/mess/machine/8530scc.c
index bd4f30965d9..56ffbd30365 100644
--- a/src/mess/machine/8530scc.c
+++ b/src/mess/machine/8530scc.c
@@ -23,14 +23,12 @@ const device_type SCC8530 = &device_creator<scc8530_t>;
IMPLEMENTATION
***************************************************************************/
-scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) : device_t(mconfig, SCC8530, "Zilog 8530 SCC", tag, owner, clock, "scc8530", __FILE__)
+scc8530_t::scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) :
+ device_t(mconfig, SCC8530, "Zilog 8530 SCC", tag, owner, clock, "scc8530", __FILE__),
+ intrq_cb(*this)
{
}
-void scc8530_t::set_intrq_cb(line_cb_t cb)
-{
- intrq_cb = cb;
-}
/*-------------------------------------------------
scc_updateirqs
@@ -158,6 +156,8 @@ void scc8530_t::device_timer(emu_timer &timer, device_timer_id id, int param, vo
void scc8530_t::device_start()
{
+ intrq_cb.resolve();
+
memset(channel, 0, sizeof(channel));
mode = 0;
diff --git a/src/mess/machine/8530scc.h b/src/mess/machine/8530scc.h
index e6d0b2ad146..97db19978d0 100644
--- a/src/mess/machine/8530scc.h
+++ b/src/mess/machine/8530scc.h
@@ -9,9 +9,8 @@
#ifndef __8530SCC_H__
#define __8530SCC_H__
-#define MCFG_SCC8530_ADD(_tag, _clock, _intrq_cb) \
- MCFG_DEVICE_ADD(_tag, SCC8530, _clock) \
- downcast<scc8530_t *>(device)->set_intrq_cb(_intrq_cb);
+#define MCFG_Z8530_INTRQ_CALLBACK(_write) \
+ devcb = &scc8530_t::set_intrq_wr_callback(*device, DEVCB2_##_write);
class scc8530_t : public device_t
{
@@ -29,7 +28,8 @@ public:
};
scc8530_t(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock);
- void set_intrq_cb(line_cb_t cb);
+
+ template<class _Object> static devcb2_base &set_intrq_wr_callback(device_t &device, _Object object) { return downcast<scc8530_t &>(device).intrq_cb.set_callback(object); }
UINT8 get_reg_a(int reg);
UINT8 get_reg_b(int reg);
@@ -81,7 +81,7 @@ private:
Chan channel[2];
- line_cb_t intrq_cb;
+ devcb2_write_line intrq_cb;
void updateirqs();
void initchannel(int ch);
diff --git a/src/mess/machine/lisa.c b/src/mess/machine/lisa.c
index 949c842e559..721bb52140b 100644
--- a/src/mess/machine/lisa.c
+++ b/src/mess/machine/lisa.c
@@ -1932,7 +1932,3 @@ WRITE16_MEMBER(lisa_state::lisa_IO_w)
break;
}
}
-
-void lisa_state::set_scc_interrupt(bool value)
-{
-}
diff --git a/src/mess/machine/mac.c b/src/mess/machine/mac.c
index f1df6dee825..f02923073b4 100644
--- a/src/mess/machine/mac.c
+++ b/src/mess/machine/mac.c
@@ -242,9 +242,9 @@ void mac_state::field_interrupts()
}
}
-void mac_state::set_scc_interrupt(bool value)
+WRITE_LINE_MEMBER(mac_state::set_scc_interrupt)
{
- m_scc_interrupt = value;
+ m_scc_interrupt = state;
this->field_interrupts();
}