mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
Move cpunum_get_active() removal.
This commit is contained in:
parent
8f50591c40
commit
0142411b98
@ -97,7 +97,7 @@ static void h8_itu_refresh_timer(h83xx_state *h8, int tnum)
|
|||||||
ourTCR = h8->per_regs[tcr[tnum]];
|
ourTCR = h8->per_regs[tcr[tnum]];
|
||||||
ourTVAL = h8->h8TCNT[tnum];
|
ourTVAL = h8->h8TCNT[tnum];
|
||||||
|
|
||||||
period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device->machine->cpu[h8->cpu_number])), tscales[ourTCR & 3] * (65536 - ourTVAL));
|
period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device)), tscales[ourTCR & 3] * (65536 - ourTVAL));
|
||||||
|
|
||||||
if (ourTCR & 4)
|
if (ourTCR & 4)
|
||||||
{
|
{
|
||||||
@ -116,7 +116,7 @@ static void h8_itu_sync_timers(h83xx_state *h8, int tnum)
|
|||||||
ourTCR = h8->per_regs[tcr[tnum]];
|
ourTCR = h8->per_regs[tcr[tnum]];
|
||||||
|
|
||||||
// get the time per unit
|
// get the time per unit
|
||||||
cycle_time = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device->machine->cpu[h8->cpu_number])), tscales[ourTCR & 3]);
|
cycle_time = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device)), tscales[ourTCR & 3]);
|
||||||
cur = timer_timeelapsed(h8->timer[tnum]);
|
cur = timer_timeelapsed(h8->timer[tnum]);
|
||||||
|
|
||||||
ratio = attotime_to_double(cur) / attotime_to_double(cycle_time);
|
ratio = attotime_to_double(cur) / attotime_to_double(cycle_time);
|
||||||
@ -454,7 +454,7 @@ static void h8_3007_itu_refresh_timer(h83xx_state *h8, int tnum)
|
|||||||
attotime period;
|
attotime period;
|
||||||
int ourTCR = h8->per_regs[0x68+(tnum*8)];
|
int ourTCR = h8->per_regs[0x68+(tnum*8)];
|
||||||
|
|
||||||
period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device->machine->cpu[h8->cpu_number])), tscales[ourTCR & 3]);
|
period = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(h8->device)), tscales[ourTCR & 3]);
|
||||||
|
|
||||||
if (ourTCR & 4)
|
if (ourTCR & 4)
|
||||||
{
|
{
|
||||||
@ -746,7 +746,7 @@ UINT8 h8_3007_register1_read8(h83xx_state *h8, UINT32 address)
|
|||||||
case 0xfee018: return h8->per_regs[0xF8]; // IPRA
|
case 0xfee018: return h8->per_regs[0xF8]; // IPRA
|
||||||
}
|
}
|
||||||
|
|
||||||
logerror("cpu #%d (PC=%08X): unmapped I/O(1) byte read from %08X\n",cpunum_get_active(),cpu_get_pc(h8->device->machine->activecpu),address);
|
logerror("cpu '%s' (PC=%08X): unmapped I/O(1) byte read from %08X\n",h8->device->tag,cpu_get_pc(h8->device->machine->activecpu),address);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -758,7 +758,7 @@ void h8_3007_register1_write8(h83xx_state *h8, UINT32 address, UINT8 val)
|
|||||||
case 0xfee016: h8_ISR_w(h8, val); return; // ISR
|
case 0xfee016: h8_ISR_w(h8, val); return; // ISR
|
||||||
case 0xfee018: h8->per_regs[0xF8] = val; return; // IPRA
|
case 0xfee018: h8->per_regs[0xF8] = val; return; // IPRA
|
||||||
}
|
}
|
||||||
logerror("cpu #%d (PC=%08X): unmapped I/O(1) byte write to %08X = %02X\n",cpunum_get_active(),cpu_get_pc(h8->device->machine->activecpu),address,val);
|
logerror("cpu '%s' (PC=%08X): unmapped I/O(1) byte write to %08X = %02X\n",h8->device->tag,cpu_get_pc(h8->device->machine->activecpu),address,val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void h8_3007_itu_init(h83xx_state *h8)
|
void h8_3007_itu_init(h83xx_state *h8)
|
||||||
@ -779,8 +779,6 @@ void h8_itu_init(h83xx_state *h8)
|
|||||||
h8->timer[4] = timer_alloc(h8->device->machine, h8itu_timer_4_cb, h8);
|
h8->timer[4] = timer_alloc(h8->device->machine, h8itu_timer_4_cb, h8);
|
||||||
|
|
||||||
h8_itu_reset(h8);
|
h8_itu_reset(h8);
|
||||||
|
|
||||||
h8->cpu_number = cpunum_get_active();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void h8_itu_reset(h83xx_state *h8)
|
void h8_itu_reset(h83xx_state *h8)
|
||||||
|
@ -39,7 +39,6 @@ struct _h83xx_state
|
|||||||
|
|
||||||
emu_timer *timer[5];
|
emu_timer *timer[5];
|
||||||
|
|
||||||
int cpu_number;
|
|
||||||
int mode_8bit;
|
int mode_8bit;
|
||||||
};
|
};
|
||||||
extern h83xx_state h8;
|
extern h83xx_state h8;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
OP(illegal,1) {
|
OP(illegal,1) {
|
||||||
logerror("Z180 #%d ill. opcode $%02x $%02x\n",
|
logerror("Z180 '%s' ill. opcode $%02x $%02x\n",
|
||||||
cpunum_get_active(), memory_decrypted_read_byte(Z180.program, (_PCD-1)&0xffff), memory_decrypted_read_byte(Z180.program, _PCD));
|
Z180.device->tag, memory_decrypted_read_byte(Z180.program, (_PCD-1)&0xffff), memory_decrypted_read_byte(Z180.program, _PCD));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************
|
/**********************************************************
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
OP(illegal,2)
|
OP(illegal,2)
|
||||||
{
|
{
|
||||||
logerror("Z180 #%d ill. opcode $ed $%02x\n",
|
logerror("Z180 '%s' ill. opcode $ed $%02x\n",
|
||||||
cpunum_get_active(), memory_decrypted_read_byte(Z180.program, (_PCD-1)&0xffff));
|
Z180.device->tag, memory_decrypted_read_byte(Z180.program, (_PCD-1)&0xffff));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************
|
/**********************************************************
|
||||||
|
@ -315,7 +315,7 @@ static void take_interrupt(int irq)
|
|||||||
else
|
else
|
||||||
irq_vector = (*Z180.irq_callback)(Z180.device, 0);
|
irq_vector = (*Z180.irq_callback)(Z180.device, 0);
|
||||||
|
|
||||||
LOG(("Z180 #%d single int. irq_vector $%02x\n", cpunum_get_active(), irq_vector));
|
LOG(("Z180 '%s' single int. irq_vector $%02x\n", Z180.device->tag, irq_vector));
|
||||||
|
|
||||||
/* Interrupt mode 2. Call [Z180.I:databyte] */
|
/* Interrupt mode 2. Call [Z180.I:databyte] */
|
||||||
if( _IM == 2 )
|
if( _IM == 2 )
|
||||||
@ -323,7 +323,7 @@ static void take_interrupt(int irq)
|
|||||||
irq_vector = (irq_vector & 0xff) + (_I << 8);
|
irq_vector = (irq_vector & 0xff) + (_I << 8);
|
||||||
PUSH( PC );
|
PUSH( PC );
|
||||||
RM16( irq_vector, &Z180.PC );
|
RM16( irq_vector, &Z180.PC );
|
||||||
LOG(("Z180 #%d IM2 [$%04x] = $%04x\n",cpunum_get_active() , irq_vector, _PCD));
|
LOG(("Z180 '%s' IM2 [$%04x] = $%04x\n",Z180.device->tag , irq_vector, _PCD));
|
||||||
/* CALL opcode timing */
|
/* CALL opcode timing */
|
||||||
z180_icount -= cc[Z180_TABLE_op][0xcd];
|
z180_icount -= cc[Z180_TABLE_op][0xcd];
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ static void take_interrupt(int irq)
|
|||||||
/* Interrupt mode 1. RST 38h */
|
/* Interrupt mode 1. RST 38h */
|
||||||
if( _IM == 1 )
|
if( _IM == 1 )
|
||||||
{
|
{
|
||||||
LOG(("Z180 #%d IM1 $0038\n",cpunum_get_active() ));
|
LOG(("Z180 '%s' IM1 $0038\n",Z180.device->tag ));
|
||||||
PUSH( PC );
|
PUSH( PC );
|
||||||
_PCD = 0x0038;
|
_PCD = 0x0038;
|
||||||
/* RST $38 + 'interrupt latency' cycles */
|
/* RST $38 + 'interrupt latency' cycles */
|
||||||
@ -342,7 +342,7 @@ static void take_interrupt(int irq)
|
|||||||
/* Interrupt mode 0. We check for CALL and JP instructions, */
|
/* Interrupt mode 0. We check for CALL and JP instructions, */
|
||||||
/* if neither of these were found we assume a 1 byte opcode */
|
/* if neither of these were found we assume a 1 byte opcode */
|
||||||
/* was placed on the databus */
|
/* was placed on the databus */
|
||||||
LOG(("Z180 #%d IM0 $%04x\n",cpunum_get_active() , irq_vector));
|
LOG(("Z180 '%s' IM0 $%04x\n",Z180.device->tag , irq_vector));
|
||||||
switch (irq_vector & 0xff0000)
|
switch (irq_vector & 0xff0000)
|
||||||
{
|
{
|
||||||
case 0xcd0000: /* call */
|
case 0xcd0000: /* call */
|
||||||
@ -371,7 +371,7 @@ static void take_interrupt(int irq)
|
|||||||
irq_vector = (_I << 8) + (irq_vector & 0xff);
|
irq_vector = (_I << 8) + (irq_vector & 0xff);
|
||||||
PUSH( PC );
|
PUSH( PC );
|
||||||
RM16( irq_vector, &Z180.PC );
|
RM16( irq_vector, &Z180.PC );
|
||||||
LOG(("Z180 #%d INT%d [$%04x] = $%04x\n", cpunum_get_active(), irq, irq_vector, _PCD));
|
LOG(("Z180 '%s' INT%d [$%04x] = $%04x\n", Z180.device->tag, irq, irq_vector, _PCD));
|
||||||
/* CALL opcode timing */
|
/* CALL opcode timing */
|
||||||
z180_icount -= cc[Z180_TABLE_op][0xcd];
|
z180_icount -= cc[Z180_TABLE_op][0xcd];
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ void z180_setOPbase(int pc)
|
|||||||
* RETN
|
* RETN
|
||||||
***************************************************************/
|
***************************************************************/
|
||||||
#define RETN { \
|
#define RETN { \
|
||||||
LOG(("Z180 #%d RETN IFF1:%d IFF2:%d\n", cpunum_get_active(), _IFF1, _IFF2)); \
|
LOG(("Z180 '%s' RETN IFF1:%d IFF2:%d\n", Z180.device->tag, _IFF1, _IFF2)); \
|
||||||
POP(PC); \
|
POP(PC); \
|
||||||
_IFF1 = _IFF2; \
|
_IFF1 = _IFF2; \
|
||||||
}
|
}
|
||||||
|
@ -351,7 +351,7 @@ INLINE void set_irq(int type)
|
|||||||
IRQ_REQ = type;
|
IRQ_REQ = type;
|
||||||
break;
|
break;
|
||||||
case Z8000_SYSCALL >> 8:
|
case Z8000_SYSCALL >> 8:
|
||||||
LOG(("Z8K#%d SYSCALL $%02x\n", cpunum_get_active(), type & 0xff));
|
LOG(("Z8K '%s' SYSCALL $%02x\n", Z.device->tag, type & 0xff));
|
||||||
IRQ_REQ = type;
|
IRQ_REQ = type;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -389,7 +389,7 @@ INLINE void Interrupt(void)
|
|||||||
IRQ_SRV = IRQ_REQ;
|
IRQ_SRV = IRQ_REQ;
|
||||||
IRQ_REQ &= ~Z8000_TRAP;
|
IRQ_REQ &= ~Z8000_TRAP;
|
||||||
PC = TRAP;
|
PC = TRAP;
|
||||||
LOG(("Z8K#%d trap $%04x\n", cpunum_get_active(), PC ));
|
LOG(("Z8K '%s' trap $%04x\n", Z.device->tag, PC ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ( IRQ_REQ & Z8000_SYSCALL )
|
if ( IRQ_REQ & Z8000_SYSCALL )
|
||||||
@ -401,7 +401,7 @@ INLINE void Interrupt(void)
|
|||||||
IRQ_SRV = IRQ_REQ;
|
IRQ_SRV = IRQ_REQ;
|
||||||
IRQ_REQ &= ~Z8000_SYSCALL;
|
IRQ_REQ &= ~Z8000_SYSCALL;
|
||||||
PC = SYSCALL;
|
PC = SYSCALL;
|
||||||
LOG(("Z8K#%d syscall $%04x\n", cpunum_get_active(), PC ));
|
LOG(("Z8K '%s' syscall $%04x\n", Z.device->tag, PC ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ( IRQ_REQ & Z8000_SEGTRAP )
|
if ( IRQ_REQ & Z8000_SEGTRAP )
|
||||||
@ -413,7 +413,7 @@ INLINE void Interrupt(void)
|
|||||||
IRQ_SRV = IRQ_REQ;
|
IRQ_SRV = IRQ_REQ;
|
||||||
IRQ_REQ &= ~Z8000_SEGTRAP;
|
IRQ_REQ &= ~Z8000_SEGTRAP;
|
||||||
PC = SEGTRAP;
|
PC = SEGTRAP;
|
||||||
LOG(("Z8K#%d segtrap $%04x\n", cpunum_get_active(), PC ));
|
LOG(("Z8K '%s' segtrap $%04x\n", Z.device->tag, PC ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ( IRQ_REQ & Z8000_NMI )
|
if ( IRQ_REQ & Z8000_NMI )
|
||||||
@ -428,7 +428,7 @@ INLINE void Interrupt(void)
|
|||||||
IRQ_REQ &= ~Z8000_NMI;
|
IRQ_REQ &= ~Z8000_NMI;
|
||||||
CHANGE_FCW(fcw);
|
CHANGE_FCW(fcw);
|
||||||
PC = NMI;
|
PC = NMI;
|
||||||
LOG(("Z8K#%d NMI $%04x\n", cpunum_get_active(), PC ));
|
LOG(("Z8K '%s' NMI $%04x\n", Z.device->tag, PC ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ( (IRQ_REQ & Z8000_NVI) && (FCW & F_NVIE) )
|
if ( (IRQ_REQ & Z8000_NVI) && (FCW & F_NVIE) )
|
||||||
@ -442,7 +442,7 @@ INLINE void Interrupt(void)
|
|||||||
PC = RDMEM_W( NVI + 2 );
|
PC = RDMEM_W( NVI + 2 );
|
||||||
IRQ_REQ &= ~Z8000_NVI;
|
IRQ_REQ &= ~Z8000_NVI;
|
||||||
CHANGE_FCW(fcw);
|
CHANGE_FCW(fcw);
|
||||||
LOG(("Z8K#%d NVI $%04x\n", cpunum_get_active(), PC ));
|
LOG(("Z8K '%s' NVI $%04x\n", Z.device->tag, PC ));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ( (IRQ_REQ & Z8000_VI) && (FCW & F_VIE) )
|
if ( (IRQ_REQ & Z8000_VI) && (FCW & F_VIE) )
|
||||||
@ -456,7 +456,7 @@ INLINE void Interrupt(void)
|
|||||||
PC = RDMEM_W( VEC00 + 2 * (IRQ_REQ & 0xff) );
|
PC = RDMEM_W( VEC00 + 2 * (IRQ_REQ & 0xff) );
|
||||||
IRQ_REQ &= ~Z8000_VI;
|
IRQ_REQ &= ~Z8000_VI;
|
||||||
CHANGE_FCW(fcw);
|
CHANGE_FCW(fcw);
|
||||||
LOG(("Z8K#%d VI [$%04x/$%04x] fcw $%04x, pc $%04x\n", cpunum_get_active(), IRQ_VEC, VEC00 + VEC00 + 2 * (IRQ_REQ & 0xff), FCW, PC ));
|
LOG(("Z8K '%s' VI [$%04x/$%04x] fcw $%04x, pc $%04x\n", Z.device->tag, IRQ_VEC, VEC00 + VEC00 + 2 * (IRQ_REQ & 0xff), FCW, PC ));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1530,7 +1530,7 @@ static void Z0D_ddN0_1001_imm16(void)
|
|||||||
static void Z0E_imm8(void)
|
static void Z0E_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: ext0e $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: ext0e $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -1544,7 +1544,7 @@ static void Z0E_imm8(void)
|
|||||||
static void Z0F_imm8(void)
|
static void Z0F_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: ext0f $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: ext0f $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -2272,7 +2272,7 @@ static void Z36_0000_0000(void)
|
|||||||
static void Z36_imm8(void)
|
static void Z36_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvd36 $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvd36 $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -2310,7 +2310,7 @@ static void Z37_ddN0_ssss_imm16(void)
|
|||||||
static void Z38_imm8(void)
|
static void Z38_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvd38 $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvd38 $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -4347,7 +4347,7 @@ static void Z77_ddN0_ssss_0000_xxxx_0000_0000(void)
|
|||||||
static void Z78_imm8(void)
|
static void Z78_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvd78 $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvd78 $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -4404,7 +4404,7 @@ static void Z7B_0000_0000(void)
|
|||||||
PC = POPW( SP ); /* get PC */
|
PC = POPW( SP ); /* get PC */
|
||||||
IRQ_SRV &= ~tag; /* remove IRQ serviced flag */
|
IRQ_SRV &= ~tag; /* remove IRQ serviced flag */
|
||||||
CHANGE_FCW(fcw); /* check for user/system mode change */
|
CHANGE_FCW(fcw); /* check for user/system mode change */
|
||||||
LOG(("Z8K#%d IRET tag $%04x, fcw $%04x, pc $%04x\n", cpunum_get_active(), tag, fcw, PC));
|
LOG(("Z8K '%s' IRET tag $%04x, fcw $%04x, pc $%04x\n", Z.device->tag, tag, fcw, PC));
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************
|
/******************************************
|
||||||
@ -4489,7 +4489,7 @@ static void Z7D_dddd_0ccc(void)
|
|||||||
RW(dst) = NSP;
|
RW(dst) = NSP;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG(("Z8K#%d LDCTL R%d,%d\n", cpunum_get_active(), dst, imm3));
|
LOG(("Z8K '%s' LDCTL R%d,%d\n", Z.device->tag, dst, imm3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4519,7 +4519,7 @@ static void Z7D_ssss_1ccc(void)
|
|||||||
NSP = RW(src);
|
NSP = RW(src);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LOG(("Z8K#%d LDCTL %d,R%d\n", cpunum_get_active(), imm3, src));
|
LOG(("Z8K '%s' LDCTL %d,R%d\n", Z.device->tag, imm3, src));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4530,7 +4530,7 @@ static void Z7D_ssss_1ccc(void)
|
|||||||
static void Z7E_imm8(void)
|
static void Z7E_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvd7e $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvd7e $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -4826,7 +4826,7 @@ static void Z8D_imm4_0101(void)
|
|||||||
static void Z8E_imm8(void)
|
static void Z8E_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: ext8e $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: ext8e $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -4840,7 +4840,7 @@ static void Z8E_imm8(void)
|
|||||||
static void Z8F_imm8(void)
|
static void Z8F_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: ext8f $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: ext8f $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -4998,7 +4998,7 @@ static void Z9C_dddd_1000(void)
|
|||||||
static void Z9D_imm8(void)
|
static void Z9D_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvd9d $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvd9d $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -5039,7 +5039,7 @@ static void Z9E_0000_cccc(void)
|
|||||||
static void Z9F_imm8(void)
|
static void Z9F_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvd9f $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvd9f $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -5740,7 +5740,7 @@ static void ZB8_ddN0_1100_0000_rrrr_ssN0_0000(void)
|
|||||||
static void ZB9_imm8(void)
|
static void ZB9_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvdb9 $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvdb9 $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
@ -6398,7 +6398,7 @@ static void ZBE_aaaa_bbbb(void)
|
|||||||
static void ZBF_imm8(void)
|
static void ZBF_imm8(void)
|
||||||
{
|
{
|
||||||
GET_IMM8(0);
|
GET_IMM8(0);
|
||||||
LOG(("Z8K#%d %04x: rsvdbf $%02x\n", cpunum_get_active(), PC, imm8));
|
LOG(("Z8K '%s' %04x: rsvdbf $%02x\n", Z.device->tag, PC, imm8));
|
||||||
if (FCW & F_EPU) {
|
if (FCW & F_EPU) {
|
||||||
/* Z8001 EPU code goes here */
|
/* Z8001 EPU code goes here */
|
||||||
(void)imm8;
|
(void)imm8;
|
||||||
|
@ -1081,7 +1081,7 @@ static void registers_update(debug_view *view)
|
|||||||
const device_config *screen = Machine->primary_screen;
|
const device_config *screen = Machine->primary_screen;
|
||||||
|
|
||||||
/* cannot update if no active CPU */
|
/* cannot update if no active CPU */
|
||||||
if (cpunum_get_active() < 0)
|
if (Machine->activecpu != NULL)
|
||||||
return;
|
return;
|
||||||
total_cycles = cpu_get_total_cycles(Machine->activecpu);
|
total_cycles = cpu_get_total_cycles(Machine->activecpu);
|
||||||
|
|
||||||
@ -1465,7 +1465,7 @@ static void disasm_generate_bytes(offs_t pcbyte, int numbytes, const cpu_debug_d
|
|||||||
for the disassembly view
|
for the disassembly view
|
||||||
-------------------------------------------------*/
|
-------------------------------------------------*/
|
||||||
|
|
||||||
static int disasm_recompute(debug_view *view, offs_t pc, int startline, int lines, int original_cpunum)
|
static int disasm_recompute(debug_view *view, offs_t pc, int startline, int lines)
|
||||||
{
|
{
|
||||||
debug_view_disasm *dasmdata = view->extra_data;
|
debug_view_disasm *dasmdata = view->extra_data;
|
||||||
const cpu_debug_data *cpuinfo = cpu_get_debug_data(Machine->cpu[dasmdata->cpunum]);
|
const cpu_debug_data *cpuinfo = cpu_get_debug_data(Machine->cpu[dasmdata->cpunum]);
|
||||||
@ -1622,7 +1622,6 @@ static void disasm_update(debug_view *view)
|
|||||||
offs_t pc = cpu_get_reg(Machine->cpu[dasmdata->cpunum], REG_PC);
|
offs_t pc = cpu_get_reg(Machine->cpu[dasmdata->cpunum], REG_PC);
|
||||||
offs_t pcbyte = ADDR2BYTE_MASKED(pc, cpuinfo, ADDRESS_SPACE_PROGRAM);
|
offs_t pcbyte = ADDR2BYTE_MASKED(pc, cpuinfo, ADDRESS_SPACE_PROGRAM);
|
||||||
debug_view_char *dest = view->viewdata;
|
debug_view_char *dest = view->viewdata;
|
||||||
int original_cpunum = cpunum_get_active();
|
|
||||||
int recomputed_this_time = FALSE;
|
int recomputed_this_time = FALSE;
|
||||||
EXPRERR exprerr;
|
EXPRERR exprerr;
|
||||||
UINT32 row;
|
UINT32 row;
|
||||||
@ -1701,7 +1700,7 @@ recompute:
|
|||||||
view->left_col = 0;
|
view->left_col = 0;
|
||||||
|
|
||||||
/* recompute from where we last recomputed! */
|
/* recompute from where we last recomputed! */
|
||||||
disasm_recompute(view, BYTE2ADDR(dasmdata->address[0], cpuinfo, ADDRESS_SPACE_PROGRAM), 0, view->total_rows, original_cpunum);
|
disasm_recompute(view, BYTE2ADDR(dasmdata->address[0], cpuinfo, ADDRESS_SPACE_PROGRAM), 0, view->total_rows);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1709,7 +1708,7 @@ recompute:
|
|||||||
view->top_row = 0;
|
view->top_row = 0;
|
||||||
view->left_col = 0;
|
view->left_col = 0;
|
||||||
|
|
||||||
disasm_recompute(view, backpc, 0, view->total_rows, original_cpunum);
|
disasm_recompute(view, backpc, 0, view->total_rows);
|
||||||
}
|
}
|
||||||
recomputed_this_time = TRUE;
|
recomputed_this_time = TRUE;
|
||||||
}
|
}
|
||||||
@ -1726,7 +1725,7 @@ recompute:
|
|||||||
if (pcbyte == dasmdata->address[effrow])
|
if (pcbyte == dasmdata->address[effrow])
|
||||||
{
|
{
|
||||||
/* see if we changed */
|
/* see if we changed */
|
||||||
int changed = disasm_recompute(view, pc, effrow, 1, original_cpunum);
|
int changed = disasm_recompute(view, pc, effrow, 1);
|
||||||
if (changed && !recomputed_this_time)
|
if (changed && !recomputed_this_time)
|
||||||
{
|
{
|
||||||
dasmdata->recompute = TRUE;
|
dasmdata->recompute = TRUE;
|
||||||
|
@ -263,7 +263,7 @@ static UINT8 get_in_a_value(running_machine *machine, int which)
|
|||||||
|
|
||||||
if (!p->logged_port_a_not_connected && (p->ddr_a != 0xff))
|
if (!p->logged_port_a_not_connected && (p->ddr_a != 0xff))
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No port A read handler. Assuming pins 0x%02X not connected\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, p->ddr_a ^ 0xff);
|
logerror("PIA #%d: Warning! No port A read handler. Assuming pins 0x%02X not connected\n", which, p->ddr_a ^ 0xff);
|
||||||
p->logged_port_a_not_connected = TRUE;
|
p->logged_port_a_not_connected = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ static UINT8 get_in_b_value(running_machine *machine, int which)
|
|||||||
{
|
{
|
||||||
if (!p->logged_port_b_not_connected && (p->ddr_b != 0xff))
|
if (!p->logged_port_b_not_connected && (p->ddr_b != 0xff))
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Error! No port B read handler. Three-state pins 0x%02X are undefined\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, p->ddr_b ^ 0xff);
|
logerror("PIA #%d: Error! No port B read handler. Three-state pins 0x%02X are undefined\n", which, p->ddr_b ^ 0xff);
|
||||||
p->logged_port_b_not_connected = TRUE;
|
p->logged_port_b_not_connected = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ static void set_out_ca2(running_machine *machine, int which, int data)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (p->out_ca2_needs_pulled)
|
if (p->out_ca2_needs_pulled)
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No port CA2 write handler. Previous value has been lost!\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Warning! No port CA2 write handler. Previous value has been lost!\n", which);
|
||||||
|
|
||||||
p->out_ca2_needs_pulled = TRUE;
|
p->out_ca2_needs_pulled = TRUE;
|
||||||
}
|
}
|
||||||
@ -405,7 +405,7 @@ static void set_out_cb2(running_machine *machine, int which, int data)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (p->out_cb2_needs_pulled)
|
if (p->out_cb2_needs_pulled)
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No port CB2 write handler. Previous value has been lost!\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Warning! No port CB2 write handler. Previous value has been lost!\n", which);
|
||||||
|
|
||||||
p->out_cb2_needs_pulled = TRUE;
|
p->out_cb2_needs_pulled = TRUE;
|
||||||
}
|
}
|
||||||
@ -442,7 +442,7 @@ static UINT8 port_a_r(running_machine *machine, int which)
|
|||||||
set_out_ca2(machine, which, TRUE);
|
set_out_ca2(machine, which, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: port A read = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, ret));
|
LOG(("PIA #%d: port A read = %02X\n", which, ret));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@ static UINT8 ddr_a_r(running_machine *machine, int which)
|
|||||||
|
|
||||||
UINT8 ret = p->ddr_a;
|
UINT8 ret = p->ddr_a;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR A read = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, ret));
|
LOG(("PIA #%d: DDR A read = %02X\n", which, ret));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -478,7 +478,7 @@ static UINT8 port_b_r(running_machine *machine, int which)
|
|||||||
p->irq_b2 = FALSE;
|
p->irq_b2 = FALSE;
|
||||||
update_interrupts(machine, p);
|
update_interrupts(machine, p);
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: port B read = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, ret));
|
LOG(("PIA #%d: port B read = %02X\n", which, ret));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -490,7 +490,7 @@ static UINT8 ddr_b_r(running_machine *machine, int which)
|
|||||||
|
|
||||||
UINT8 ret = p->ddr_b;
|
UINT8 ret = p->ddr_b;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR B read = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, ret));
|
LOG(("PIA #%d: DDR B read = %02X\n", which, ret));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -508,7 +508,7 @@ static UINT8 control_a_r(running_machine *machine, int which)
|
|||||||
pia_set_input_ca1(which, p->intf->in_ca1_func(space, 0));
|
pia_set_input_ca1(which, p->intf->in_ca1_func(space, 0));
|
||||||
else if (!p->logged_ca1_not_connected && (!p->in_ca1_pushed))
|
else if (!p->logged_ca1_not_connected && (!p->in_ca1_pushed))
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No CA1 read handler. Assuming pin not connected\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Warning! No CA1 read handler. Assuming pin not connected\n", which);
|
||||||
p->logged_ca1_not_connected = TRUE;
|
p->logged_ca1_not_connected = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ static UINT8 control_a_r(running_machine *machine, int which)
|
|||||||
pia_set_input_ca2(which, p->intf->in_ca2_func(space, 0));
|
pia_set_input_ca2(which, p->intf->in_ca2_func(space, 0));
|
||||||
else if ( !p->logged_ca2_not_connected && C2_INPUT(p->ctl_a) && !p->in_ca2_pushed)
|
else if ( !p->logged_ca2_not_connected && C2_INPUT(p->ctl_a) && !p->in_ca2_pushed)
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No CA2 read handler. Assuming pin not connected\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Warning! No CA2 read handler. Assuming pin not connected\n", which);
|
||||||
p->logged_ca2_not_connected = TRUE;
|
p->logged_ca2_not_connected = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -530,7 +530,7 @@ static UINT8 control_a_r(running_machine *machine, int which)
|
|||||||
if (p->irq_a2 && C2_INPUT(p->ctl_a))
|
if (p->irq_a2 && C2_INPUT(p->ctl_a))
|
||||||
ret |= PIA_IRQ2;
|
ret |= PIA_IRQ2;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: control A read = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, ret));
|
LOG(("PIA #%d: control A read = %02X\n", which, ret));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -548,7 +548,7 @@ static UINT8 control_b_r(running_machine *machine, int which)
|
|||||||
pia_set_input_cb1(which, p->intf->in_cb1_func(space, 0));
|
pia_set_input_cb1(which, p->intf->in_cb1_func(space, 0));
|
||||||
else if (!p->logged_cb1_not_connected && !p->in_cb1_pushed)
|
else if (!p->logged_cb1_not_connected && !p->in_cb1_pushed)
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Error! no CB1 read handler. Three-state pin is undefined\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Error! no CB1 read handler. Three-state pin is undefined\n", which);
|
||||||
p->logged_cb1_not_connected = TRUE;
|
p->logged_cb1_not_connected = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -556,7 +556,7 @@ static UINT8 control_b_r(running_machine *machine, int which)
|
|||||||
pia_set_input_cb2(which, p->intf->in_cb2_func(space, 0));
|
pia_set_input_cb2(which, p->intf->in_cb2_func(space, 0));
|
||||||
else if (!p->logged_cb2_not_connected && C2_INPUT(p->ctl_b) && !p->in_cb2_pushed)
|
else if (!p->logged_cb2_not_connected && C2_INPUT(p->ctl_b) && !p->in_cb2_pushed)
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Error! No CB2 read handler. Three-state pin is undefined\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Error! No CB2 read handler. Three-state pin is undefined\n", which);
|
||||||
p->logged_cb2_not_connected = TRUE;
|
p->logged_cb2_not_connected = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,7 +570,7 @@ static UINT8 control_b_r(running_machine *machine, int which)
|
|||||||
if (p->irq_b2 && C2_INPUT(p->ctl_b))
|
if (p->irq_b2 && C2_INPUT(p->ctl_b))
|
||||||
ret |= PIA_IRQ2;
|
ret |= PIA_IRQ2;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: control B read = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, ret));
|
LOG(("PIA #%d: control B read = %02X\n", which, ret));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -641,14 +641,14 @@ static void send_to_out_a_func(running_machine *machine, int which, const char*
|
|||||||
/* input pins are pulled high */
|
/* input pins are pulled high */
|
||||||
UINT8 data = get_out_a_value(machine, which);
|
UINT8 data = get_out_a_value(machine, which);
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: %s = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, message, data));
|
LOG(("PIA #%d: %s = %02X\n", which, message, data));
|
||||||
|
|
||||||
if (p->intf->out_a_func)
|
if (p->intf->out_a_func)
|
||||||
p->intf->out_a_func(space, 0, data);
|
p->intf->out_a_func(space, 0, data);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (p->out_a_needs_pulled)
|
if (p->out_a_needs_pulled)
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No port A write handler. Previous value has been lost!\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Warning! No port A write handler. Previous value has been lost!\n", which);
|
||||||
|
|
||||||
p->out_a_needs_pulled = TRUE;
|
p->out_a_needs_pulled = TRUE;
|
||||||
}
|
}
|
||||||
@ -664,14 +664,14 @@ static void send_to_out_b_func(running_machine *machine, int which, const char*
|
|||||||
/* input pins are high-impedance - we just send them as zeros for backwards compatibility */
|
/* input pins are high-impedance - we just send them as zeros for backwards compatibility */
|
||||||
UINT8 data = get_out_b_value(which);
|
UINT8 data = get_out_b_value(which);
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: %s = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, message, data));
|
LOG(("PIA #%d: %s = %02X\n", which, message, data));
|
||||||
|
|
||||||
if (p->intf->out_b_func)
|
if (p->intf->out_b_func)
|
||||||
p->intf->out_b_func(space, 0, data);
|
p->intf->out_b_func(space, 0, data);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (p->out_b_needs_pulled)
|
if (p->out_b_needs_pulled)
|
||||||
logerror("cpu #%d (PC=%08X): PIA #%d: Warning! No port B write handler. Previous value has been lost!\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which);
|
logerror("PIA #%d: Warning! No port B write handler. Previous value has been lost!\n", which);
|
||||||
|
|
||||||
p->out_b_needs_pulled = TRUE;
|
p->out_b_needs_pulled = TRUE;
|
||||||
}
|
}
|
||||||
@ -694,11 +694,11 @@ static void ddr_a_w(running_machine *machine, int which, UINT8 data)
|
|||||||
pia6821 *p = &pias[which];
|
pia6821 *p = &pias[which];
|
||||||
|
|
||||||
if (data == 0x00)
|
if (data == 0x00)
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR A write = %02X (input mode)\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: DDR A write = %02X (input mode)\n", which, data));
|
||||||
else if (data == 0xff)
|
else if (data == 0xff)
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR A write = %02X (output mode)\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: DDR A write = %02X (output mode)\n", which, data));
|
||||||
else
|
else
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR A write = %02X (mixed mode)\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: DDR A write = %02X (mixed mode)\n", which, data));
|
||||||
|
|
||||||
if (p->ddr_a != data)
|
if (p->ddr_a != data)
|
||||||
{
|
{
|
||||||
@ -737,11 +737,11 @@ static void ddr_b_w(running_machine *machine, int which, UINT8 data)
|
|||||||
pia6821 *p = &pias[which];
|
pia6821 *p = &pias[which];
|
||||||
|
|
||||||
if (data == 0x00)
|
if (data == 0x00)
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR B write = %02X (input mode)\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: DDR B write = %02X (input mode)\n", which, data));
|
||||||
else if (data == 0xff)
|
else if (data == 0xff)
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR B write = %02X (output mode)\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: DDR B write = %02X (output mode)\n", which, data));
|
||||||
else
|
else
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: DDR B write = %02X (mixed mode)\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: DDR B write = %02X (mixed mode)\n", which, data));
|
||||||
|
|
||||||
if (p->ddr_b != data)
|
if (p->ddr_b != data)
|
||||||
{
|
{
|
||||||
@ -760,7 +760,7 @@ static void control_a_w(running_machine *machine, int which, UINT8 data)
|
|||||||
/* bit 7 and 6 are read only */
|
/* bit 7 and 6 are read only */
|
||||||
data &= 0x3f;
|
data &= 0x3f;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: control A write = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: control A write = %02X\n", which, data));
|
||||||
|
|
||||||
/* update the control register */
|
/* update the control register */
|
||||||
p->ctl_a = data;
|
p->ctl_a = data;
|
||||||
@ -793,7 +793,7 @@ static void control_b_w(running_machine *machine, int which, UINT8 data)
|
|||||||
/* bit 7 and 6 are read only */
|
/* bit 7 and 6 are read only */
|
||||||
data &= 0x3f;
|
data &= 0x3f;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: control B write = %02X\n", cpunum_get_active(), safe_cpu_get_pc(machine->activecpu), which, data));
|
LOG(("PIA #%d: control B write = %02X\n", which, data));
|
||||||
|
|
||||||
/* update the control register */
|
/* update the control register */
|
||||||
p->ctl_b = data;
|
p->ctl_b = data;
|
||||||
@ -879,7 +879,7 @@ void pia_set_input_a(int which, UINT8 data, UINT8 z_mask)
|
|||||||
|
|
||||||
assert_always(p->intf->in_a_func == NULL, "pia_set_input_a() called when in_a_func implemented");
|
assert_always(p->intf->in_a_func == NULL, "pia_set_input_a() called when in_a_func implemented");
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: set input port A = %02X\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which, data));
|
LOG(("PIA #%d: set input port A = %02X\n", which, data));
|
||||||
|
|
||||||
p->in_a = data;
|
p->in_a = data;
|
||||||
p->port_a_z_mask = z_mask;
|
p->port_a_z_mask = z_mask;
|
||||||
@ -919,13 +919,13 @@ void pia_set_input_ca1(int which, int data)
|
|||||||
/* limit the data to 0 or 1 */
|
/* limit the data to 0 or 1 */
|
||||||
data = data ? TRUE : FALSE;
|
data = data ? TRUE : FALSE;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: set input CA1 = %d\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which, data));
|
LOG(("PIA #%d: set input CA1 = %d\n", which, data));
|
||||||
|
|
||||||
/* the new state has caused a transition */
|
/* the new state has caused a transition */
|
||||||
if ((p->in_ca1 != data) &&
|
if ((p->in_ca1 != data) &&
|
||||||
((data && C1_LOW_TO_HIGH(p->ctl_a)) || (!data && C1_HIGH_TO_LOW(p->ctl_a))))
|
((data && C1_LOW_TO_HIGH(p->ctl_a)) || (!data && C1_HIGH_TO_LOW(p->ctl_a))))
|
||||||
{
|
{
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: CA1 triggering\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which));
|
LOG(("PIA #%d: CA1 triggering\n", which));
|
||||||
|
|
||||||
/* mark the IRQ */
|
/* mark the IRQ */
|
||||||
p->irq_a1 = TRUE;
|
p->irq_a1 = TRUE;
|
||||||
@ -966,14 +966,14 @@ void pia_set_input_ca2(int which, int data)
|
|||||||
/* limit the data to 0 or 1 */
|
/* limit the data to 0 or 1 */
|
||||||
data = data ? 1 : 0;
|
data = data ? 1 : 0;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: set input CA2 = %d\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which, data));
|
LOG(("PIA #%d: set input CA2 = %d\n", which, data));
|
||||||
|
|
||||||
/* if input mode and the new state has caused a transition */
|
/* if input mode and the new state has caused a transition */
|
||||||
if (C2_INPUT(p->ctl_a) &&
|
if (C2_INPUT(p->ctl_a) &&
|
||||||
(p->in_ca2 != data) &&
|
(p->in_ca2 != data) &&
|
||||||
((data && C2_LOW_TO_HIGH(p->ctl_a)) || (!data && C2_HIGH_TO_LOW(p->ctl_a))))
|
((data && C2_LOW_TO_HIGH(p->ctl_a)) || (!data && C2_HIGH_TO_LOW(p->ctl_a))))
|
||||||
{
|
{
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: CA2 triggering\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which));
|
LOG(("PIA #%d: CA2 triggering\n", which));
|
||||||
|
|
||||||
/* mark the IRQ */
|
/* mark the IRQ */
|
||||||
p->irq_a2 = TRUE;
|
p->irq_a2 = TRUE;
|
||||||
@ -1032,7 +1032,7 @@ void pia_set_input_b(int which, UINT8 data)
|
|||||||
|
|
||||||
assert_always(p->intf->in_b_func == NULL, "pia_set_input_b() called when in_b_func implemented");
|
assert_always(p->intf->in_b_func == NULL, "pia_set_input_b() called when in_b_func implemented");
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: set input port B = %02X\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which, data));
|
LOG(("PIA #%d: set input port B = %02X\n", which, data));
|
||||||
|
|
||||||
p->in_b = data;
|
p->in_b = data;
|
||||||
p->in_b_pushed = TRUE;
|
p->in_b_pushed = TRUE;
|
||||||
@ -1072,13 +1072,13 @@ void pia_set_input_cb1(int which, int data)
|
|||||||
/* limit the data to 0 or 1 */
|
/* limit the data to 0 or 1 */
|
||||||
data = data ? 1 : 0;
|
data = data ? 1 : 0;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: set input CB1 = %d\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which, data));
|
LOG(("PIA #%d: set input CB1 = %d\n", which, data));
|
||||||
|
|
||||||
/* the new state has caused a transition */
|
/* the new state has caused a transition */
|
||||||
if ((p->in_cb1 != data) &&
|
if ((p->in_cb1 != data) &&
|
||||||
((data && C1_LOW_TO_HIGH(p->ctl_b)) || (!data && C1_HIGH_TO_LOW(p->ctl_b))))
|
((data && C1_LOW_TO_HIGH(p->ctl_b)) || (!data && C1_HIGH_TO_LOW(p->ctl_b))))
|
||||||
{
|
{
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: CB1 triggering\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which));
|
LOG(("PIA #%d: CB1 triggering\n", which));
|
||||||
|
|
||||||
/* mark the IRQ */
|
/* mark the IRQ */
|
||||||
p->irq_b1 = 1;
|
p->irq_b1 = 1;
|
||||||
@ -1120,14 +1120,14 @@ void pia_set_input_cb2(int which, int data)
|
|||||||
/* limit the data to 0 or 1 */
|
/* limit the data to 0 or 1 */
|
||||||
data = data ? 1 : 0;
|
data = data ? 1 : 0;
|
||||||
|
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: set input CB2 = %d\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which, data));
|
LOG(("PIA #%d: set input CB2 = %d\n", which, data));
|
||||||
|
|
||||||
/* if input mode and the new state has caused a transition */
|
/* if input mode and the new state has caused a transition */
|
||||||
if (C2_INPUT(p->ctl_b) &&
|
if (C2_INPUT(p->ctl_b) &&
|
||||||
(p->in_cb2 != data) &&
|
(p->in_cb2 != data) &&
|
||||||
((data && C2_LOW_TO_HIGH(p->ctl_b)) || (!data && C2_HIGH_TO_LOW(p->ctl_b))))
|
((data && C2_LOW_TO_HIGH(p->ctl_b)) || (!data && C2_HIGH_TO_LOW(p->ctl_b))))
|
||||||
{
|
{
|
||||||
LOG(("cpu #%d (PC=%08X): PIA #%d: CB2 triggering\n", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), which));
|
LOG(("PIA #%d: CB2 triggering\n", which));
|
||||||
|
|
||||||
/* mark the IRQ */
|
/* mark the IRQ */
|
||||||
p->irq_b2 = 1;
|
p->irq_b2 = 1;
|
||||||
|
@ -21,7 +21,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -615,9 +615,7 @@ void cpu_interrupt_enable(int cpunum, int enabled)
|
|||||||
|
|
||||||
WRITE8_HANDLER( interrupt_enable_w )
|
WRITE8_HANDLER( interrupt_enable_w )
|
||||||
{
|
{
|
||||||
int activecpu = cpunum_get_active();
|
cpu_interrupt_enable(cpu_get_index(space->cpu), data);
|
||||||
assert_always(activecpu >= 0, "interrupt_enable_w() called with no active cpu!");
|
|
||||||
cpu_interrupt_enable(activecpu, data);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -628,9 +626,7 @@ WRITE8_HANDLER( interrupt_enable_w )
|
|||||||
|
|
||||||
READ8_HANDLER( interrupt_enable_r )
|
READ8_HANDLER( interrupt_enable_r )
|
||||||
{
|
{
|
||||||
int activecpu = cpunum_get_active();
|
return interrupt_enable[cpu_get_index(space->cpu)];
|
||||||
assert_always(activecpu >= 0, "interrupt_enable_r() called with no active cpu!");
|
|
||||||
return interrupt_enable[activecpu];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -137,8 +137,8 @@ READ32_HANDLER(pci_32le_r)
|
|||||||
|
|
||||||
if (LOG_PCI)
|
if (LOG_PCI)
|
||||||
{
|
{
|
||||||
logerror("pci_32le_r(): CPU #%d pc=0x%08X offset=%d result=0x%08X\n",
|
logerror("pci_32le_r(): CPU '%s' pc=0x%08X offset=%d result=0x%08X\n",
|
||||||
cpunum_get_active(), (unsigned) cpu_get_reg(space->cpu, REG_PC), offset, result);
|
space->cpu->tag, (unsigned) cpu_get_reg(space->cpu, REG_PC), offset, result);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -154,8 +154,8 @@ WRITE32_HANDLER(pci_32le_w)
|
|||||||
|
|
||||||
if (LOG_PCI)
|
if (LOG_PCI)
|
||||||
{
|
{
|
||||||
logerror("pci_32le_w(): CPU #%d pc=0x%08X offset=%d data=0x%08X\n",
|
logerror("pci_32le_w(): CPU '%s' pc=0x%08X offset=%d data=0x%08X\n",
|
||||||
cpunum_get_active(), (unsigned) cpu_get_reg(space->cpu, REG_PC), offset, data);
|
space->cpu->tag, (unsigned) cpu_get_reg(space->cpu, REG_PC), offset, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(offset)
|
switch(offset)
|
||||||
|
@ -26,7 +26,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -599,7 +599,7 @@ void mame_schedule_soft_reset(running_machine *machine)
|
|||||||
mame_pause(machine, FALSE);
|
mame_pause(machine, FALSE);
|
||||||
|
|
||||||
/* if we're executing, abort out immediately */
|
/* if we're executing, abort out immediately */
|
||||||
if (cpunum_get_active() >= 0)
|
if (machine->activecpu != NULL)
|
||||||
cpu_eat_cycles(machine->activecpu, 1000000000);
|
cpu_eat_cycles(machine->activecpu, 1000000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -616,7 +616,7 @@ void mame_schedule_new_driver(running_machine *machine, const game_driver *drive
|
|||||||
mame->new_driver_pending = driver;
|
mame->new_driver_pending = driver;
|
||||||
|
|
||||||
/* if we're executing, abort out immediately */
|
/* if we're executing, abort out immediately */
|
||||||
if (cpunum_get_active() >= 0)
|
if (machine->activecpu != NULL)
|
||||||
cpu_eat_cycles(machine->activecpu, 1000000000);
|
cpu_eat_cycles(machine->activecpu, 1000000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ static WRITE8_HANDLER( lnc_w )
|
|||||||
else if (offset == 0x9000) { return; } /* SMH_NOP */
|
else if (offset == 0x9000) { return; } /* SMH_NOP */
|
||||||
else if (offset == 0x9002) { audio_command_w(space,0,data); return; }
|
else if (offset == 0x9002) { audio_command_w(space,0,data); return; }
|
||||||
else if (offset >= 0xb000 && offset <= 0xb1ff) ;
|
else if (offset >= 0xb000 && offset <= 0xb1ff) ;
|
||||||
else logerror("CPU #%d PC %04x: warning - write %02x to unmapped memory address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset);
|
else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n",space->cpu->tag,cpu_get_pc(space->cpu),data,offset);
|
||||||
|
|
||||||
rambase[offset] = data;
|
rambase[offset] = data;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ static WRITE8_HANDLER( mmonkey_w )
|
|||||||
else if (offset == 0x9000) { return; } /* SMH_NOP */
|
else if (offset == 0x9000) { return; } /* SMH_NOP */
|
||||||
else if (offset == 0x9002) { audio_command_w(space,0,data); return; }
|
else if (offset == 0x9002) { audio_command_w(space,0,data); return; }
|
||||||
else if (offset >= 0xb000 && offset <= 0xbfff) { mmonkey_protection_w(space,offset - 0xb000, data); return; }
|
else if (offset >= 0xb000 && offset <= 0xbfff) { mmonkey_protection_w(space,offset - 0xb000, data); return; }
|
||||||
else logerror("CPU #%d PC %04x: warning - write %02x to unmapped memory address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset);
|
else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n",space->cpu->tag,cpu_get_pc(space->cpu),data,offset);
|
||||||
|
|
||||||
rambase[offset] = data;
|
rambase[offset] = data;
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ static WRITE8_HANDLER( btime_w )
|
|||||||
else if (offset == 0x4002) btime_video_control_w(space,0,data);
|
else if (offset == 0x4002) btime_video_control_w(space,0,data);
|
||||||
else if (offset == 0x4003) audio_command_w(space,0,data);
|
else if (offset == 0x4003) audio_command_w(space,0,data);
|
||||||
else if (offset == 0x4004) bnj_scroll1_w(space,0,data);
|
else if (offset == 0x4004) bnj_scroll1_w(space,0,data);
|
||||||
else logerror("CPU #%d PC %04x: warning - write %02x to unmapped memory address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset);
|
else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n",space->cpu->tag,cpu_get_pc(space->cpu),data,offset);
|
||||||
|
|
||||||
rambase[offset] = data;
|
rambase[offset] = data;
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ static WRITE8_HANDLER( tisland_w )
|
|||||||
else if (offset == 0x4004) bnj_scroll1_w(space,0,data);
|
else if (offset == 0x4004) bnj_scroll1_w(space,0,data);
|
||||||
else if (offset == 0x4005) bnj_scroll2_w(space,0,data);
|
else if (offset == 0x4005) bnj_scroll2_w(space,0,data);
|
||||||
// else if (offset == 0x8000) btime_video_control_w(space,0,data);
|
// else if (offset == 0x8000) btime_video_control_w(space,0,data);
|
||||||
else logerror("CPU #%d PC %04x: warning - write %02x to unmapped memory address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset);
|
else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n",space->cpu->tag,cpu_get_pc(space->cpu),data,offset);
|
||||||
|
|
||||||
|
|
||||||
rambase[offset] = data;
|
rambase[offset] = data;
|
||||||
@ -198,7 +198,7 @@ static WRITE8_HANDLER( zoar_w )
|
|||||||
else if (offset == 0x9804) bnj_scroll2_w(space,0,data);
|
else if (offset == 0x9804) bnj_scroll2_w(space,0,data);
|
||||||
else if (offset == 0x9805) bnj_scroll1_w(space,0,data);
|
else if (offset == 0x9805) bnj_scroll1_w(space,0,data);
|
||||||
else if (offset == 0x9806) audio_command_w(space,0,data);
|
else if (offset == 0x9806) audio_command_w(space,0,data);
|
||||||
else logerror("CPU #%d PC %04x: warning - write %02x to unmapped memory address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset);
|
else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n",space->cpu->tag,cpu_get_pc(space->cpu),data,offset);
|
||||||
|
|
||||||
rambase[offset] = data;
|
rambase[offset] = data;
|
||||||
|
|
||||||
@ -212,7 +212,7 @@ static WRITE8_HANDLER( disco_w )
|
|||||||
else if (offset >= 0x8000 && offset <= 0x881f) ;
|
else if (offset >= 0x8000 && offset <= 0x881f) ;
|
||||||
else if (offset == 0x9a00) audio_command_w(space,0,data);
|
else if (offset == 0x9a00) audio_command_w(space,0,data);
|
||||||
else if (offset == 0x9c00) disco_video_control_w(space,0,data);
|
else if (offset == 0x9c00) disco_video_control_w(space,0,data);
|
||||||
else logerror("CPU #%d PC %04x: warning - write %02x to unmapped memory address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset);
|
else logerror("CPU '%s' PC %04x: warning - write %02x to unmapped memory address %04x\n",space->cpu->tag,cpu_get_pc(space->cpu),data,offset);
|
||||||
|
|
||||||
rambase[offset] = data;
|
rambase[offset] = data;
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ static READ8_HANDLER( ddragon_spriteram_r )
|
|||||||
|
|
||||||
static WRITE8_HANDLER( ddragon_spriteram_w )
|
static WRITE8_HANDLER( ddragon_spriteram_w )
|
||||||
{
|
{
|
||||||
if (cpunum_get_active() == 1 && offset == 0)
|
if (space->cpu == space->machine->cpu[1] && offset == 0)
|
||||||
dd_sub_cpu_busy = 1;
|
dd_sub_cpu_busy = 1;
|
||||||
|
|
||||||
ddragon_spriteram[offset] = data;
|
ddragon_spriteram[offset] = data;
|
||||||
|
@ -31,7 +31,7 @@ static CUSTOM_INPUT( dorachan_protection_r )
|
|||||||
{
|
{
|
||||||
UINT8 ret = 0;
|
UINT8 ret = 0;
|
||||||
|
|
||||||
if ((cpunum_get_active() >= 0))
|
if (field->port->machine->activecpu != NULL)
|
||||||
{
|
{
|
||||||
switch (cpu_get_previouspc(field->port->machine->activecpu))
|
switch (cpu_get_previouspc(field->port->machine->activecpu))
|
||||||
{
|
{
|
||||||
|
@ -528,7 +528,7 @@ GALPANI3_MCU_COM_W(3)
|
|||||||
|
|
||||||
static READ16_HANDLER( galpani3_mcu_status_r )
|
static READ16_HANDLER( galpani3_mcu_status_r )
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%06X): read mcu status\n", cpunum_get_active(), cpu_get_previouspc(space->cpu));
|
logerror("cpu '%s' (PC=%06X): read mcu status\n", space->cpu->tag, cpu_get_previouspc(space->cpu));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -550,7 +550,7 @@ READ16_HANDLER( galpani3_regs1_r )
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
logerror("cpu #%d (PC=%06X): galpani3_regs1_r %02x %04x\n", cpunum_get_active(), cpu_get_previouspc(space->cpu), offset, mem_mask);
|
logerror("cpu '%s' (PC=%06X): galpani3_regs1_r %02x %04x\n", space->cpu->tag, cpu_get_previouspc(space->cpu), offset, mem_mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -575,7 +575,7 @@ READ16_HANDLER( galpani3_regs2_r )
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
logerror("cpu #%d (PC=%06X): galpani3_regs2_r %02x %04x\n", cpunum_get_active(), cpu_get_previouspc(space->cpu), offset, mem_mask);
|
logerror("cpu '%s' (PC=%06X): galpani3_regs2_r %02x %04x\n", space->cpu->tag, cpu_get_previouspc(space->cpu), offset, mem_mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -600,7 +600,7 @@ READ16_HANDLER( galpani3_regs3_r )
|
|||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
logerror("cpu #%d (PC=%06X): galpani3_regs3_r %02x %04x\n", cpunum_get_active(), cpu_get_previouspc(space->cpu), offset, mem_mask);
|
logerror("cpu '%s' (PC=%06X): galpani3_regs3_r %02x %04x\n", space->cpu->tag, cpu_get_previouspc(space->cpu), offset, mem_mask);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -286,7 +286,7 @@ JCHAN_MCU_COM_W(3)
|
|||||||
|
|
||||||
static READ16_HANDLER( jchan_mcu_status_r )
|
static READ16_HANDLER( jchan_mcu_status_r )
|
||||||
{
|
{
|
||||||
logerror("cpu #%d (PC=%06X): read mcu status\n", cpunum_get_active(), cpu_get_previouspc(space->cpu));
|
logerror("cpu '%s' (PC=%06X): read mcu status\n", space->cpu->tag, cpu_get_previouspc(space->cpu));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -317,7 +317,7 @@ static WRITE64_HANDLER(unk4_w)
|
|||||||
{
|
{
|
||||||
if (data & 0x800000)
|
if (data & 0x800000)
|
||||||
{
|
{
|
||||||
mame_printf_debug("CPU%d: CPU1 IRQ at %08X\n", cpunum_get_active(), cpu_get_pc(space->cpu));
|
mame_printf_debug("CPU '%s': CPU1 IRQ at %08X\n", space->cpu->tag, cpu_get_pc(space->cpu));
|
||||||
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_IRQ0, ASSERT_LINE);
|
cpu_set_input_line(space->machine->cpu[1], INPUT_LINE_IRQ0, ASSERT_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1075,7 +1075,7 @@ static READ64_HANDLER(cpu_r)
|
|||||||
|
|
||||||
if (ACCESSING_BITS_32_63)
|
if (ACCESSING_BITS_32_63)
|
||||||
{
|
{
|
||||||
r = (UINT64)(cpunum_get_active() ? 0x80000000 : 0);
|
r = (UINT64)((space->machine->activecpu != space->machine->cpu[0]) ? 0x80000000 : 0);
|
||||||
//r |= 0x40000000; // sets Video-LowRes !?
|
//r |= 0x40000000; // sets Video-LowRes !?
|
||||||
return r << 32;
|
return r << 32;
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -281,7 +281,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
logerror( "%02x:%08x: %s", cpunum_get_active(), safe_cpu_get_pc(Machine->activecpu), buf );
|
logerror( "'%s':%08x: %s", Machine->activecpu->tag, safe_cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -940,7 +940,7 @@ INLINE void ATTR_PRINTF(2,3) verboselog( int n_level, const char *s_fmt, ... )
|
|||||||
va_start( v, s_fmt );
|
va_start( v, s_fmt );
|
||||||
vsprintf( buf, s_fmt, v );
|
vsprintf( buf, s_fmt, v );
|
||||||
va_end( v );
|
va_end( v );
|
||||||
if( cpunum_get_active() != -1 )
|
if( Machine->activecpu != NULL )
|
||||||
{
|
{
|
||||||
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
logerror( "%08x: %s", cpu_get_pc(Machine->activecpu), buf );
|
||||||
}
|
}
|
||||||
|
@ -607,7 +607,7 @@ static WRITE16_HANDLER( dspram16_w )
|
|||||||
}
|
}
|
||||||
else if( namcos2_gametype == NAMCOS21_SOLVALOU &&
|
else if( namcos2_gametype == NAMCOS21_SOLVALOU &&
|
||||||
offset == 0x103 &&
|
offset == 0x103 &&
|
||||||
cpunum_get_active()==0 )
|
space->cpu == space->machine->cpu[0] )
|
||||||
{ /* hack; synchronization for solvalou */
|
{ /* hack; synchronization for solvalou */
|
||||||
cpu_yield(space->cpu);
|
cpu_yield(space->cpu);
|
||||||
}
|
}
|
||||||
@ -967,8 +967,8 @@ static WRITE16_HANDLER( pointram_control_w )
|
|||||||
|
|
||||||
/* pointram_control&0x20 : bank for depthcue data */
|
/* pointram_control&0x20 : bank for depthcue data */
|
||||||
/*
|
/*
|
||||||
logerror( "dsp_control_w:%x:%x[%x]:=%04x ",
|
logerror( "dsp_control_w:'%s':%x[%x]:=%04x ",
|
||||||
cpunum_get_active(),
|
space->cpu->tag,
|
||||||
cpu_get_pc(space->cpu),
|
cpu_get_pc(space->cpu),
|
||||||
offset,
|
offset,
|
||||||
pointram_control );
|
pointram_control );
|
||||||
|
@ -592,7 +592,7 @@ static CUSTOM_INPUT( get_audio_result )
|
|||||||
{
|
{
|
||||||
UINT32 ret = audio_result;
|
UINT32 ret = audio_result;
|
||||||
|
|
||||||
// if (LOG_CPU_COMM && (cpunum_get_active() >= 0)) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc(machine->activecpu), ret);
|
// if (LOG_CPU_COMM && (field->port->machine->activecpu != NULL)) logerror("MAIN CPU PC %06x: audio_result_r %02x\n", cpu_get_pc(field->port->machine->activecpu), ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -328,13 +328,11 @@ static WRITE8_HANDLER( polepos_latch_w )
|
|||||||
|
|
||||||
static WRITE16_HANDLER( polepos_z8002_nvi_enable_w )
|
static WRITE16_HANDLER( polepos_z8002_nvi_enable_w )
|
||||||
{
|
{
|
||||||
int which = cpunum_get_active();
|
|
||||||
|
|
||||||
data &= 1;
|
data &= 1;
|
||||||
|
|
||||||
cpu_interrupt_enable(which,data);
|
cpu_interrupt_enable(cpu_get_index(space->cpu),data);
|
||||||
if (!data)
|
if (!data)
|
||||||
cpu_set_input_line(space->machine->cpu[which], 0, CLEAR_LINE);
|
cpu_set_input_line(space->cpu, 0, CLEAR_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -899,7 +899,7 @@ static READ8_HANDLER( routex_prot_read )
|
|||||||
{
|
{
|
||||||
if (cpu_get_pc(space->cpu) == 0x2f) return 0xfb;
|
if (cpu_get_pc(space->cpu) == 0x2f) return 0xfb;
|
||||||
|
|
||||||
logerror ("cpu #%d (PC=%08X): unmapped prot read\n", cpunum_get_active(), cpu_get_pc(space->cpu));
|
logerror ("cpu '%s' (PC=%08X): unmapped prot read\n", space->cpu->tag, cpu_get_pc(space->cpu));
|
||||||
return 0x00;
|
return 0x00;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user