summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/machine/z80sti.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/machine/z80sti.cpp')
-rw-r--r--src/devices/machine/z80sti.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/src/devices/machine/z80sti.cpp b/src/devices/machine/z80sti.cpp
index bdc4c1bfefa..e8900abd021 100644
--- a/src/devices/machine/z80sti.cpp
+++ b/src/devices/machine/z80sti.cpp
@@ -82,7 +82,7 @@ const int z80sti_device::PRESCALER[] = { 0, 4, 10, 16, 50, 64, 100, 200 };
// z80sti_device - constructor
//-------------------------------------------------
-z80sti_device::z80sti_device(const machine_config &mconfig, std::string tag, device_t *owner, UINT32 clock)
+z80sti_device::z80sti_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock)
: device_t(mconfig, Z80STI, "Mostek MK3801", tag, owner, clock, "z80sti", __FILE__),
device_serial_interface(mconfig, *this),
device_z80daisy_interface(mconfig, *this),
@@ -249,7 +249,7 @@ int z80sti_device::z80daisy_irq_state()
}
}
- LOG(("Z80STI '%s' Interrupt State: %u\n", tag().c_str(), state));
+ LOG(("Z80STI '%s' Interrupt State: %u\n", tag(), state));
return state;
}
@@ -282,7 +282,7 @@ int z80sti_device::z80daisy_irq_ack()
check_interrupts();
- LOG(("Z80STI '%s' Interrupt Acknowledge Vector: %02x\n", tag().c_str(), vector));
+ LOG(("Z80STI '%s' Interrupt Acknowledge Vector: %02x\n", tag(), vector));
return vector;
}
@@ -302,7 +302,7 @@ void z80sti_device::z80daisy_irq_reti()
{
int i;
- LOG(("Z80STI '%s' Return from Interrupt\n", tag().c_str()));
+ LOG(("Z80STI '%s' Return from Interrupt\n", tag()));
// loop over all interrupt sources
for (i = 15; i >= 0; i--)
@@ -421,39 +421,39 @@ WRITE8_MEMBER( z80sti_device::write )
switch (m_pvr & 0x07)
{
case REGISTER_IR_SCR:
- LOG(("Z80STI '%s' Sync Character Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Sync Character Register: %x\n", tag(), data));
m_scr = data;
break;
case REGISTER_IR_TDDR:
- LOG(("Z80STI '%s' Timer D Data Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Timer D Data Register: %x\n", tag(), data));
m_tdr[TIMER_D] = data;
break;
case REGISTER_IR_TCDR:
- LOG(("Z80STI '%s' Timer C Data Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Timer C Data Register: %x\n", tag(), data));
m_tdr[TIMER_C] = data;
break;
case REGISTER_IR_AER:
- LOG(("Z80STI '%s' Active Edge Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Active Edge Register: %x\n", tag(), data));
m_aer = data;
break;
case REGISTER_IR_IERB:
- LOG(("Z80STI '%s' Interrupt Enable Register B: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt Enable Register B: %x\n", tag(), data));
m_ier = (m_ier & 0xff00) | data;
check_interrupts();
break;
case REGISTER_IR_IERA:
- LOG(("Z80STI '%s' Interrupt Enable Register A: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt Enable Register A: %x\n", tag(), data));
m_ier = (data << 8) | (m_ier & 0xff);
check_interrupts();
break;
case REGISTER_IR_DDR:
- LOG(("Z80STI '%s' Data Direction Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Data Direction Register: %x\n", tag(), data));
m_ddr = data;
break;
@@ -464,8 +464,8 @@ WRITE8_MEMBER( z80sti_device::write )
m_tcdc = data;
- LOG(("Z80STI '%s' Timer C Prescaler: %u\n", tag().c_str(), tcc));
- LOG(("Z80STI '%s' Timer D Prescaler: %u\n", tag().c_str(), tdc));
+ LOG(("Z80STI '%s' Timer C Prescaler: %u\n", tag(), tcc));
+ LOG(("Z80STI '%s' Timer D Prescaler: %u\n", tag(), tdc));
if (tcc)
m_timer[TIMER_C]->adjust(attotime::from_hz(clock() / tcc), TIMER_C, attotime::from_hz(clock() / tcc));
@@ -479,7 +479,7 @@ WRITE8_MEMBER( z80sti_device::write )
if (BIT(data, 7))
{
- LOG(("Z80STI '%s' Timer A Reset\n", tag().c_str()));
+ LOG(("Z80STI '%s' Timer A Reset\n", tag()));
m_to[TIMER_A] = 0;
m_out_tao_cb(m_to[TIMER_A]);
@@ -487,7 +487,7 @@ WRITE8_MEMBER( z80sti_device::write )
if (BIT(data, 3))
{
- LOG(("Z80STI '%s' Timer B Reset\n", tag().c_str()));
+ LOG(("Z80STI '%s' Timer B Reset\n", tag()));
m_to[TIMER_B] = 0;
m_out_tbo_cb(m_to[TIMER_B]);
@@ -498,7 +498,7 @@ WRITE8_MEMBER( z80sti_device::write )
break;
case REGISTER_GPIP:
- LOG(("Z80STI '%s' General Purpose I/O Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' General Purpose I/O Register: %x\n", tag(), data));
m_gpip = data & m_ddr;
m_out_gpio_cb((offs_t)0, m_gpip);
break;
@@ -506,7 +506,7 @@ WRITE8_MEMBER( z80sti_device::write )
case REGISTER_IPRB:
{
int i;
- LOG(("Z80STI '%s' Interrupt Pending Register B: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt Pending Register B: %x\n", tag(), data));
m_ipr &= (m_ipr & 0xff00) | data;
for (i = 0; i < 16; i++)
@@ -521,7 +521,7 @@ WRITE8_MEMBER( z80sti_device::write )
case REGISTER_IPRA:
{
int i;
- LOG(("Z80STI '%s' Interrupt Pending Register A: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt Pending Register A: %x\n", tag(), data));
m_ipr &= (data << 8) | (m_ipr & 0xff);
for (i = 0; i < 16; i++)
@@ -534,32 +534,32 @@ WRITE8_MEMBER( z80sti_device::write )
break;
case REGISTER_ISRB:
- LOG(("Z80STI '%s' Interrupt In-Service Register B: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt In-Service Register B: %x\n", tag(), data));
m_isr &= (m_isr & 0xff00) | data;
break;
case REGISTER_ISRA:
- LOG(("Z80STI '%s' Interrupt In-Service Register A: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt In-Service Register A: %x\n", tag(), data));
m_isr &= (data << 8) | (m_isr & 0xff);
break;
case REGISTER_IMRB:
- LOG(("Z80STI '%s' Interrupt Mask Register B: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt Mask Register B: %x\n", tag(), data));
m_imr = (m_imr & 0xff00) | data;
m_isr &= m_imr;
check_interrupts();
break;
case REGISTER_IMRA:
- LOG(("Z80STI '%s' Interrupt Mask Register A: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Interrupt Mask Register A: %x\n", tag(), data));
m_imr = (data << 8) | (m_imr & 0xff);
m_isr &= m_imr;
check_interrupts();
break;
case REGISTER_PVR:
- LOG(("Z80STI '%s' Interrupt Vector: %02x\n", tag().c_str(), data & 0xe0));
- LOG(("Z80STI '%s' IR Address: %01x\n", tag().c_str(), data & 0x07));
+ LOG(("Z80STI '%s' Interrupt Vector: %02x\n", tag(), data & 0xe0));
+ LOG(("Z80STI '%s' IR Address: %01x\n", tag(), data & 0x07));
m_pvr = data;
break;
@@ -570,8 +570,8 @@ WRITE8_MEMBER( z80sti_device::write )
m_tabc = data;
- LOG(("Z80STI '%s' Timer A Prescaler: %u\n", tag().c_str(), tac));
- LOG(("Z80STI '%s' Timer B Prescaler: %u\n", tag().c_str(), tbc));
+ LOG(("Z80STI '%s' Timer A Prescaler: %u\n", tag(), tac));
+ LOG(("Z80STI '%s' Timer B Prescaler: %u\n", tag(), tbc));
if (tac)
m_timer[TIMER_A]->adjust(attotime::from_hz(clock() / tac), TIMER_A, attotime::from_hz(clock() / tac));
@@ -586,32 +586,32 @@ WRITE8_MEMBER( z80sti_device::write )
break;
case REGISTER_TBDR:
- LOG(("Z80STI '%s' Timer B Data Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Timer B Data Register: %x\n", tag(), data));
m_tdr[TIMER_B] = data;
break;
case REGISTER_TADR:
- LOG(("Z80STI '%s' Timer A Data Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Timer A Data Register: %x\n", tag(), data));
m_tdr[TIMER_A] = data;
break;
case REGISTER_UCR:
- LOG(("Z80STI '%s' USART Control Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' USART Control Register: %x\n", tag(), data));
m_ucr = data;
break;
case REGISTER_RSR:
- LOG(("Z80STI '%s' Receiver Status Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Receiver Status Register: %x\n", tag(), data));
m_rsr = data;
break;
case REGISTER_TSR:
- LOG(("Z80STI '%s' Transmitter Status Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' Transmitter Status Register: %x\n", tag(), data));
m_tsr = data;
break;
case REGISTER_UDR:
- LOG(("Z80STI '%s' USART Data Register: %x\n", tag().c_str(), data));
+ LOG(("Z80STI '%s' USART Data Register: %x\n", tag(), data));
m_udr = data;
break;
}
@@ -626,7 +626,7 @@ void z80sti_device::timer_count(int index)
{
if (m_tmc[index] == 0x01)
{
- //LOG(("Z80STI '%s' Timer %c Expired\n", tag().c_str(), 'A' + index));
+ //LOG(("Z80STI '%s' Timer %c Expired\n", tag(), 'A' + index));
// toggle timer output signal
m_to[index] = !m_to[index];
@@ -649,7 +649,7 @@ void z80sti_device::timer_count(int index)
if (m_ier & (1 << INT_LEVEL_TIMER[index]))
{
- LOG(("Z80STI '%s' Interrupt Pending for Timer %c\n", tag().c_str(), 'A' + index));
+ LOG(("Z80STI '%s' Interrupt Pending for Timer %c\n", tag(), 'A' + index));
// signal timer elapsed interrupt
take_interrupt(INT_LEVEL_TIMER[index]);
@@ -677,11 +677,11 @@ void z80sti_device::gpip_input(int bit, int state)
if ((old_state ^ aer) && !(state ^ aer))
{
- LOG(("Z80STI '%s' Edge Transition Detected on Bit: %u\n", tag().c_str(), bit));
+ LOG(("Z80STI '%s' Edge Transition Detected on Bit: %u\n", tag(), bit));
if (m_ier & (1 << INT_LEVEL_GPIP[bit]))
{
- LOG(("Z80STI '%s' Interrupt Pending for P%u\n", tag().c_str(), bit));
+ LOG(("Z80STI '%s' Interrupt Pending for P%u\n", tag(), bit));
take_interrupt(INT_LEVEL_GPIP[bit]);
}