diff options
author | 2010-03-08 17:06:27 +0000 | |
---|---|---|
committer | 2010-03-08 17:06:27 +0000 | |
commit | ec586731b9a1d8bb7a4d48de9ada4e8905a4f74e (patch) | |
tree | da971ef612bddc69e8d748f920ac52fe71d7c63b /src/emu/cpu/z80 | |
parent | 5826c45ea48778bd9bf513fef1311a77c447ff8e (diff) |
Made device->tag and devconfig->tag into private member variables (m_tag).
Added inline tag() function to return a const char * version. Updated
callers to use this instead of directly accessing tag.cstr() which
was awkward.
Diffstat (limited to 'src/emu/cpu/z80')
-rw-r--r-- | src/emu/cpu/z80/z80.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/cpu/z80/z80.c b/src/emu/cpu/z80/z80.c index c49ec78a49a..2701f01bb75 100644 --- a/src/emu/cpu/z80/z80.c +++ b/src/emu/cpu/z80/z80.c @@ -824,7 +824,7 @@ INLINE UINT32 ARG16(z80_state *z80) ***************************************************************/ #define RETN(Z) do { \ LOG(("Z80 '%s' RETN z80->iff1:%d z80->iff2:%d\n", \ - (Z)->device->tag.cstr(), (Z)->iff1, (Z)->iff2)); \ + (Z)->device->tag(), (Z)->iff1, (Z)->iff2)); \ POP((Z), pc); \ (Z)->WZ = (Z)->PC; \ (Z)->iff1 = (Z)->iff2; \ @@ -2093,7 +2093,7 @@ OP(xycb,ff) { z80->A = SET(7, RM(z80, z80->ea)); WM(z80, z80->ea,z80->A); } /* OP(illegal,1) { logerror("Z80 '%s' ill. opcode $%02x $%02x\n", - z80->device->tag.cstr(), memory_decrypted_read_byte(z80->program, (z80->PCD-1)&0xffff), memory_decrypted_read_byte(z80->program, z80->PCD)); + z80->device->tag(), memory_decrypted_read_byte(z80->program, (z80->PCD-1)&0xffff), memory_decrypted_read_byte(z80->program, z80->PCD)); } /********************************************************** @@ -2681,7 +2681,7 @@ OP(fd,ff) { illegal_1(z80); op_ff(z80); } /* DB FD */ OP(illegal,2) { logerror("Z80 '%s' ill. opcode $ed $%02x\n", - z80->device->tag.cstr(), memory_decrypted_read_byte(z80->program, (z80->PCD-1)&0xffff)); + z80->device->tag(), memory_decrypted_read_byte(z80->program, (z80->PCD-1)&0xffff)); } /********************************************************** @@ -3289,7 +3289,7 @@ static void take_interrupt(z80_state *z80) else irq_vector = (*z80->irq_callback)(z80->device, 0); - LOG(("Z80 '%s' single int. irq_vector $%02x\n", z80->device->tag.cstr(), irq_vector)); + LOG(("Z80 '%s' single int. irq_vector $%02x\n", z80->device->tag(), irq_vector)); /* Interrupt mode 2. Call [i:databyte] */ if( z80->im == 2 ) @@ -3297,7 +3297,7 @@ static void take_interrupt(z80_state *z80) irq_vector = (irq_vector & 0xff) | (z80->i << 8); PUSH(z80, pc); RM16(z80, irq_vector, &z80->pc); - LOG(("Z80 '%s' IM2 [$%04x] = $%04x\n", z80->device->tag.cstr(), irq_vector, z80->PCD)); + LOG(("Z80 '%s' IM2 [$%04x] = $%04x\n", z80->device->tag(), irq_vector, z80->PCD)); /* CALL opcode timing + 'interrupt latency' cycles */ z80->icount -= z80->cc_op[0xcd] + z80->cc_ex[0xff]; } @@ -3305,7 +3305,7 @@ static void take_interrupt(z80_state *z80) /* Interrupt mode 1. RST 38h */ if( z80->im == 1 ) { - LOG(("Z80 '%s' IM1 $0038\n", z80->device->tag.cstr())); + LOG(("Z80 '%s' IM1 $0038\n", z80->device->tag())); PUSH(z80, pc); z80->PCD = 0x0038; /* RST $38 + 'interrupt latency' cycles */ @@ -3316,7 +3316,7 @@ static void take_interrupt(z80_state *z80) /* Interrupt mode 0. We check for CALL and JP instructions, */ /* if neither of these were found we assume a 1 byte opcode */ /* was placed on the databus */ - LOG(("Z80 '%s' IM0 $%04x\n", z80->device->tag.cstr(), irq_vector)); + LOG(("Z80 '%s' IM0 $%04x\n", z80->device->tag(), irq_vector)); /* check for nop */ if (irq_vector != 0x00) @@ -3530,7 +3530,7 @@ static CPU_EXECUTE( z80 ) /* to just check here */ if (z80->nmi_pending) { - LOG(("Z80 '%s' take NMI\n", z80->device->tag.cstr())); + LOG(("Z80 '%s' take NMI\n", z80->device->tag())); z80->PRVPC = -1; /* there isn't a valid previous program counter */ LEAVE_HALT(z80); /* Check if processor was halted */ |