summaryrefslogtreecommitdiffstatshomepage
path: root/src/mess/machine/rmnimbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mess/machine/rmnimbus.c')
-rw-r--r--src/mess/machine/rmnimbus.c164
1 files changed, 82 insertions, 82 deletions
diff --git a/src/mess/machine/rmnimbus.c b/src/mess/machine/rmnimbus.c
index bd4fa563e86..c03b97d012a 100644
--- a/src/mess/machine/rmnimbus.c
+++ b/src/mess/machine/rmnimbus.c
@@ -375,7 +375,7 @@ static void handle_eoi(running_machine &machine,int data)
case 0x0d: state->m_i186.intr.in_service &= ~0x20; break;
case 0x0e: state->m_i186.intr.in_service &= ~0x40; break;
case 0x0f: state->m_i186.intr.in_service &= ~0x80; break;
- default: logerror("%05X:ERROR - 80186 EOI with unknown vector %02X\n", cpu_get_pc(machine.device(MAINCPU_TAG)), data & 0x1f);
+ default: logerror("%05X:ERROR - 80186 EOI with unknown vector %02X\n", machine.device(MAINCPU_TAG)->safe_pc(), data & 0x1f);
}
if (LOG_INTERRUPTS) logerror("(%f) **** Got EOI for vector %02X\n", machine.time().as_double(), data & 0x1f);
}
@@ -589,7 +589,7 @@ static void internal_timer_update(running_machine &machine,
diff = new_control ^ t->control;
if (diff & 0x001c)
logerror("%05X:ERROR! -unsupported timer mode %04X\n",
- cpu_get_pc(machine.device(MAINCPU_TAG)), new_control);
+ machine.device(MAINCPU_TAG)->safe_pc(), new_control);
/* if we have real changes, update things */
if (diff != 0)
@@ -690,7 +690,7 @@ static void update_dma_control(running_machine &machine, int which, int new_cont
diff = new_control ^ d->control;
if ((LOG_DMA) && (diff & 0x6811))
logerror("%05X:ERROR! - unsupported DMA mode %04X\n",
- cpu_get_pc(machine.device(MAINCPU_TAG)), new_control);
+ machine.device(MAINCPU_TAG)->safe_pc(), new_control);
#if 0
/* if we're going live, set a timer */
if ((diff & 0x0002) && (new_control & 0x0002))
@@ -745,7 +745,7 @@ static void drq_callback(running_machine &machine, int which)
if(!(dma->control & ST_STOP))
{
logerror("%05X:ERROR! - drq%d with dma channel stopped\n",
- cpu_get_pc(machine.device(MAINCPU_TAG)), which);
+ machine.device(MAINCPU_TAG)->safe_pc(), which);
return;
}
@@ -860,21 +860,21 @@ READ16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_r)
switch (offset)
{
case 0x11:
- logerror("%05X:ERROR - read from 80186 EOI\n", cpu_get_pc(&space.device()));
+ logerror("%05X:ERROR - read from 80186 EOI\n", space.device().safe_pc());
break;
case 0x12:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll\n", space.device().safe_pc());
if (m_i186.intr.poll_status & 0x8000)
int_callback(machine().device(MAINCPU_TAG), 0);
return m_i186.intr.poll_status;
case 0x13:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll status\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt poll status\n", space.device().safe_pc());
return m_i186.intr.poll_status;
case 0x14:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt mask\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt mask\n", space.device().safe_pc());
temp = (m_i186.intr.timer >> 3) & 0x01;
temp |= (m_i186.intr.dma[0] >> 1) & 0x04;
temp |= (m_i186.intr.dma[1] >> 0) & 0x08;
@@ -885,56 +885,56 @@ READ16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_r)
return temp;
case 0x15:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt priority mask\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt priority mask\n", space.device().safe_pc());
return m_i186.intr.priority_mask;
case 0x16:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt in-service\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt in-service\n", space.device().safe_pc());
return m_i186.intr.in_service;
case 0x17:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt request\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt request\n", space.device().safe_pc());
temp = m_i186.intr.request & ~0x0001;
if (m_i186.intr.status & 0x0007)
temp |= 1;
return temp;
case 0x18:
- if (LOG_PORTS) logerror("%05X:read 80186 interrupt status\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 interrupt status\n", space.device().safe_pc());
return m_i186.intr.status;
case 0x19:
- if (LOG_PORTS) logerror("%05X:read 80186 timer interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 timer interrupt control\n", space.device().safe_pc());
return m_i186.intr.timer;
case 0x1a:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA 0 interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA 0 interrupt control\n", space.device().safe_pc());
return m_i186.intr.dma[0];
case 0x1b:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA 1 interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA 1 interrupt control\n", space.device().safe_pc());
return m_i186.intr.dma[1];
case 0x1c:
- if (LOG_PORTS) logerror("%05X:read 80186 INT 0 interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 INT 0 interrupt control\n", space.device().safe_pc());
return m_i186.intr.ext[0];
case 0x1d:
- if (LOG_PORTS) logerror("%05X:read 80186 INT 1 interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 INT 1 interrupt control\n", space.device().safe_pc());
return m_i186.intr.ext[1];
case 0x1e:
- if (LOG_PORTS) logerror("%05X:read 80186 INT 2 interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 INT 2 interrupt control\n", space.device().safe_pc());
return m_i186.intr.ext[2];
case 0x1f:
- if (LOG_PORTS) logerror("%05X:read 80186 INT 3 interrupt control\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 INT 3 interrupt control\n", space.device().safe_pc());
return m_i186.intr.ext[3];
case 0x28:
case 0x2c:
case 0x30:
- if (LOG_PORTS) logerror("%05X:read 80186 Timer %d count\n", cpu_get_pc(&space.device()), (offset - 0x28) / 4);
+ if (LOG_PORTS) logerror("%05X:read 80186 Timer %d count\n", space.device().safe_pc(), (offset - 0x28) / 4);
which = (offset - 0x28) / 4;
if (!(offset & 1))
internal_timer_sync(machine(), which);
@@ -943,81 +943,81 @@ READ16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_r)
case 0x29:
case 0x2d:
case 0x31:
- if (LOG_PORTS) logerror("%05X:read 80186 Timer %d max A\n", cpu_get_pc(&space.device()), (offset - 0x29) / 4);
+ if (LOG_PORTS) logerror("%05X:read 80186 Timer %d max A\n", space.device().safe_pc(), (offset - 0x29) / 4);
which = (offset - 0x29) / 4;
return m_i186.timer[which].maxA;
case 0x2a:
case 0x2e:
- logerror("%05X:read 80186 Timer %d max B\n", cpu_get_pc(&space.device()), (offset - 0x2a) / 4);
+ logerror("%05X:read 80186 Timer %d max B\n", space.device().safe_pc(), (offset - 0x2a) / 4);
which = (offset - 0x2a) / 4;
return m_i186.timer[which].maxB;
case 0x2b:
case 0x2f:
case 0x33:
- if (LOG_PORTS) logerror("%05X:read 80186 Timer %d control\n", cpu_get_pc(&space.device()), (offset - 0x2b) / 4);
+ if (LOG_PORTS) logerror("%05X:read 80186 Timer %d control\n", space.device().safe_pc(), (offset - 0x2b) / 4);
which = (offset - 0x2b) / 4;
return m_i186.timer[which].control;
case 0x50:
- if (LOG_PORTS) logerror("%05X:read 80186 upper chip select\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 upper chip select\n", space.device().safe_pc());
return m_i186.mem.upper;
case 0x51:
- if (LOG_PORTS) logerror("%05X:read 80186 lower chip select\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 lower chip select\n", space.device().safe_pc());
return m_i186.mem.lower;
case 0x52:
- if (LOG_PORTS) logerror("%05X:read 80186 peripheral chip select\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 peripheral chip select\n", space.device().safe_pc());
return m_i186.mem.peripheral;
case 0x53:
- if (LOG_PORTS) logerror("%05X:read 80186 middle chip select\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 middle chip select\n", space.device().safe_pc());
return m_i186.mem.middle;
case 0x54:
- if (LOG_PORTS) logerror("%05X:read 80186 middle P chip select\n", cpu_get_pc(&space.device()));
+ if (LOG_PORTS) logerror("%05X:read 80186 middle P chip select\n", space.device().safe_pc());
return m_i186.mem.middle_size;
case 0x60:
case 0x68:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower source address\n", cpu_get_pc(&space.device()), (offset - 0x60) / 8);
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower source address\n", space.device().safe_pc(), (offset - 0x60) / 8);
which = (offset - 0x60) / 8;
return m_i186.dma[which].source;
case 0x61:
case 0x69:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper source address\n", cpu_get_pc(&space.device()), (offset - 0x61) / 8);
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper source address\n", space.device().safe_pc(), (offset - 0x61) / 8);
which = (offset - 0x61) / 8;
return m_i186.dma[which].source >> 16;
case 0x62:
case 0x6a:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower dest address\n", cpu_get_pc(&space.device()), (offset - 0x62) / 8);
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA%d lower dest address\n", space.device().safe_pc(), (offset - 0x62) / 8);
which = (offset - 0x62) / 8;
return m_i186.dma[which].dest;
case 0x63:
case 0x6b:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper dest address\n", cpu_get_pc(&space.device()), (offset - 0x63) / 8);
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA%d upper dest address\n", space.device().safe_pc(), (offset - 0x63) / 8);
which = (offset - 0x63) / 8;
return m_i186.dma[which].dest >> 16;
case 0x64:
case 0x6c:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA%d transfer count\n", cpu_get_pc(&space.device()), (offset - 0x64) / 8);
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA%d transfer count\n", space.device().safe_pc(), (offset - 0x64) / 8);
which = (offset - 0x64) / 8;
return m_i186.dma[which].count;
case 0x65:
case 0x6d:
- if (LOG_PORTS) logerror("%05X:read 80186 DMA%d control\n", cpu_get_pc(&space.device()), (offset - 0x65) / 8);
+ if (LOG_PORTS) logerror("%05X:read 80186 DMA%d control\n", space.device().safe_pc(), (offset - 0x65) / 8);
which = (offset - 0x65) / 8;
return m_i186.dma[which].control;
default:
- logerror("%05X:read 80186 port %02X\n", cpu_get_pc(&space.device()), offset);
+ logerror("%05X:read 80186 port %02X\n", space.device().safe_pc(), offset);
break;
}
return 0x00;
@@ -1036,21 +1036,21 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
switch (offset)
{
case 0x11:
- if (LOG_PORTS) logerror("%05X:80186 EOI = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 EOI = %04X\n", space.device().safe_pc(), data16);
handle_eoi(machine(),0x8000);
update_interrupt_state(machine());
break;
case 0x12:
- logerror("%05X:ERROR - write to 80186 interrupt poll = %04X\n", cpu_get_pc(&space.device()), data16);
+ logerror("%05X:ERROR - write to 80186 interrupt poll = %04X\n", space.device().safe_pc(), data16);
break;
case 0x13:
- logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X\n", cpu_get_pc(&space.device()), data16);
+ logerror("%05X:ERROR - write to 80186 interrupt poll status = %04X\n", space.device().safe_pc(), data16);
break;
case 0x14:
- if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 interrupt mask = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.timer = (m_i186.intr.timer & ~0x08) | ((data16 << 3) & 0x08);
m_i186.intr.dma[0] = (m_i186.intr.dma[0] & ~0x08) | ((data16 << 1) & 0x08);
m_i186.intr.dma[1] = (m_i186.intr.dma[1] & ~0x08) | ((data16 << 0) & 0x08);
@@ -1062,68 +1062,68 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
break;
case 0x15:
- if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 interrupt priority mask = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.priority_mask = data16 & 0x0007;
update_interrupt_state(machine());
break;
case 0x16:
- if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 interrupt in-service = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.in_service = data16 & 0x00ff;
update_interrupt_state(machine());
break;
case 0x17:
- if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 interrupt request = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.request = (m_i186.intr.request & ~0x00c0) | (data16 & 0x00c0);
update_interrupt_state(machine());
break;
case 0x18:
- if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:WARNING - wrote to 80186 interrupt status = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.status = (m_i186.intr.status & ~0x8007) | (data16 & 0x8007);
update_interrupt_state(machine());
break;
case 0x19:
- if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 timer interrupt contol = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.timer = data16 & 0x000f;
break;
case 0x1a:
- if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA 0 interrupt control = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.dma[0] = data16 & 0x000f;
break;
case 0x1b:
- if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA 1 interrupt control = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.dma[1] = data16 & 0x000f;
break;
case 0x1c:
- if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 INT 0 interrupt control = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.ext[0] = data16 & 0x007f;
break;
case 0x1d:
- if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 INT 1 interrupt control = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.ext[1] = data16 & 0x007f;
break;
case 0x1e:
- if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 INT 2 interrupt control = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.ext[2] = data16 & 0x001f;
break;
case 0x1f:
- if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 INT 3 interrupt control = %04X\n", space.device().safe_pc(), data16);
m_i186.intr.ext[3] = data16 & 0x001f;
break;
case 0x28:
case 0x2c:
case 0x30:
- if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X\n", cpu_get_pc(&space.device()), (offset - 0x28) / 4, data16);
+ if (LOG_PORTS) logerror("%05X:80186 Timer %d count = %04X\n", space.device().safe_pc(), (offset - 0x28) / 4, data16);
which = (offset - 0x28) / 4;
internal_timer_update(machine(),which, data16, -1, -1, -1);
break;
@@ -1131,14 +1131,14 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
case 0x29:
case 0x2d:
case 0x31:
- if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X\n", cpu_get_pc(&space.device()), (offset - 0x29) / 4, data16);
+ if (LOG_PORTS) logerror("%05X:80186 Timer %d max A = %04X\n", space.device().safe_pc(), (offset - 0x29) / 4, data16);
which = (offset - 0x29) / 4;
internal_timer_update(machine(),which, -1, data16, -1, -1);
break;
case 0x2a:
case 0x2e:
- if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X\n", cpu_get_pc(&space.device()), (offset - 0x2a) / 4, data16);
+ if (LOG_PORTS) logerror("%05X:80186 Timer %d max B = %04X\n", space.device().safe_pc(), (offset - 0x2a) / 4, data16);
which = (offset - 0x2a) / 4;
internal_timer_update(machine(),which, -1, -1, data16, -1);
break;
@@ -1146,33 +1146,33 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
case 0x2b:
case 0x2f:
case 0x33:
- if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X\n", cpu_get_pc(&space.device()), (offset - 0x2b) / 4, data16);
+ if (LOG_PORTS) logerror("%05X:80186 Timer %d control = %04X\n", space.device().safe_pc(), (offset - 0x2b) / 4, data16);
which = (offset - 0x2b) / 4;
internal_timer_update(machine(),which, -1, -1, -1, data16);
break;
case 0x50:
- if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 upper chip select = %04X\n", space.device().safe_pc(), data16);
m_i186.mem.upper = data16 | 0xc038;
break;
case 0x51:
- if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 lower chip select = %04X\n", space.device().safe_pc(), data16);
m_i186.mem.lower = (data16 & 0x3fff) | 0x0038; printf("%X",m_i186.mem.lower);
break;
case 0x52:
- if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 peripheral chip select = %04X\n", space.device().safe_pc(), data16);
m_i186.mem.peripheral = data16 | 0x0038;
break;
case 0x53:
- if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 middle chip select = %04X\n", space.device().safe_pc(), data16);
m_i186.mem.middle = data16 | 0x01f8;
break;
case 0x54:
- if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 middle P chip select = %04X\n", space.device().safe_pc(), data16);
m_i186.mem.middle_size = data16 | 0x8038;
/* we need to do this at a time when the I86 context is swapped in */
@@ -1183,48 +1183,48 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
case 0x60:
case 0x68:
- if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x60) / 8, data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA%d lower source address = %04X\n", space.device().safe_pc(), (offset - 0x60) / 8, data16);
which = (offset - 0x60) / 8;
m_i186.dma[which].source = (m_i186.dma[which].source & ~0x0ffff) | (data16 & 0x0ffff);
break;
case 0x61:
case 0x69:
- if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x61) / 8, data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA%d upper source address = %04X\n", space.device().safe_pc(), (offset - 0x61) / 8, data16);
which = (offset - 0x61) / 8;
m_i186.dma[which].source = (m_i186.dma[which].source & ~0xf0000) | ((data16 << 16) & 0xf0000);
break;
case 0x62:
case 0x6a:
- if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x62) / 8, data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA%d lower dest address = %04X\n", space.device().safe_pc(), (offset - 0x62) / 8, data16);
which = (offset - 0x62) / 8;
m_i186.dma[which].dest = (m_i186.dma[which].dest & ~0x0ffff) | (data16 & 0x0ffff);
break;
case 0x63:
case 0x6b:
- if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X\n", cpu_get_pc(&space.device()), (offset - 0x63) / 8, data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA%d upper dest address = %04X\n", space.device().safe_pc(), (offset - 0x63) / 8, data16);
which = (offset - 0x63) / 8;
m_i186.dma[which].dest = (m_i186.dma[which].dest & ~0xf0000) | ((data16 << 16) & 0xf0000);
break;
case 0x64:
case 0x6c:
- if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X\n", cpu_get_pc(&space.device()), (offset - 0x64) / 8, data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA%d transfer count = %04X\n", space.device().safe_pc(), (offset - 0x64) / 8, data16);
which = (offset - 0x64) / 8;
m_i186.dma[which].count = data16;
break;
case 0x65:
case 0x6d:
- if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", cpu_get_pc(&space.device()), (offset - 0x65) / 8, data16);
+ if (LOG_PORTS) logerror("%05X:80186 DMA%d control = %04X\n", space.device().safe_pc(), (offset - 0x65) / 8, data16);
which = (offset - 0x65) / 8;
update_dma_control(machine(), which, data16);
break;
case 0x7f:
- if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X\n", cpu_get_pc(&space.device()), data16);
+ if (LOG_PORTS) logerror("%05X:80186 relocation register = %04X\n", space.device().safe_pc(), data16);
/* we assume here there that this doesn't happen too often */
/* plus, we can't really remove the old memory range, so we also assume that it's */
@@ -1244,7 +1244,7 @@ WRITE16_MEMBER(rmnimbus_state::nimbus_i186_internal_port_w)
break;
default:
- logerror("%05X:80186 port %02X = %04X\n", cpu_get_pc(&space.device()), offset, data16);
+ logerror("%05X:80186 port %02X = %04X\n", space.device().safe_pc(), offset, data16);
break;
}
}
@@ -2082,7 +2082,7 @@ static void memory_reset(running_machine &machine)
READ16_MEMBER(rmnimbus_state::nimbus_io_r)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
logerror("Nimbus IOR at pc=%08X from %04X mask=%04X, data=%04X\n",pc,(offset*2)+0x30,mem_mask,m_IOPorts[offset]);
@@ -2095,7 +2095,7 @@ READ16_MEMBER(rmnimbus_state::nimbus_io_r)
WRITE16_MEMBER(rmnimbus_state::nimbus_io_w)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
logerror("Nimbus IOW at %08X write of %04X to %04X mask=%04X\n",pc,data,(offset*2)+0x30,mem_mask);
@@ -2314,7 +2314,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_disk_r)
device_t *fdc = machine().device(FDC_TAG);
scsibus_device *hdc = machine().device<scsibus_device>(SCSIBUS_TAG);
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
rmnimbus_state *state = machine().driver_data<rmnimbus_state>();
device_t *drive = machine().device(nimbus_wd17xx_interface.floppy_drive_tags[FDC_DRIVE()]);
@@ -2381,7 +2381,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_disk_w)
{
device_t *fdc = machine().device(FDC_TAG);
scsibus_device *hdc = machine().device<scsibus_device>(SCSIBUS_TAG);
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
UINT8 reg400_old = m_nimbus_drives.reg400;
if(LOG_DISK_FDD && ((offset*2)<=0x10))
@@ -2557,7 +2557,7 @@ static void ipc_dumpregs()
READ8_MEMBER(rmnimbus_state::nimbus_pc8031_r)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
UINT8 result;
switch(offset*2)
@@ -2581,7 +2581,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_pc8031_r)
WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_w)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
switch(offset*2)
{
@@ -2607,7 +2607,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_w)
READ8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_r)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
UINT8 result = 0;
switch (offset & 0x01)
@@ -2632,7 +2632,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_r)
WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_w)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
if(LOG_PC8031)
logerror("8031 PCIOW %04X write of %02X to %04X\n",pc,data,offset);
@@ -2672,7 +2672,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_iou_w)
READ8_MEMBER(rmnimbus_state::nimbus_pc8031_port_r)
{
device_t *er59256 = machine().device(ER59256_TAG);
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
UINT8 result = 0;
if(LOG_PC8031_PORT)
@@ -2689,7 +2689,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_pc8031_port_r)
WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_port_w)
{
device_t *er59256 = machine().device(ER59256_TAG);
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
switch (offset)
{
@@ -2705,7 +2705,7 @@ WRITE8_MEMBER(rmnimbus_state::nimbus_pc8031_port_w)
/* IO Unit */
READ8_MEMBER(rmnimbus_state::nimbus_iou_r)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
UINT8 result=0;
if(offset==0)
@@ -2721,7 +2721,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_iou_r)
WRITE8_MEMBER(rmnimbus_state::nimbus_iou_w)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
device_t *msm5205 = machine().device(MSM5205_TAG);
if(LOG_IOU)
@@ -2782,7 +2782,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_r)
WRITE8_MEMBER(rmnimbus_state::nimbus_sound_ay8910_w)
{
- int pc=cpu_get_pc(&space.device());
+ int pc=space.device().safe_pc();
device_t *ay8910 = machine().device(AY8910_TAG);
if(LOG_SOUND)
@@ -2854,7 +2854,7 @@ static TIMER_CALLBACK(mouse_callback)
rmnimbus_state *drvstate = machine.driver_data<rmnimbus_state>();
UINT8 x = 0;
UINT8 y = 0;
-// int pc=cpu_get_pc(machine.device(MAINCPU_TAG));
+// int pc=machine.device(MAINCPU_TAG)->safe_pc();
UINT8 intstate_x;
UINT8 intstate_y;
@@ -3000,7 +3000,7 @@ READ8_MEMBER(rmnimbus_state::nimbus_mouse_js_r)
*/
UINT8 result;
- //int pc=cpu_get_pc(machine().device(MAINCPU_TAG));
+ //int pc=machine().device(MAINCPU_TAG)->safe_pc();
_mouse_joy_state *state = &m_nimbus_mouse;
if (ioport("config")->read() & 0x01)