diff options
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/bus/interpro/sr/edge.cpp | 6 | ||||
-rw-r--r-- | src/devices/bus/interpro/sr/gt.cpp | 2 | ||||
-rw-r--r-- | src/devices/bus/nubus/quadralink.cpp | 4 | ||||
-rw-r--r-- | src/devices/bus/vme/hk68v10.cpp | 2 | ||||
-rw-r--r-- | src/devices/machine/8530scc.cpp | 635 | ||||
-rw-r--r-- | src/devices/machine/8530scc.h | 105 | ||||
-rw-r--r-- | src/devices/machine/z80scc.cpp | 4 | ||||
-rw-r--r-- | src/devices/machine/z80scc.h | 2 |
8 files changed, 10 insertions, 750 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) |