mirror of
https://github.com/holub/mame
synced 2025-04-18 22:49:58 +03:00
8530scc: retire legacy device
This commit is contained in:
parent
ab6b6fc9e7
commit
2e17f70c23
@ -617,18 +617,6 @@ if (MACHINES["KBDC8042"]~=null) then
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/machine/8530scc.h,MACHINES["8530SCC"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (MACHINES["8530SCC"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/machine/8530scc.cpp",
|
||||
MAME_DIR .. "src/devices/machine/8530scc.h",
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
--
|
||||
--@src/devices/machine/adc0804.h,MACHINES["ADC0804"] = true
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
||||
*/
|
@ -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
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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"
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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)));
|
||||
|
@ -327,7 +327,7 @@ void micro3d_state::micro3d(machine_config &config)
|
||||
m_drmath->set_addrmap(AS_PROGRAM, µ3d_state::drmath_prg);
|
||||
m_drmath->set_addrmap(AS_DATA, µ3d_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);
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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;
|
||||
|
@ -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"));
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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));
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user