summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/bus/interpro/sr/edge.cpp6
-rw-r--r--src/devices/bus/interpro/sr/gt.cpp2
-rw-r--r--src/devices/bus/nubus/quadralink.cpp4
-rw-r--r--src/devices/bus/vme/hk68v10.cpp2
-rw-r--r--src/devices/machine/8530scc.cpp635
-rw-r--r--src/devices/machine/8530scc.h105
-rw-r--r--src/devices/machine/z80scc.cpp4
-rw-r--r--src/devices/machine/z80scc.h2
-rw-r--r--src/mame/acorn/aa310.cpp2
-rw-r--r--src/mame/apple/lisa.h4
-rw-r--r--src/mame/apple/lisa_m.cpp4
-rw-r--r--src/mame/apple/lwriter.cpp2
-rw-r--r--src/mame/apple/macquadra700.cpp2
-rw-r--r--src/mame/atari/atarist.cpp2
-rw-r--r--src/mame/ausnz/applix.cpp2
-rw-r--r--src/mame/barcrest/mpu4plasma.cpp2
-rw-r--r--src/mame/ceres/ceres.cpp2
-rw-r--r--src/mame/ibm/rtpc.cpp2
-rw-r--r--src/mame/informer/informer_213.cpp2
-rw-r--r--src/mame/luxor/abc1600.cpp2
-rw-r--r--src/mame/luxor/ds90.cpp6
-rw-r--r--src/mame/misc/hotstuff.cpp4
-rw-r--r--src/mame/misc/micro3d.cpp2
-rw-r--r--src/mame/misc/triplex.cpp2
-rw-r--r--src/mame/next/next.cpp4
-rw-r--r--src/mame/next/next.h4
-rw-r--r--src/mame/sharp/x68k.cpp2
-rw-r--r--src/mame/skeleton/clxvme186.cpp2
-rw-r--r--src/mame/skeleton/digilog320.cpp4
-rw-r--r--src/mame/skeleton/lft.cpp2
-rw-r--r--src/mame/sun/sun2.cpp8
-rw-r--r--src/mame/sun/sun3.cpp8
-rw-r--r--src/mame/sun/sun3x.cpp8
-rw-r--r--src/mame/tektronix/tekigw.cpp2
34 files changed, 53 insertions, 793 deletions
diff --git a/src/devices/bus/interpro/sr/edge.cpp b/src/devices/bus/interpro/sr/edge.cpp
index 45429a1e627..4d4df1113a1 100644
--- a/src/devices/bus/interpro/sr/edge.cpp
+++ b/src/devices/bus/interpro/sr/edge.cpp
@@ -478,7 +478,7 @@ void mpcb828_device::device_add_mconfig(machine_config &config)
BT458(config, "ramdac", 83'020'800);
- SCC8530N(config, m_scc, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc, 4.9152_MHz_XTAL);
m_scc->out_int_callback().set(FUNC(mpcb828_device::scc_irq));
m_scc->out_txda_callback().set("kbd", FUNC(interpro_keyboard_port_device::write_txd));
@@ -509,7 +509,7 @@ void mpcb849_device::device_add_mconfig(machine_config &config)
BT458(config, "ramdac", 0); // unconfirmed clock
- SCC8530N(config, m_scc, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc, 4.9152_MHz_XTAL);
m_scc->out_int_callback().set(FUNC(mpcb849_device::scc_irq));
m_scc->out_txda_callback().set("kbd", FUNC(interpro_keyboard_port_device::write_txd));
@@ -561,7 +561,7 @@ void msmt094_device::device_add_mconfig(machine_config &config)
//TMS32030(config, m_dsp3, 40_MHz_XTAL);
// FIXME: actually Z0853006VSC
- scc8530_device& scc(SCC8530N(config, "scc", 4.9152_MHz_XTAL));
+ scc8530_device& scc(SCC8530(config, "scc", 4.9152_MHz_XTAL));
scc.out_int_callback().set(FUNC(msmt094_device::scc_irq));
scc.out_txda_callback().set("kbd", FUNC(interpro_keyboard_port_device::write_txd));
diff --git a/src/devices/bus/interpro/sr/gt.cpp b/src/devices/bus/interpro/sr/gt.cpp
index bae9a72f739..5a7dc3c4639 100644
--- a/src/devices/bus/interpro/sr/gt.cpp
+++ b/src/devices/bus/interpro/sr/gt.cpp
@@ -309,7 +309,7 @@ void gtdb_device::device_add_mconfig(machine_config &config)
{
gt_device_base::device_add_mconfig(config);
- SCC8530N(config, m_scc, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc, 4.9152_MHz_XTAL);
interpro_keyboard_port_device &keyboard(INTERPRO_KEYBOARD_PORT(config, "kbd", interpro_keyboard_devices, "lle_en_us"));
keyboard.rxd_handler_cb().set(m_scc, FUNC(z80scc_device::rxa_w));
diff --git a/src/devices/bus/nubus/quadralink.cpp b/src/devices/bus/nubus/quadralink.cpp
index 0e6ecd1a567..7088c1df9de 100644
--- a/src/devices/bus/nubus/quadralink.cpp
+++ b/src/devices/bus/nubus/quadralink.cpp
@@ -39,11 +39,11 @@ DEFINE_DEVICE_TYPE(NUBUS_QUADRALINK, nubus_quadralink_device, "nb_qdlink", "Appl
void nubus_quadralink_device::device_add_mconfig(machine_config &config)
{
- SCC8530N(config, m_scc1, 3.6864_MHz_XTAL);
+ SCC8530(config, m_scc1, 3.6864_MHz_XTAL);
m_scc1->out_txda_callback().set("serport0", FUNC(rs232_port_device::write_txd));
m_scc1->out_txdb_callback().set("serport1", FUNC(rs232_port_device::write_txd));
- SCC8530N(config, m_scc2, 3.6864_MHz_XTAL);
+ SCC8530(config, m_scc2, 3.6864_MHz_XTAL);
m_scc2->out_txda_callback().set("serport2", FUNC(rs232_port_device::write_txd));
m_scc2->out_txdb_callback().set("serport3", FUNC(rs232_port_device::write_txd));
diff --git a/src/devices/bus/vme/hk68v10.cpp b/src/devices/bus/vme/hk68v10.cpp
index afee4bd1988..c821a421305 100644
--- a/src/devices/bus/vme/hk68v10.cpp
+++ b/src/devices/bus/vme/hk68v10.cpp
@@ -299,7 +299,7 @@ void vme_hk68v10_card_device::device_add_mconfig(machine_config &config)
Z8536(config, "cio", SCC_CLOCK);
/* Terminal Port config */
- SCC8530N(config, m_sccterm, SCC_CLOCK);
+ SCC8530(config, m_sccterm, SCC_CLOCK);
m_sccterm->out_txda_callback().set("rs232trm", FUNC(rs232_port_device::write_txd));
m_sccterm->out_dtra_callback().set("rs232trm", FUNC(rs232_port_device::write_dtr));
m_sccterm->out_rtsa_callback().set("rs232trm", FUNC(rs232_port_device::write_rts));
diff --git a/src/devices/machine/8530scc.cpp b/src/devices/machine/8530scc.cpp
deleted file mode 100644
index 72e438366db..00000000000
--- a/src/devices/machine/8530scc.cpp
+++ /dev/null
@@ -1,635 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:R. Belmont
-/*********************************************************************
-
- 8530scc.c
-
- Zilog 8530 SCC (Serial Control Chip) code
-
-*********************************************************************/
-
-
-#include "emu.h"
-#include "8530scc.h"
-
-DEFINE_DEVICE_TYPE(SCC8530, scc8530_legacy_device, "scc8530l", "Zilog 8530 SCC (legacy)")
-
-
-/***************************************************************************
- PARAMETERS
-***************************************************************************/
-
-#define VERBOSE (0)
-#include "logmacro.h"
-
-/***************************************************************************
- IMPLEMENTATION
-***************************************************************************/
-
-scc8530_legacy_device::scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock) :
- device_t(mconfig, SCC8530, tag, owner, clock),
- mode(0), reg(0), status(0), IRQV(0), MasterIRQEnable(0), lastIRQStat(0), IRQType(),
- intrq_cb(*this)
-{
-}
-
-
-/*-------------------------------------------------
- scc_updateirqs
--------------------------------------------------*/
-
-void scc8530_legacy_device::updateirqs()
-{
- int irqstat;
-
- irqstat = 0;
- if (MasterIRQEnable)
- {
- if ((channel[0].txIRQEnable) && (channel[0].txIRQPending))
- {
- IRQType = IRQ_B_TX;
- irqstat = 1;
- }
- else if ((channel[1].txIRQEnable) && (channel[1].txIRQPending))
- {
- IRQType = IRQ_A_TX;
- irqstat = 1;
- }
- else if ((channel[0].extIRQEnable) && (channel[0].extIRQPending))
- {
- IRQType = IRQ_B_EXT;
- irqstat = 1;
- }
- else if ((channel[1].extIRQEnable) && (channel[1].extIRQPending))
- {
- IRQType = IRQ_A_EXT;
- irqstat = 1;
- }
- }
- else
- {
- IRQType = IRQ_NONE;
- }
-
-// printf("SCC: irqstat %d, last %d\n", irqstat, lastIRQStat);
-// printf("ch0: en %d pd %d ch1: en %d pd %d\n", channel[0].txIRQEnable, channel[0].txIRQPending, channel[1].txIRQEnable, channel[1].txIRQPending);
-
- // don't spam the driver with unnecessary transitions
- if (irqstat != lastIRQStat)
- {
- lastIRQStat = irqstat;
-
- // tell the driver the new IRQ line status if possible
- LOG("SCC8530 IRQ status => %d\n", irqstat);
- intrq_cb(irqstat);
- }
-}
-
-/*-------------------------------------------------
- scc_initchannel
--------------------------------------------------*/
-void scc8530_legacy_device::initchannel(int ch)
-{
- channel[ch].syncHunt = 1;
-}
-
-/*-------------------------------------------------
- scc_resetchannel
--------------------------------------------------*/
-void scc8530_legacy_device::resetchannel(int ch)
-{
- emu_timer *timersave = channel[ch].baudtimer;
-
- memset(&channel[ch], 0, sizeof(Chan));
-
- channel[ch].txUnderrun = 1;
- channel[ch].baudtimer = timersave;
-
- channel[ch].baudtimer->adjust(attotime::never, ch);
-}
-
-/*-------------------------------------------------
- updatebaudtimer - baud rate timer calculation
--------------------------------------------------*/
-
-void scc8530_legacy_device::updatebaudtimer(int ch)
-{
- Chan *pChan = &channel[ch];
- // BR Generator Enable
- if(!BIT(pChan->reg_val[14], 0))
- {
- pChan->baudtimer->adjust(attotime::never, ch, attotime::never);
- return;
- }
-
- // BR Time Constant
- int brconst = pChan->reg_val[13] << 8 | pChan->reg_val[12];
-
- // Clock Mode is 1x, 16x, 32x, or 64x
- int clockmode = pChan->reg_val[4] >> 6;
- int clockrate = 1;
- if (clockmode)
- {
- clockrate = 8 << clockmode;
- }
-
- int baudrate = clock() / ((brconst + 2) * 2 * clockrate);
- attotime attorate = attotime::from_hz(baudrate);
- pChan->baudtimer->adjust(attorate, ch, attorate);
-}
-
-/*-------------------------------------------------
- baud_expire - baud rate timer expiry
--------------------------------------------------*/
-
-TIMER_CALLBACK_MEMBER(scc8530_legacy_device::baud_expire)
-{
- Chan *pChan = &channel[param];
-
- // always flag IRQ pending in case baud IRQ is enabled after this
- pChan->baudIRQPending = 1;
- if (pChan->baudIRQEnable)
- {
- if (pChan->extIRQEnable)
- {
- pChan->extIRQPending = 1;
- pChan->baudIRQPending = 0;
- updateirqs();
- }
- }
- updatebaudtimer(param);
-}
-
-/*-------------------------------------------------
- device_start - device-specific startup
--------------------------------------------------*/
-
-void scc8530_legacy_device::device_start()
-{
- memset(channel, 0, sizeof(channel));
-
- mode = 0;
- reg = 0;
- status = 0;
- IRQV = 0;
- MasterIRQEnable = 0;
- lastIRQStat = 0;
- IRQType = IRQ_NONE;
-
- channel[0].baudtimer = timer_alloc(FUNC(scc8530_legacy_device::baud_expire), this);
- channel[1].baudtimer = timer_alloc(FUNC(scc8530_legacy_device::baud_expire), this);
-}
-
-
-/*-------------------------------------------------
- device_reset - device-specific reset
--------------------------------------------------*/
-void scc8530_legacy_device::device_reset()
-{
- IRQType = IRQ_NONE;
- MasterIRQEnable = 0;
- IRQV = 0;
-
- initchannel(0);
- initchannel(1);
- resetchannel(0);
- resetchannel(1);
-}
-
-/*-------------------------------------------------
- scc_set_status
--------------------------------------------------*/
-
-void scc8530_legacy_device::set_status(int _status)
-{
- status = _status;
-}
-
-/*-------------------------------------------------
- scc_acknowledge
--------------------------------------------------*/
-
-void scc8530_legacy_device::acknowledge()
-{
- intrq_cb(0);
-}
-
-/*-------------------------------------------------
- scc_getareg
--------------------------------------------------*/
-
-uint8_t scc8530_legacy_device::getareg()
-{
- LOG("SCC: port A reg %d read 0x%02x\n", reg, channel[0].reg_val[reg]);
-
- if (reg == 0)
- {
- uint8_t rv = 0;
-
- Chan *ourCh = &channel[0];
-
- rv |= (ourCh->txUnderrun) ? 0x40 : 0;
- rv |= (ourCh->syncHunt) ? 0x10 : 0;
- rv |= channel[0].reg_val[0] & 0x0D; // pick up TXBE, RXBF, DCD bits
-
- return rv;
- }
- else if (reg == 10)
- {
- return 0;
- }
- return channel[0].reg_val[reg];
-}
-
-
-
-/*-------------------------------------------------
- scc_getareg
--------------------------------------------------*/
-
-uint8_t scc8530_legacy_device::getbreg()
-{
- LOG("SCC: port B reg %i read 0x%02x\n", reg, channel[1].reg_val[reg]);
-
- if (reg == 0)
- {
- uint8_t rv = 0;
-
- Chan *ourCh = &channel[1];
-
- rv |= (ourCh->txUnderrun) ? 0x40 : 0;
- rv |= (ourCh->syncHunt) ? 0x10 : 0;
- rv |= channel[1].reg_val[0] & 0x0D; // pick up TXBE, RXBF, DCD bits
-
- return rv;
- }
- else if (reg == 2)
- {
- /* HACK! but lets the Mac Plus mouse move again. Needs further investigation. */
- acknowledge();
-
- return status;
- }
- else if (reg == 10)
- {
- return 0;
- }
-
- return channel[1].reg_val[reg];
-}
-
-
-
-/*-------------------------------------------------
- scc_putreg
--------------------------------------------------*/
-
-void scc8530_legacy_device::putreg(int ch, uint8_t data)
-{
- Chan *pChan = &channel[ch];
-
- channel[ch].reg_val[reg] = data;
- LOG("SCC: port %c reg %d write 0x%02x\n", 'A'+ch, reg, data);
-
- switch (reg)
- {
- case 0: // command register
- switch ((data >> 3) & 7)
- {
- case 1: // select high registers (handled elsewhere)
- break;
-
- case 2: // reset external and status IRQs
- pChan->syncHunt = 0;
- break;
-
- case 5: // ack Tx IRQ
- pChan->txIRQPending = 0;
- updateirqs();
- break;
-
- case 0: // nothing
- case 3: // send SDLC abort
- case 4: // enable IRQ on next Rx byte
- case 6: // reset errors
- case 7: // reset highest IUS
- // we don't handle these yet
- break;
-
- }
- break;
-
- case 1: // Tx/Rx IRQ and data transfer mode defintion
- pChan->extIRQEnable = (data & 1);
- pChan->txIRQEnable = (data & 2) ? 1 : 0;
- pChan->rxIRQEnable = (data >> 3) & 3;
- updateirqs();
- break;
-
- case 2: // IRQ vector
- IRQV = data;
- break;
-
- case 3: // Rx parameters and controls
- pChan->rxEnable = (data & 1);
- pChan->syncHunt = (data & 0x10) ? 1 : 0;
- break;
-
- case 5: // Tx parameters and controls
-// printf("ch %d TxEnable = %d [%02x]\n", ch, data & 8, data);
- pChan->txEnable = data & 8;
-
- if (pChan->txEnable)
- {
- pChan->reg_val[0] |= 0x04; // Tx empty
- }
- break;
-
- case 4: // Tx/Rx misc parameters and modes
- case 6: // sync chars/SDLC address field
- case 7: // sync char/SDLC flag
- break;
-
- case 9: // master IRQ control
- MasterIRQEnable = (data & 8) ? 1 : 0;
- updateirqs();
-
- // channel reset command
- switch ((data>>6) & 3)
- {
- case 0: // do nothing
- break;
-
- case 1: // reset channel B
- resetchannel(0);
- break;
-
- case 2: // reset channel A
- resetchannel(1);
- break;
-
- case 3: // force h/w reset (entire chip)
- IRQType = IRQ_NONE;
- MasterIRQEnable = 0;
- IRQV = 0;
-
- initchannel(0);
- initchannel(1);
- resetchannel(0);
- resetchannel(1);
-
- // make sure we stop yanking the IRQ line if we were
- updateirqs();
- break;
-
- }
- break;
-
- case 10: // misc transmitter/receiver control bits
- case 11: // clock mode control
- case 12: // lower byte of baud rate gen
- case 13: // upper byte of baud rate gen
- break;
-
- case 14: // misc control bits
- updatebaudtimer(ch);
- break;
-
- case 15: // external/status interrupt control
- pChan->baudIRQEnable = (data & 2) ? 1 : 0;
- pChan->DCDEnable = (data & 8) ? 1 : 0;
- pChan->CTSEnable = (data & 0x20) ? 1 : 0;
- pChan->txUnderrunEnable = (data & 0x40) ? 1 : 0;
- break;
- }
-}
-
-/*-------------------------------------------------
- scc8530_get_reg_a
--------------------------------------------------*/
-
-uint8_t scc8530_legacy_device::get_reg_a(int reg)
-{
- return channel[0].reg_val[reg];
-}
-
-
-
-/*-------------------------------------------------
- scc8530_get_reg_b
--------------------------------------------------*/
-
-uint8_t scc8530_legacy_device::get_reg_b(int reg)
-{
- return channel[1].reg_val[reg];
-}
-
-
-
-/*-------------------------------------------------
- scc8530_set_reg_a
--------------------------------------------------*/
-
-void scc8530_legacy_device::set_reg_a(int reg, uint8_t data)
-{
- channel[0].reg_val[reg] = data;
-}
-
-
-
-/*-------------------------------------------------
- scc8530_set_reg_b
--------------------------------------------------*/
-
-void scc8530_legacy_device::set_reg_b(int reg, uint8_t data)
-{
- channel[1].reg_val[reg] = data;
-}
-
-
-
-//-------------------------------------------------
-// reg_r - read handler, trampolines into normal
-// getter
-//-------------------------------------------------
-
-uint8_t scc8530_legacy_device::reg_r(offs_t offset)
-{
- return read_reg(offset & 3);
-}
-
-
-
-//-------------------------------------------------
-// read_reg - reads either the control or data
-// port for either SCC channel.
-//-------------------------------------------------
-
-uint8_t scc8530_legacy_device::read_reg(int offset)
-{
- uint8_t result = 0;
-
- switch(offset)
- {
- case 0: /* Channel B (Printer Port) Control */
- case 1: /* Channel A (Modem Port) Control */
-
- if (mode == 1)
- mode = 0;
- else
- reg = 0;
-
- result = (offset == 0) ? getbreg() : getareg();
- break;
-
- case 2: /* Channel B (Printer Port) Data */
- case 3:/* Channel A (Modem Port) Data */
- result = channel[offset == 2 ? 1 : 0].rxData;
- break;
- }
- return result;
-}
-
-
-
-//-------------------------------------------------
-// reg_w - write handler, trampolines into normal
-// setter
-//-------------------------------------------------
-
-void scc8530_legacy_device::reg_w(offs_t offset, uint8_t data)
-{
- write_reg(offset & 3, data);
-}
-
-
-
-//-------------------------------------------------
-// write_reg - writes either the control or data
-// port for either SCC channel.
-//-------------------------------------------------
-
-void scc8530_legacy_device::write_reg(int offset, uint8_t data)
-{
- //offset & 3;
-
-// printf(" mode %d data %x offset %d \n", mode, data, offset);
-
- //Chan *pChan;
- switch(offset)
- {
- case 0: /* Channel B (Printer Port) Control */
- case 1: /* Channel A (Modem Port) Control */
- {
- int chan = ((offset == 0) ? 1 : 0);
- if (mode == 0)
- {
- if((data & 0xf0) == 0) // not a reset command
- {
- mode = 1;
- reg = data & 0x0f;
-// putbreg(data & 0xf0);
- }
- else if (data == 0x10)
- {
- // clear ext. interrupts
- channel[chan].extIRQPending = 0;
- channel[chan].baudIRQPending = 0;
- updateirqs();
- }
- }
- else
- {
- mode = 0;
- putreg(chan, data);
- }
- break;
- }
-
- case 2: /* Channel B (Printer Port) Data */
- case 3: /* Channel A (Modem Port) Data */
- {
- int chan = ((offset == 2) ? 1 : 0);
- if (channel[chan].txEnable)
- {
- channel[chan].txData = data;
- // local loopback?
- if (channel[chan].reg_val[14] & 0x10)
- {
- channel[chan].rxData = data;
- channel[chan].reg_val[0] |= 0x01; // Rx character available
- }
- channel[chan].reg_val[1] |= 0x01; // All sent
- channel[chan].reg_val[0] |= 0x04; // Tx empty
- channel[chan].txUnderrun = 1;
- channel[chan].txIRQPending = 1;
- updateirqs();
- }
- break;
- }
- }
-}
-
-
-/*
-
-AppleTalk check:
-
-SCC: port B reg 9 write 0x40 Channel Reset B
-SCC: port B reg 4 write 0x20 SDLC mode
-SCC: port B reg 10 write 0xe0 CRC preset + FM0
-SCC: port B reg 6 write 0x00 SDLC address
-SCC: port B reg 7 write 0x7e SDLC flag
-SCC: port B reg 12 write 0x06 baud rate low
-SCC: port B reg 13 write 0x00 baud rate high
-SCC: port B reg 14 write 0xc0 Set FM mode
-SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
-SCC: port B reg 2 write 0x00 interrupt vector 0
-SCC: port B reg 15 write 0x08 DCD interrupt enable
-SCC: port B reg 1 write 0x09 Rx IRQ on first char or special, ext int enable
-SCC: port B reg 9 write 0x0a Master IRQ enable, no-vector mode
-SCC: port B reg 11 write 0x70 Rx clock = DPLL output, Tx clock = BR generator
-SCC: port B reg 14 write 0x21 Enter search mode, BR generator enable
-SCC: port B reg 5 write 0x60 Tx 8 bits/char
-SCC: port B reg 6 write 0x2a SDLC address
-SCC: port B reg 0 read 0x00
-SCC: port B reg 15 write 0x88 DCD interrupt enable, break/abort interrupt enable
-
-(repeats)
-SCC: port B reg 1 read 0x09
-SCC: port B reg 3 write 0xd0
-SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
-SCC: port B reg 15 write 0x08 DCD interrupt enable
-SCC: port B reg 0 read 0x00
-SCC: port B reg 15 write 0x88
-
-System 7:
-
-SCC: port B reg 9 write 0x40 Channel Reset B
-SCC: port B reg 4 write 0x20 SDLC mode
-SCC: port B reg 10 write 0xe0 CRC preset + FM0
-SCC: port B reg 6 write 0x00 SDLC address
-SCC: port B reg 7 write 0x7e SDLC flag
-SCC: port B reg 12 write 0x06 baud rate low
-SCC: port B reg 13 write 0x00 baud rate high
-SCC: port B reg 14 write 0xc0 Set FM mode
-SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
-SCC: port B reg 2 write 0x00 interrupt vector 0
-SCC: port B reg 15 write 0x08 DCD interrupt enable
-SCC: port B reg 1 write 0x09 Rx IRQ on first char or special, ext int enable
-SCC: port B reg 9 write 0x0a Master IRQ enable, no-vector mode
-SCC: port B reg 11 write 0x70 Rx clock = DPLL output, Tx clock = BR generator
-SCC: port B reg 14 write 0x21 Enter search mode, BR generator enable
-SCC: port B reg 5 write 0x60 Tx 8 bits/char
-SCC: port B reg 6 write 0x01 SDLC address
-SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
-
-(repeats)
-
-SCC: port B reg 0 read 0x00
-SCC: port B reg 15 write 0x88 DCD interrupt enable, break/abort interrupt enable
-SCC: port B reg 15 write 0x08 DCD interrupt enable
-SCC: port B reg 1 read 0x09 Rx IRQ on first char or special, ext int enable
-SCC: port B reg 3 write 0xdd Rx 8 bits, enter hunt mode, CRC enable, address search mode, Rx enable
-
-*/
diff --git a/src/devices/machine/8530scc.h b/src/devices/machine/8530scc.h
deleted file mode 100644
index cb2bd8d92eb..00000000000
--- a/src/devices/machine/8530scc.h
+++ /dev/null
@@ -1,105 +0,0 @@
-// license:BSD-3-Clause
-// copyright-holders:R. Belmont
-/*********************************************************************
-
- 8530scc.h
-
- Zilog 8530 SCC (Serial Control Chip) code
-
-*********************************************************************/
-
-#ifndef MAME_MACHINE_8530SCC_H
-#define MAME_MACHINE_8530SCC_H
-
-class scc8530_legacy_device : public device_t
-{
-public:
- enum IRQType_t {
- IRQ_NONE,
- IRQ_A_RX,
- IRQ_A_RX_SPECIAL,
- IRQ_B_RX,
- IRQ_B_RX_SPECIAL,
- IRQ_A_TX,
- IRQ_B_TX,
- IRQ_A_EXT,
- IRQ_B_EXT
- };
-
- scc8530_legacy_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock);
-
- auto intrq_callback() { return intrq_cb.bind(); }
-
- uint8_t get_reg_a(int reg);
- uint8_t get_reg_b(int reg);
- void set_reg_a(int reg, uint8_t data);
- void set_reg_b(int reg, uint8_t data);
-
- void set_status(int status);
-
- uint8_t reg_r(offs_t offset);
- void reg_w(offs_t offset, uint8_t data);
-
- void write_reg(int offset, uint8_t data);
- uint8_t read_reg(int offset);
-
-protected:
- virtual void device_start() override ATTR_COLD;
- virtual void device_reset() override ATTR_COLD;
-
- TIMER_CALLBACK_MEMBER(baud_expire);
-
-private:
- struct Chan {
- bool txIRQEnable;
- bool rxIRQEnable;
- bool extIRQEnable;
- bool baudIRQEnable;
- bool txIRQPending;
- bool rxIRQPending;
- bool extIRQPending;
- bool baudIRQPending;
- bool txEnable;
- bool rxEnable;
- bool txUnderrun;
- bool txUnderrunEnable;
- bool syncHunt;
- bool DCDEnable;
- bool CTSEnable;
- uint8_t rxData;
- uint8_t txData;
-
- emu_timer *baudtimer;
-
- uint8_t reg_val[16];
- };
-
- int mode;
- int reg;
- int status;
- int IRQV;
- int MasterIRQEnable;
- int lastIRQStat;
- IRQType_t IRQType;
-
- Chan channel[2];
-
- devcb_write_line intrq_cb;
-
- void updatebaudtimer(int ch);
- void updateirqs();
- void initchannel(int ch);
- void resetchannel(int ch);
- void acknowledge();
- uint8_t getareg();
- uint8_t getbreg();
- void putreg(int ch, uint8_t data);
-};
-
-/***************************************************************************
- MACROS
-***************************************************************************/
-
-DECLARE_DEVICE_TYPE(SCC8530, scc8530_legacy_device)
-
-#endif // MAME_MACHINE_8530SCC_H
diff --git a/src/devices/machine/z80scc.cpp b/src/devices/machine/z80scc.cpp
index 30b658e354b..3af007c9972 100644
--- a/src/devices/machine/z80scc.cpp
+++ b/src/devices/machine/z80scc.cpp
@@ -374,7 +374,7 @@ DEFINE_DEVICE_TYPE(Z80SCC_CHANNEL, z80scc_channel, "z80scc_channel", "Z80 SCC C
DEFINE_DEVICE_TYPE(SCC8030, scc8030_device, "scc8030", "Zilog Z8030 SCC")
DEFINE_DEVICE_TYPE(SCC80C30, scc80c30_device, "scc80c30", "Zilog Z80C30 SCC")
DEFINE_DEVICE_TYPE(SCC80230, scc80230_device, "scc80230", "Zilog Z80230 ESCC")
-DEFINE_DEVICE_TYPE(SCC8530N, scc8530_device, "scc8530", "Zilog Z8530 SCC") // remove trailing N when 8530scc.c is fully replaced and removed
+DEFINE_DEVICE_TYPE(SCC8530, scc8530_device, "scc8530", "Zilog Z8530 SCC")
DEFINE_DEVICE_TYPE(SCC85C30, scc85c30_device, "scc85c30", "Zilog Z85C30 SCC")
DEFINE_DEVICE_TYPE(SCC85230, scc85230_device, "scc85230", "Zilog Z85230 ESCC")
DEFINE_DEVICE_TYPE(SCC85233, scc85233_device, "scc85233", "Zilog Z85233 EMSCC")
@@ -455,7 +455,7 @@ scc80230_device::scc80230_device(const machine_config &mconfig, const char *tag,
}
scc8530_device::scc8530_device(const machine_config &mconfig, const char *tag, device_t *owner, uint32_t clock)
- : z80scc_device(mconfig, SCC8530N, tag, owner, clock, TYPE_SCC8530)
+ : z80scc_device(mconfig, SCC8530, tag, owner, clock, TYPE_SCC8530)
{
}
diff --git a/src/devices/machine/z80scc.h b/src/devices/machine/z80scc.h
index b193037b720..40b7984718a 100644
--- a/src/devices/machine/z80scc.h
+++ b/src/devices/machine/z80scc.h
@@ -512,7 +512,7 @@ DECLARE_DEVICE_TYPE(Z80SCC_CHANNEL, z80scc_channel)
DECLARE_DEVICE_TYPE(SCC8030, scc8030_device)
DECLARE_DEVICE_TYPE(SCC80C30, scc80c30_device)
DECLARE_DEVICE_TYPE(SCC80230, scc80230_device)
-DECLARE_DEVICE_TYPE(SCC8530N, scc8530_device) // remove trailing N when 8530scc.c is fully replaced and removed
+DECLARE_DEVICE_TYPE(SCC8530, scc8530_device)
DECLARE_DEVICE_TYPE(SCC85C30, scc85c30_device)
DECLARE_DEVICE_TYPE(SCC85230, scc85230_device)
DECLARE_DEVICE_TYPE(SCC85233, scc85233_device)
diff --git a/src/mame/acorn/aa310.cpp b/src/mame/acorn/aa310.cpp
index 229ab883dd8..e25f06fc762 100644
--- a/src/mame/acorn/aa310.cpp
+++ b/src/mame/acorn/aa310.cpp
@@ -1335,7 +1335,7 @@ void aa680_state::aa680(machine_config &config)
m_cent_ctrl_out->bit_handler<3>().set(m_centronics, FUNC(centronics_device::write_ack));
m_cent_ctrl_out->bit_handler<4>().set(m_centronics, FUNC(centronics_device::write_busy));
- scc8530_device &scc(SCC8530N(config, "scc", 3.6864_MHz_XTAL));
+ scc8530_device &scc(SCC8530(config, "scc", 3.6864_MHz_XTAL));
scc.out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd));
scc.out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr));
scc.out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts));
diff --git a/src/mame/apple/lisa.h b/src/mame/apple/lisa.h
index 5fd8e4872b6..065212287c5 100644
--- a/src/mame/apple/lisa.h
+++ b/src/mame/apple/lisa.h
@@ -16,7 +16,7 @@
#include "machine/74259.h"
#include "machine/6522via.h"
#include "machine/6522via.h"
-#include "machine/8530scc.h"
+#include "machine/z80scc.h"
#include "machine/applefdintf.h"
#include "machine/iwm.h"
#include "machine/nvram.h"
@@ -144,7 +144,7 @@ private:
required_device<via6522_device> m_via1;
required_device<applefdintf_device> m_fdc;
required_device_array<floppy_connector, 2> m_floppy;
- required_device<scc8530_legacy_device> m_scc;
+ required_device<scc8530_device> m_scc;
required_device<speaker_sound_device> m_speaker;
required_device<nvram_device> m_nvram;
required_device<ls259_device> m_latch;
diff --git a/src/mame/apple/lisa_m.cpp b/src/mame/apple/lisa_m.cpp
index a5d6485e155..fa217b4b7a7 100644
--- a/src/mame/apple/lisa_m.cpp
+++ b/src/mame/apple/lisa_m.cpp
@@ -1674,7 +1674,7 @@ uint16_t lisa_state::lisa_IO_r(offs_t offset, uint16_t mem_mask)
switch ((offset & 0x0600) >> 9)
{
case 0: /* serial ports control */
- answer = m_scc->reg_r(offset&7);
+ answer = m_scc->dc_ab_r(offset&3);
break;
case 2: /* parallel port */
@@ -1798,7 +1798,7 @@ void lisa_state::lisa_IO_w(offs_t offset, uint16_t data, uint16_t mem_mask)
switch ((offset & 0x0600) >> 9)
{
case 0: /* serial ports control */
- m_scc->reg_w(offset&7, data);
+ m_scc->dc_ab_w(offset&3, data);
break;
case 2: /* paralel port */
diff --git a/src/mame/apple/lwriter.cpp b/src/mame/apple/lwriter.cpp
index cd1fc1d69ce..3749b4da7a8 100644
--- a/src/mame/apple/lwriter.cpp
+++ b/src/mame/apple/lwriter.cpp
@@ -660,7 +660,7 @@ void lwriter_state::lwriter(machine_config &config)
m_screen->set_visarea_full();
m_screen->set_screen_update(FUNC(lwriter_state::screen_update));
- SCC8530N(config, m_scc, CPU_CLK);
+ SCC8530(config, m_scc, CPU_CLK);
m_scc->configure_channels(RXC_CLK, 0, RXC_CLK, 0);
/* Port A */
m_scc->out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd));
diff --git a/src/mame/apple/macquadra700.cpp b/src/mame/apple/macquadra700.cpp
index 99ab89c45a5..1cfbe1b7946 100644
--- a/src/mame/apple/macquadra700.cpp
+++ b/src/mame/apple/macquadra700.cpp
@@ -737,7 +737,7 @@ void eclipse_state::via2_out_b_q900(u8 data)
applefdintf_device::add_35_hd(config, m_floppy[0]);
applefdintf_device::add_35_nc(config, m_floppy[1]);
- SCC8530N(config, m_scc, C7M);
+ SCC8530(config, m_scc, C7M);
m_scc->configure_channels(3'686'400, 3'686'400, 3'686'400, 3'686'400);
m_scc->out_txda_callback().set("printer", FUNC(rs232_port_device::write_txd));
m_scc->out_txdb_callback().set("modem", FUNC(rs232_port_device::write_txd));
diff --git a/src/mame/atari/atarist.cpp b/src/mame/atari/atarist.cpp
index 5a742547564..81470df514c 100644
--- a/src/mame/atari/atarist.cpp
+++ b/src/mame/atari/atarist.cpp
@@ -16,7 +16,7 @@
#include "cpu/m68000/m68000.h"
#include "imagedev/floppy.h"
#include "machine/6850acia.h"
-#include "machine/8530scc.h"
+#include "machine/z80scc.h"
#include "machine/clock.h"
#include "machine/input_merger.h"
#include "machine/mc68901.h"
diff --git a/src/mame/ausnz/applix.cpp b/src/mame/ausnz/applix.cpp
index fb498efc53d..47bf2659a34 100644
--- a/src/mame/ausnz/applix.cpp
+++ b/src/mame/ausnz/applix.cpp
@@ -909,7 +909,7 @@ void applix_state::applix(machine_config &config)
FLOPPY_CONNECTOR(config, m_floppy[1], applix_floppies, "35dd", applix_state::floppy_formats).enable_sound(true);
TIMER(config, "applix_c").configure_periodic(FUNC(applix_state::cass_timer), attotime::from_hz(100000));
- scc8530_device &scc(SCC8530N(config, "scc", 30_MHz_XTAL / 8));
+ scc8530_device &scc(SCC8530(config, "scc", 30_MHz_XTAL / 8));
scc.out_txda_callback().set("serial_a", FUNC(rs232_port_device::write_txd));
scc.out_rtsa_callback().set("serial_a", FUNC(rs232_port_device::write_rts));
scc.out_dtra_callback().set("serial_a", FUNC(rs232_port_device::write_dtr));
diff --git a/src/mame/barcrest/mpu4plasma.cpp b/src/mame/barcrest/mpu4plasma.cpp
index 228846f983d..0bb01fd2a1e 100644
--- a/src/mame/barcrest/mpu4plasma.cpp
+++ b/src/mame/barcrest/mpu4plasma.cpp
@@ -87,7 +87,7 @@ void mpu4plasma_state::mpu4plasma_f(machine_config &config)
m68000_device &plasmacpu(M68000(config, "plasmacpu", 10000000));
plasmacpu.set_addrmap(AS_PROGRAM, &mpu4plasma_state::mpu4plasma_map);
- SCC8530N(config, "scc", 4915200).out_int_callback().set_inputline("plasmacpu", 4);
+ SCC8530(config, "scc", 4915200).out_int_callback().set_inputline("plasmacpu", 4);
screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER));
screen.set_refresh_hz(60);
diff --git a/src/mame/ceres/ceres.cpp b/src/mame/ceres/ceres.cpp
index a8edd2c1ec5..acc1cd3fb96 100644
--- a/src/mame/ceres/ceres.cpp
+++ b/src/mame/ceres/ceres.cpp
@@ -369,7 +369,7 @@ void ceres1_state::ceres1(machine_config &config)
m_serial->dsr_handler().set(m_uart, FUNC(scn2681_device::ip2_w));
// TODO: RS-485 ports "na" and "nb"
- SCC8530N(config, m_scc, 6_MHz_XTAL);
+ SCC8530(config, m_scc, 6_MHz_XTAL);
m_scc->configure_channels(m_uart->clock(), 0, m_uart->clock(), 0);
m_scc->out_int_callback().set(m_icu, FUNC(am9519_device::ireq1_w)).invert();
diff --git a/src/mame/ibm/rtpc.cpp b/src/mame/ibm/rtpc.cpp
index ca41db76ee3..d03edb69da3 100644
--- a/src/mame/ibm/rtpc.cpp
+++ b/src/mame/ibm/rtpc.cpp
@@ -763,7 +763,7 @@ void rtpc_state::ibm6150(machine_config &config)
common(config);
m_iocc->set_addrmap(2, &rtpc_state::iocc_pio_map<true>);
- SCC8530N(config, m_scc, 3'580'000);
+ SCC8530(config, m_scc, 3'580'000);
m_scc->configure_channels(3'072'000, 3'072'000, 3'072'000, 3'072'000);
m_scc->out_int_callback().set(m_pic[0], FUNC(pic8259_device::ir6_w));
diff --git a/src/mame/informer/informer_213.cpp b/src/mame/informer/informer_213.cpp
index 124108d7590..56d02e986d2 100644
--- a/src/mame/informer/informer_213.cpp
+++ b/src/mame/informer/informer_213.cpp
@@ -408,7 +408,7 @@ void informer_213_state::informer_213(machine_config &config)
NVRAM(config, m_nvram[0], nvram_device::DEFAULT_ALL_0);
NVRAM(config, m_nvram[1], nvram_device::DEFAULT_ALL_0);
- SCC8530N(config, m_scc, 18.432_MHz_XTAL / 5);
+ SCC8530(config, m_scc, 18.432_MHz_XTAL / 5);
m_scc->out_txda_callback().set("host", FUNC(rs232_port_device::write_txd));
m_scc->out_dtra_callback().set("host", FUNC(rs232_port_device::write_dtr));
m_scc->out_rtsa_callback().set("host", FUNC(rs232_port_device::write_rts));
diff --git a/src/mame/luxor/abc1600.cpp b/src/mame/luxor/abc1600.cpp
index b49a7da6a5b..c96160ad054 100644
--- a/src/mame/luxor/abc1600.cpp
+++ b/src/mame/luxor/abc1600.cpp
@@ -986,7 +986,7 @@ void abc1600_state::abc1600(machine_config &config)
//rs232pr.rts_handler().set(m_dart, FUNC(z80dart_device::ctsa_w));
//rs232pr.dtr_handler().set(m_dart, FUNC(z80dart_device::dcda_w));
- SCC8530N(config, m_scc, 64_MHz_XTAL / 16);
+ SCC8530(config, m_scc, 64_MHz_XTAL / 16);
m_scc->out_int_callback().set(FUNC(abc1600_state::scc_irq_w));
m_scc->out_wreqa_callback().set(FUNC(abc1600_state::sccrq_a_w));
m_scc->out_wreqb_callback().set(FUNC(abc1600_state::sccrq_b_w));
diff --git a/src/mame/luxor/ds90.cpp b/src/mame/luxor/ds90.cpp
index 1f98f52e293..8c5618312f4 100644
--- a/src/mame/luxor/ds90.cpp
+++ b/src/mame/luxor/ds90.cpp
@@ -121,9 +121,9 @@ void x37_state::x37(machine_config &config)
NMC9306(config, m_nvram, 0);
E0516(config, E050_16_TAG, 32'768);
- SCC8530N(config, m_scc[0], 6000000);
- SCC8530N(config, m_scc[1], 6000000);
- SCC8530N(config, m_scc[2], 6000000);
+ SCC8530(config, m_scc[0], 6000000);
+ SCC8530(config, m_scc[1], 6000000);
+ SCC8530(config, m_scc[2], 6000000);
FD1797(config, m_fdc, 16'000'000/16);
diff --git a/src/mame/misc/hotstuff.cpp b/src/mame/misc/hotstuff.cpp
index 5cd6a809160..bcd281983c4 100644
--- a/src/mame/misc/hotstuff.cpp
+++ b/src/mame/misc/hotstuff.cpp
@@ -108,10 +108,10 @@ void hotstuff_state::hotstuff(machine_config &config)
PALETTE(config, "palette").set_entries(0x200);
- scc8530_device &scc1(SCC8530N(config, "scc1", 4915200));
+ scc8530_device &scc1(SCC8530(config, "scc1", 4915200));
scc1.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_4);
- scc8530_device &scc2(SCC8530N(config, "scc2", 4915200));
+ scc8530_device &scc2(SCC8530(config, "scc2", 4915200));
scc2.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_5);
mc146818_device &rtc(MC146818(config, "rtc", XTAL(32'768)));
diff --git a/src/mame/misc/micro3d.cpp b/src/mame/misc/micro3d.cpp
index 86766148cc5..e57e0c56cae 100644
--- a/src/mame/misc/micro3d.cpp
+++ b/src/mame/misc/micro3d.cpp
@@ -327,7 +327,7 @@ void micro3d_state::micro3d(machine_config &config)
m_drmath->set_addrmap(AS_PROGRAM, &micro3d_state::drmath_prg);
m_drmath->set_addrmap(AS_DATA, &micro3d_state::drmath_data);
- scc8530_device &scc(SCC8530N(config, "scc", 32_MHz_XTAL / 2 / 2));
+ scc8530_device &scc(SCC8530(config, "scc", 32_MHz_XTAL / 2 / 2));
scc.out_txdb_callback().set("monitor_drmath", FUNC(rs232_port_device::write_txd));
I8051(config, m_audiocpu, 11.0592_MHz_XTAL);
diff --git a/src/mame/misc/triplex.cpp b/src/mame/misc/triplex.cpp
index 9ae0a68b363..897d955906f 100644
--- a/src/mame/misc/triplex.cpp
+++ b/src/mame/misc/triplex.cpp
@@ -329,7 +329,7 @@ void triplex_state::triplex(machine_config &config)
downcast<ncr5380_device&>(*device).drq_handler().set(":dmac", FUNC(hd63450_device::drq0_w));
});
- scc8530_device &scc(SCC8530N(config, "scc", 4.9152_MHz_XTAL));
+ scc8530_device &scc(SCC8530(config, "scc", 4.9152_MHz_XTAL));
scc.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_5);
scc.out_wreqa_callback().set("dmac", FUNC(hd63450_device::drq1_w));
scc.out_dtra_callback().set("dmac", FUNC(hd63450_device::drq2_w));
diff --git a/src/mame/next/next.cpp b/src/mame/next/next.cpp
index 80e911f736c..dbba0b38063 100644
--- a/src/mame/next/next.cpp
+++ b/src/mame/next/next.cpp
@@ -908,7 +908,7 @@ void next_state::next_mem(address_map &map)
map(0x02014020, 0x02014023).mirror(0x300000).rw(FUNC(next_state::scsictrl_r), FUNC(next_state::scsictrl_w));
map(0x02016000, 0x02016003).mirror(0x300000).rw(FUNC(next_state::timer_data_r), FUNC(next_state::timer_data_w));
map(0x02016004, 0x02016007).mirror(0x300000).rw(FUNC(next_state::timer_ctrl_r), FUNC(next_state::timer_ctrl_w));
- map(0x02018000, 0x02018003).mirror(0x300000).rw(scc, FUNC(scc8530_legacy_device::reg_r), FUNC(scc8530_legacy_device::reg_w));
+ map(0x02018000, 0x02018003).mirror(0x300000).rw(scc, FUNC(scc8530_device::dc_ab_r), FUNC(scc8530_device::dc_ab_w));
// map(0x02018004, 0x02018007).mirror(0x300000); SCC CLK
// map(0x02018190, 0x02018197).mirror(0x300000); warp 9c DRAM timing
// map(0x02018198, 0x0201819f).mirror(0x300000); warp 9c VRAM timing
@@ -1036,7 +1036,7 @@ void next_state::next_base(machine_config &config)
MCCS1850(config, rtc, XTAL(32'768));
SCC8530(config, scc, XTAL(25'000'000));
- scc->intrq_callback().set(FUNC(next_state::scc_irq));
+ scc->out_int_callback().set(FUNC(next_state::scc_irq));
NEXTKBD(config, keyboard, 0);
keyboard->int_change_wr_callback().set(FUNC(next_state::keyboard_irq));
diff --git a/src/mame/next/next.h b/src/mame/next/next.h
index be5bef74d0f..78c8fd87b2b 100644
--- a/src/mame/next/next.h
+++ b/src/mame/next/next.h
@@ -10,7 +10,7 @@
#include "imagedev/floppy.h"
#include "machine/nscsi_bus.h"
#include "machine/mccs1850.h"
-#include "machine/8530scc.h"
+#include "machine/z80scc.h"
#include "nextkbd.h"
#include "machine/upd765.h"
#include "machine/ncr53c90.h"
@@ -65,7 +65,7 @@ public:
private:
required_device<cpu_device> maincpu;
required_device<mccs1850_device> rtc;
- required_device<scc8530_legacy_device> scc;
+ required_device<scc8530_device> scc;
required_device<nextkbd_device> keyboard;
required_device<nscsi_bus_device> scsibus;
required_device<ncr53c90_device> scsi;
diff --git a/src/mame/sharp/x68k.cpp b/src/mame/sharp/x68k.cpp
index c6787eeef39..3a49c788a9f 100644
--- a/src/mame/sharp/x68k.cpp
+++ b/src/mame/sharp/x68k.cpp
@@ -1139,7 +1139,7 @@ void x68k_state::x68000_base(machine_config &config)
m_hd63450->dma_read<0>().set("upd72065", FUNC(upd72065_device::dma_r));
m_hd63450->dma_write<0>().set("upd72065", FUNC(upd72065_device::dma_w));
- SCC8530N(config, m_scc, 40_MHz_XTAL / 8);
+ SCC8530(config, m_scc, 40_MHz_XTAL / 8);
m_scc->out_int_callback().set([this](int state) { m_scc_int = state; update_ipl(); });
rs232_port_device &mouse(RS232_PORT(config, "mouse_port", mouse_devices, "x68k"));
diff --git a/src/mame/skeleton/clxvme186.cpp b/src/mame/skeleton/clxvme186.cpp
index 54064aed71b..d8ac6f00611 100644
--- a/src/mame/skeleton/clxvme186.cpp
+++ b/src/mame/skeleton/clxvme186.cpp
@@ -103,7 +103,7 @@ void clxvme186_state::clxvme186(machine_config &config)
m_maincpu->set_addrmap(AS_PROGRAM, &clxvme186_state::mem_map);
m_maincpu->set_addrmap(AS_IO, &clxvme186_state::io_map);
- SCC8530N(config, "scc", 3.6864_MHz_XTAL);
+ SCC8530(config, "scc", 3.6864_MHz_XTAL);
M3000(config, "rtc", 32.768_kHz_XTAL);
diff --git a/src/mame/skeleton/digilog320.cpp b/src/mame/skeleton/digilog320.cpp
index 90cb8ed2ee6..3286933c781 100644
--- a/src/mame/skeleton/digilog320.cpp
+++ b/src/mame/skeleton/digilog320.cpp
@@ -387,9 +387,9 @@ void digilog320_state::digilog320(machine_config &config)
I8251(config, "usart", 0);
- SCC8530N(config, m_scc[0], 3.6864_MHz_XTAL);
+ SCC8530(config, m_scc[0], 3.6864_MHz_XTAL);
- SCC8530N(config, m_scc[1], 3.6864_MHz_XTAL);
+ SCC8530(config, m_scc[1], 3.6864_MHz_XTAL);
MB8877(config, m_fdc, 16_MHz_XTAL / 16);
m_fdc->intrq_wr_callback().set(m_maincpu, FUNC(i80186_cpu_device::int3_w));
diff --git a/src/mame/skeleton/lft.cpp b/src/mame/skeleton/lft.cpp
index 87dedb8eeee..ea9a80f9874 100644
--- a/src/mame/skeleton/lft.cpp
+++ b/src/mame/skeleton/lft.cpp
@@ -94,7 +94,7 @@ void lft_state::lft(machine_config &config)
// Devices
MM58167(config, m_rtc, 32.768_kHz_XTAL);
- SCC8530N(config, m_scc, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc, 4.9152_MHz_XTAL);
m_scc->out_txda_callback().set("rs232a", FUNC(rs232_port_device::write_txd));
m_scc->out_dtra_callback().set("rs232a", FUNC(rs232_port_device::write_dtr));
m_scc->out_rtsa_callback().set("rs232a", FUNC(rs232_port_device::write_rts));
diff --git a/src/mame/sun/sun2.cpp b/src/mame/sun/sun2.cpp
index 8e8a1769c3a..139b7193ad0 100644
--- a/src/mame/sun/sun2.cpp
+++ b/src/mame/sun/sun2.cpp
@@ -720,8 +720,8 @@ void sun2_state::sun2vme(machine_config &config)
INPUT_MERGER_ANY_HIGH(config, "irq5").output_handler().set_inputline(m_maincpu, M68K_IRQ_5); // 74LS05 open collectors
- SCC8530N(config, SCC1_TAG, 19.6608_MHz_XTAL / 4);
- scc8530_device& scc2(SCC8530N(config, SCC2_TAG, 19.6608_MHz_XTAL / 4));
+ SCC8530(config, SCC1_TAG, 19.6608_MHz_XTAL / 4);
+ scc8530_device& scc2(SCC8530(config, SCC2_TAG, 19.6608_MHz_XTAL / 4));
scc2.out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd));
scc2.out_txdb_callback().set(RS232B_TAG, FUNC(rs232_port_device::write_txd));
scc2.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_6);
@@ -772,8 +772,8 @@ void sun2_state::sun2mbus(machine_config &config)
INPUT_MERGER_ANY_HIGH(config, "irq5").output_handler().set_inputline(m_maincpu, M68K_IRQ_5); // 74LS05 open collectors
- SCC8530N(config, SCC1_TAG, 39.3216_MHz_XTAL / 8);
- scc8530_device& scc2(SCC8530N(config, SCC2_TAG, 39.3216_MHz_XTAL / 8));
+ SCC8530(config, SCC1_TAG, 39.3216_MHz_XTAL / 8);
+ scc8530_device& scc2(SCC8530(config, SCC2_TAG, 39.3216_MHz_XTAL / 8));
scc2.out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd));
scc2.out_txdb_callback().set(RS232B_TAG, FUNC(rs232_port_device::write_txd));
scc2.out_int_callback().set_inputline(m_maincpu, M68K_IRQ_6);
diff --git a/src/mame/sun/sun3.cpp b/src/mame/sun/sun3.cpp
index 17cb06831fa..af782b9cca8 100644
--- a/src/mame/sun/sun3.cpp
+++ b/src/mame/sun/sun3.cpp
@@ -1049,7 +1049,7 @@ void sun3_state::sun3(machine_config &config)
TIMER(config, "timer").configure_periodic(FUNC(sun3_state::sun3_timer), attotime::from_hz(100));
- SCC8530N(config, m_scc1, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc1, 4.9152_MHz_XTAL);
m_scc1->out_txda_callback().set(KEYBOARD_TAG, FUNC(sun_keyboard_port_device::write_txd));
m_scc1->out_txdb_callback().set(MOUSE_TAG, FUNC(sun_mouse_port_device::write_txd));
@@ -1057,7 +1057,7 @@ void sun3_state::sun3(machine_config &config)
SUNMOUSE_PORT(config, MOUSE_TAG, default_sun_mouse_devices, "hle1200").rxd_handler().set(m_scc1, FUNC(z80scc_device::rxb_w));
- SCC8530N(config, m_scc2, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc2, 4.9152_MHz_XTAL);
m_scc2->out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd));
m_scc2->out_txdb_callback().set(RS232B_TAG, FUNC(rs232_port_device::write_txd));
@@ -1157,7 +1157,7 @@ void sun3_state::sun3_50(machine_config &config)
// MMU Type 3 device space
ADDRESS_MAP_BANK(config, "type3").set_map(&sun3_state::vmetype3space_map).set_options(ENDIANNESS_BIG, 32, 32, 0x80000000);
- SCC8530N(config, m_scc1, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc1, 4.9152_MHz_XTAL);
m_scc1->out_txda_callback().set(KEYBOARD_TAG, FUNC(sun_keyboard_port_device::write_txd));
m_scc1->out_txdb_callback().set(MOUSE_TAG, FUNC(sun_mouse_port_device::write_txd));
@@ -1165,7 +1165,7 @@ void sun3_state::sun3_50(machine_config &config)
SUNMOUSE_PORT(config, MOUSE_TAG, default_sun_mouse_devices, "hle1200").rxd_handler().set(m_scc1, FUNC(z80scc_device::rxb_w));
- SCC8530N(config, m_scc2, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc2, 4.9152_MHz_XTAL);
m_scc2->out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd));
m_scc2->out_txdb_callback().set(RS232B_TAG, FUNC(rs232_port_device::write_txd));
diff --git a/src/mame/sun/sun3x.cpp b/src/mame/sun/sun3x.cpp
index 62328e4a511..c438b0cf029 100644
--- a/src/mame/sun/sun3x.cpp
+++ b/src/mame/sun/sun3x.cpp
@@ -605,14 +605,14 @@ void sun3x_state::sun3_80(machine_config &config)
M48T02(config, TIMEKEEPER_TAG, 0);
- SCC8530N(config, m_scc1, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc1, 4.9152_MHz_XTAL);
m_scc1->out_txda_callback().set(KEYBOARD_TAG, FUNC(sun_keyboard_port_device::write_txd));
m_scc1->out_txdb_callback().set(MOUSE_TAG, FUNC(sun_mouse_port_device::write_txd));
SUNKBD_PORT(config, KEYBOARD_TAG, default_sun_keyboard_devices, "type3hle").rxd_handler().set(m_scc1, FUNC(z80scc_device::rxa_w));
SUNMOUSE_PORT(config, MOUSE_TAG, default_sun_mouse_devices, "hle1200").rxd_handler().set(m_scc1, FUNC(z80scc_device::rxb_w));
- SCC8530N(config, m_scc2, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc2, 4.9152_MHz_XTAL);
m_scc2->out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd));
m_scc2->out_txdb_callback().set(RS232B_TAG, FUNC(rs232_port_device::write_txd));
@@ -657,8 +657,8 @@ void sun3x_state::sun3_460(machine_config &config)
ICM7170(config, "rtc", 32768).irq().set_inputline(m_maincpu, M68K_IRQ_7);
- SCC8530N(config, m_scc1, 4.9152_MHz_XTAL);
- SCC8530N(config, m_scc2, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc1, 4.9152_MHz_XTAL);
+ SCC8530(config, m_scc2, 4.9152_MHz_XTAL);
m_scc2->out_txda_callback().set(RS232A_TAG, FUNC(rs232_port_device::write_txd));
m_scc2->out_txdb_callback().set(RS232B_TAG, FUNC(rs232_port_device::write_txd));
diff --git a/src/mame/tektronix/tekigw.cpp b/src/mame/tektronix/tekigw.cpp
index e10fa3480c1..cf298416a35 100644
--- a/src/mame/tektronix/tekigw.cpp
+++ b/src/mame/tektronix/tekigw.cpp
@@ -752,7 +752,7 @@ void tekigw_state_base::common_config(machine_config &config)
RAM(config, m_ram);
m_ram->set_default_size("1M");
- SCC8530N(config, m_scc, 16_MHz_XTAL / 4);
+ SCC8530(config, m_scc, 16_MHz_XTAL / 4);
m_scc->out_int_callback().set(m_icu, FUNC(ns32202_device::ir_w<1>)).invert();
m_scc->configure_channels(2'457'600, 0, 2'457'600, 0);
">prj.__configs) do local dir local start = iif(cfg.name, 2, 1) for v = start, iif(cfg.flags.SingleOutputDir==true,num_variations-1,num_variations) do dir = cfg_dirs[cfg][v] if hit_counts[dir] == 1 then break end end cfg.objectsdir = path.getrelative(cfg.location, dir) end end end end -- -- Pre-computes the build and link targets for a configuration. -- local function buildtargets() for sln in premake.solution.each() do for _, prj in ipairs(sln.projects) do for _, cfg in pairs(prj.__configs) do -- determine which conventions the target should follow for this config local pathstyle = premake.getpathstyle(cfg) local namestyle = premake.getnamestyle(cfg) -- build the targets cfg.buildtarget = premake.gettarget(cfg, "build", pathstyle, namestyle, cfg.system) cfg.linktarget = premake.gettarget(cfg, "link", pathstyle, namestyle, cfg.system) if pathstyle == "windows" then cfg.objectsdir = path.translate(cfg.objectsdir, "\\") end end end end end local function getCfgKind(cfg) if(cfg.kind) then return cfg.kind; end if(cfg.project.__configs[""] and cfg.project.__configs[""].kind) then return cfg.project.__configs[""].kind; end return nil end local function getprojrec(dstArray, foundList, cfg, cfgname, searchField, bLinkage) if(not cfg) then return end local foundUsePrjs = {}; for _, useName in ipairs(cfg[searchField]) do local testName = useName:lower(); if((not foundList[testName])) then local theProj = nil; local theUseProj = nil; for _, prj in ipairs(cfg.project.solution.projects) do if (prj.name:lower() == testName) then if(prj.usage) then theUseProj = prj; else theProj = prj; end end end --Must connect to a usage project. if(theUseProj) then foundList[testName] = true; local prjEntry = { name = testName, proj = theProj, usageProj = theUseProj, bLinkageOnly = bLinkage, }; dstArray[testName] = prjEntry; table.insert(foundUsePrjs, theUseProj); end end end for _, usePrj in ipairs(foundUsePrjs) do --Links can only recurse through static libraries. if((searchField ~= "links") or (getCfgKind(usePrj.__configs[cfgname]) == "StaticLib")) then getprojrec(dstArray, foundList, usePrj.__configs[cfgname], cfgname, searchField, bLinkage); end end end -- -- This function will recursively get all projects that the given configuration has in its "uses" -- field. The return values are a list of tables. Each table in that list contains the following: -- name = The lowercase name of the project. -- proj = The project. Can be nil if it is usage-only. -- usageProj = The usage project. Can't be nil, as using a project that has no -- usage project is not put into the list. -- bLinkageOnly = If this is true, then only the linkage information should be copied. -- The recursion will only look at the "uses" field on *usage* projects. -- This function will also add projects to the list that are mentioned in the "links" -- field of usage projects. These will only copy linker information, but they will recurse. -- through other "links" fields. -- local function getprojectsconnections(cfg, cfgname) local dstArray = {}; local foundList = {}; foundList[cfg.project.name:lower()] = true; --First, follow the uses recursively. getprojrec(dstArray, foundList, cfg, cfgname, "uses", false); --Next, go through all of the usage projects and recursively get their links. --But only if they're not already there. Get the links as linkage-only. local linkArray = {}; for prjName, prjEntry in pairs(dstArray) do getprojrec(linkArray, foundList, prjEntry.usageProj.__configs[cfgname], cfgname, "links", true); end --Copy from linkArray into dstArray. for prjName, prjEntry in pairs(linkArray) do dstArray[prjName] = prjEntry; end return dstArray; end local function isnameofproj(cfg, strName) local sln = cfg.project.solution; local strTest = strName:lower(); for prjIx, prj in ipairs(sln.projects) do if (prj.name:lower() == strTest) then return true; end end return false; end -- -- Copies the field from dstCfg to srcCfg. -- local function copydependentfield(srcCfg, dstCfg, strSrcField) local srcField = premake.fields[strSrcField]; local strDstField = strSrcField; if type(srcCfg[strSrcField]) == "table" then --handle paths. if (srcField.kind == "dirlist" or srcField.kind == "filelist") and (not keeprelative[strSrcField]) then for i,p in ipairs(srcCfg[strSrcField]) do table.insert(dstCfg[strDstField], path.rebase(p, srcCfg.project.location, dstCfg.project.location)) end else if(strSrcField == "links") then for i,p in ipairs(srcCfg[strSrcField]) do if(not isnameofproj(dstCfg, p)) then table.insert(dstCfg[strDstField], p) else printf("Failed to copy '%s' from proj '%s'.", p, srcCfg.project.name); end end else for i,p in ipairs(srcCfg[strSrcField]) do table.insert(dstCfg[strDstField], p) end end end else if(srcField.kind == "path" and (not keeprelative[strSrcField])) then dstCfg[strDstField] = path.rebase(srcCfg[strSrcField], prj.location, dstCfg.project.location); else dstCfg[strDstField] = srcCfg[strSrcField]; end end end -- -- This function will take the list of project entries and apply their usage project data -- to the given configuration. It will copy compiling information for the projects that are -- not listed as linkage-only. It will copy the linking information for projects only if -- the source project is not a static library. It won't copy linking information -- if the project is in this solution; instead it will add that project to the configuration's -- links field, expecting that Premake will handle the rest. -- local function copyusagedata(cfg, cfgname, linkToProjs) local myPrj = cfg.project; local bIsStaticLib = (getCfgKind(cfg) == "StaticLib"); for prjName, prjEntry in pairs(linkToProjs) do local srcPrj = prjEntry.usageProj; local srcCfg = srcPrj.__configs[cfgname]; for name, field in pairs(premake.fields) do if(srcCfg[name]) then if(field.usagecopy) then if(not prjEntry.bLinkageOnly) then copydependentfield(srcCfg, cfg, name) end elseif(field.linkagecopy) then --Copy the linkage data if we're building a non-static thing --and this is a pure usage project. If it's not pure-usage, then --we will simply put the project's name in the links field later. if((not bIsStaticLib) and (not prjEntry.proj)) then copydependentfield(srcCfg, cfg, name) end end end end if((not bIsStaticLib) and prjEntry.proj) then table.insert(cfg.links, prjEntry.proj.name); end end end -- -- Build an inverse dictionary of literal vpaths for fast lookup -- local function inverseliteralvpaths() for sln in premake.solution.each() do for _,prj in ipairs(sln.projects) do prj.inversevpaths = {} for replacement, patterns in pairs(prj.vpaths or {}) do for _, pattern in ipairs(patterns) do if string.find(pattern, "*") == nil then prj.inversevpaths[pattern] = replacement end end end end end end -- -- Main function, controls the process of flattening the configurations. -- function premake.bake.buildconfigs() -- convert project path fields to be relative to project location for sln in premake.solution.each() do for _, prj in ipairs(sln.projects) do prj.location = prj.location or sln.location or prj.basedir adjustpaths(prj.location, prj) for _, blk in ipairs(prj.blocks) do adjustpaths(prj.location, blk) end end sln.location = sln.location or sln.basedir end -- convert paths for imported projects to be relative to solution location for sln in premake.solution.each() do for _, iprj in ipairs(sln.importedprojects) do iprj.location = path.getabsolute(iprj.location) end end inverseliteralvpaths() -- collapse configuration blocks, so that there is only one block per build -- configuration/platform pair, filtered to the current operating environment for sln in premake.solution.each() do local basis = collapse(sln) for _, prj in ipairs(sln.projects) do prj.__configs = collapse(prj, basis) for _, cfg in pairs(prj.__configs) do bake.postprocess(prj, cfg) end end end -- This loop finds the projects that a configuration is connected to -- via its "uses" field. It will then copy any usage project information from that -- usage project to the configuration in question. for sln in premake.solution.each() do for prjIx, prj in ipairs(sln.projects) do if(not prj.usage) then for cfgname, cfg in pairs(prj.__configs) do local usesPrjs = getprojectsconnections(cfg, cfgname); copyusagedata(cfg, cfgname, usesPrjs) end end end end -- mark all configurations that have been removed via their removes table. for sln in premake.solution.each() do for prjIx, prj in ipairs(sln.projects) do for cfgName, cfg in pairs(prj.__configs) do cfg.build = true local removes = nil if cfg.removes ~= nil then removes = cfg.removes["platforms"]; end if removes ~= nil then for _,p in ipairs(removes) do if p == cfg.platform then cfg.build = false end end end end end end -- Remove all usage projects. for sln in premake.solution.each() do local removeList = {}; for index, prj in ipairs(sln.projects) do if(prj.usage) then table.insert(removeList, 1, index); --Add in reverse order. end end for _, index in ipairs(removeList) do table.remove(sln.projects, index); end end -- assign unique object directories to each configuration builduniquedirs() -- walk it again and build the targets and unique directories buildtargets(cfg) end -- -- Post-process a project configuration, applying path fix-ups and other adjustments -- to the "raw" setting data pulled from the project script. -- -- @param prj -- The project object which contains the configuration. -- @param cfg -- The configuration object to be fixed up. -- function premake.bake.postprocess(prj, cfg) cfg.project = prj cfg.shortname = premake.getconfigname(cfg.name, cfg.platform, true) cfg.longname = premake.getconfigname(cfg.name, cfg.platform) -- set the project location, if not already set cfg.location = cfg.location or cfg.basedir -- figure out the target system local platform = premake.platforms[cfg.platform] if platform.iscrosscompiler then cfg.system = cfg.platform else cfg.system = os.get() end -- adjust the kind as required by the target system if cfg.kind == "Bundle" and not _ACTION:match("xcode[0-9]") then cfg.kind = "SharedLib" end if cfg.kind == "SharedLib" and platform.nosharedlibs then cfg.kind = "StaticLib" end local removefiles = cfg.removefiles if _ACTION == 'gmake' or _ACTION == 'ninja' then removefiles = table.join(removefiles, cfg.excludes) end -- build a table of removed files, indexed by file name local removefilesDict = {} for _, fname in ipairs(removefiles) do removefilesDict[fname] = true end -- remove excluded files from the file list local files = {} for _, fname in ipairs(cfg.files) do if removefilesDict[fname] == nil then table.insert(files, fname) end end cfg.files = files -- remove excluded files from the project's allfiles list, and -- un-duplify it local allfiles = {} local allfilesDict = {} for _, fname in ipairs(cfg.allfiles) do if allfilesDict[fname] == nil then if removefilesDict[fname] == nil then allfilesDict[fname] = true table.insert(allfiles, fname) end end end cfg.allfiles = allfiles -- fixup the data for name, field in pairs(premake.fields) do -- re-key flag fields for faster lookups if field.isflags then local values = cfg[name] for _, flag in ipairs(values) do values[flag] = true end end end -- build configuration objects for all files -- TODO: can I build this as a tree instead, and avoid the extra -- step of building it later? local cfgfields = { {"__fileconfigs", cfg.files}, {"__allfileconfigs", cfg.allfiles}, } for _, cfgfield in ipairs(cfgfields) do local fieldname = cfgfield[1] local field = cfgfield[2] cfg[fieldname] = { } for _, fname in ipairs(field) do local fcfg = {} -- Only do this if the script has called enablefilelevelconfig() if premake._filelevelconfig then cfg.terms.required = fname:lower() for _, blk in ipairs(cfg.project.blocks) do -- BK - `iskeywordsmatch` call is super slow for large projects... if (premake.iskeywordsmatch(blk.keywords, cfg.terms)) then mergeobject(fcfg, blk) end end end -- add indexed by name and integer -- TODO: when everything is converted to trees I won't need -- to index by name any longer fcfg.name = fname cfg[fieldname][fname] = fcfg table.insert(cfg[fieldname], fcfg) end end end