diff --git a/src/mame/drivers/segas24.c b/src/mame/drivers/segas24.c index e12b13b3aa8..1323cc744f5 100644 --- a/src/mame/drivers/segas24.c +++ b/src/mame/drivers/segas24.c @@ -710,7 +710,7 @@ static void reset_reset(running_machine *machine) static void resetcontrol_w(UINT8 data) { resetcontrol = data; - logerror("Reset control %02x (%x:%x)\n", resetcontrol, cpunum_get_active(), cpu_get_pc(Machine->activecpu)); + logerror("Reset control %02x (%d:%x)\n", resetcontrol, cpunum_get_active(), cpu_get_pc(Machine->activecpu)); reset_reset(Machine); } @@ -786,7 +786,7 @@ static WRITE16_HANDLER( mlatch_w ) int i; UINT8 mxor = 0; if(!mlatch_table) { - logerror("Protection: magic latch accessed but no table loaded (%d:%x)\n", cpunum_get_active(), cpu_get_pc(space->cpu)); + logerror("Protection: magic latch accessed but no table loaded (%s:%x)\n", space->cpu->tag, cpu_get_pc(space->cpu)); return; } @@ -797,9 +797,9 @@ static WRITE16_HANDLER( mlatch_w ) if(mlatch & (1<cpu)); + logerror("Magic latching %02x ^ %02x as %02x (%s:%x)\n", data & 0xff, mxor, mlatch, space->cpu->tag, cpu_get_pc(space->cpu)); } else { - logerror("Magic latch reset (%d:%x)\n", cpunum_get_active(), cpu_get_pc(space->cpu)); + logerror("Magic latch reset (%s:%x)\n", space->cpu->tag, cpu_get_pc(space->cpu)); mlatch = 0x00; } } diff --git a/src/mame/drivers/stv.c b/src/mame/drivers/stv.c index fa238c7b83d..772e6dae779 100644 --- a/src/mame/drivers/stv.c +++ b/src/mame/drivers/stv.c @@ -479,7 +479,7 @@ static UINT8 stv_SMPC_r8 (running_machine *machine, int offset) if (cpu_get_pc(machine->activecpu)==0x060020E6) return_data = 0x10;//??? - //if(LOG_SMPC) logerror ("cpu #%d (PC=%08X) SMPC: Read from Byte Offset %02x Returns %02x\n", cpunum_get_active(), cpu_get_pc(machine->activecpu), offset, return_data); + //if(LOG_SMPC) logerror ("cpu %s (PC=%08X) SMPC: Read from Byte Offset %02x Returns %02x\n", space->cpu->tag, cpu_get_pc(machine->activecpu), offset, return_data); return return_data; @@ -892,7 +892,7 @@ static READ32_HANDLER ( stv_io_r32 ) } break; case 7: - if(LOG_IOGA) logerror("(PC %d=%06x) Warning: READ from PORT_AD\n",cpunum_get_active(), cpu_get_pc(space->cpu)); + if(LOG_IOGA) logerror("(PC %s=%06x) Warning: READ from PORT_AD\n", space->cpu->tag, cpu_get_pc(space->cpu)); popmessage("Read from PORT_AD"); port_i++; return port_ad[port_i & 7]; @@ -1344,8 +1344,8 @@ static WRITE32_HANDLER( stv_scu_w32 ) stv_scu[40] != 0xfffffffc && stv_scu[40] != 0xffffffff) { - if(LOG_SCU) logerror("cpu #%d (PC=%08X) IRQ mask reg set %08x = %d%d%d%d|%d%d%d%d|%d%d%d%d|%d%d%d%d\n", - cpunum_get_active(), cpu_get_pc(space->cpu), + if(LOG_SCU) logerror("cpu %s (PC=%08X) IRQ mask reg set %08x = %d%d%d%d|%d%d%d%d|%d%d%d%d|%d%d%d%d\n", + space->cpu->tag, cpu_get_pc(space->cpu), stv_scu[offset], stv_scu[offset] & 0x8000 ? 1 : 0, /*A-Bus irq*/ stv_scu[offset] & 0x4000 ? 1 : 0, /**/ @@ -1966,7 +1966,7 @@ static WRITE32_HANDLER( stv_scsp_regs_w32 ) * Enter into Radiant Silver Gun specific menu for a test... */ static WRITE32_HANDLER( minit_w ) { - logerror("cpu #%d (PC=%08X) MINIT write = %08x\n",cpunum_get_active(), cpu_get_pc(space->cpu),data); + logerror("cpu %s (PC=%08X) MINIT write = %08x\n", space->cpu->tag, cpu_get_pc(space->cpu),data); cpuexec_boost_interleave(space->machine, minit_boost_timeslice, ATTOTIME_IN_USEC(minit_boost)); cpuexec_trigger(space->machine, 1000); cpu_set_info_int(space->machine->cpu[1], CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE); @@ -1974,7 +1974,7 @@ static WRITE32_HANDLER( minit_w ) static WRITE32_HANDLER( sinit_w ) { - logerror("cpu #%d (PC=%08X) SINIT write = %08x\n",cpunum_get_active(), cpu_get_pc(space->cpu),data); + logerror("cpu %s (PC=%08X) SINIT write = %08x\n", space->cpu->tag, cpu_get_pc(space->cpu),data); cpuexec_boost_interleave(space->machine, sinit_boost_timeslice, ATTOTIME_IN_USEC(sinit_boost)); cpu_set_info_int(space->machine->cpu[0], CPUINFO_INT_SH2_FRT_INPUT, PULSE_LINE); } @@ -2290,7 +2290,7 @@ static WRITE32_HANDLER ( w60ffc44_write ) { COMBINE_DATA(&stv_workram_h[0xffc44/4]); - logerror("cpu #%d (PC=%08X): 60ffc44_write write = %08X & %08X\n", cpunum_get_active(), cpu_get_pc(space->cpu), data, mem_mask); + logerror("cpu %s (PC=%08X): 60ffc44_write write = %08X & %08X\n", space->cpu->tag, cpu_get_pc(space->cpu), data, mem_mask); //sinit_w(offset,data,mem_mask); } @@ -2298,7 +2298,7 @@ static WRITE32_HANDLER ( w60ffc48_write ) { COMBINE_DATA(&stv_workram_h[0xffc48/4]); - logerror("cpu #%d (PC=%08X): 60ffc48_write write = %08X & %08X\n", cpunum_get_active(), cpu_get_pc(space->cpu), data, mem_mask); + logerror("cpu %s (PC=%08X): 60ffc48_write write = %08X & %08X\n", space->cpu->tag, cpu_get_pc(space->cpu), data, mem_mask); //minit_w(offset,data,mem_mask); } diff --git a/src/mame/machine/decocass.c b/src/mame/machine/decocass.c index 60a5e9acc11..3de5bb993c0 100644 --- a/src/mame/machine/decocass.c +++ b/src/mame/machine/decocass.c @@ -103,7 +103,7 @@ WRITE8_HANDLER( decocass_coin_counter_w ) WRITE8_HANDLER( decocass_sound_command_w ) { - LOG(2,("CPU #%d sound command -> $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound command -> $%02x\n", space->cpu->tag, data)); soundlatch_w(space,0,data); decocass_sound_ack |= 0x80; /* remove snd cpu data ack bit. i don't see it in the schems, but... */ @@ -114,20 +114,20 @@ WRITE8_HANDLER( decocass_sound_command_w ) READ8_HANDLER( decocass_sound_data_r ) { UINT8 data = soundlatch2_r(space, 0); - LOG(2,("CPU #%d sound data <- $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound data <- $%02x\n", space->cpu->tag, data)); return data; } READ8_HANDLER( decocass_sound_ack_r ) { UINT8 data = decocass_sound_ack; /* D6+D7 */ - LOG(4,("CPU #%d sound ack <- $%02x\n", cpunum_get_active(), data)); + LOG(4,("CPU %s sound ack <- $%02x\n", space->cpu->tag, data)); return data; } WRITE8_HANDLER( decocass_sound_data_w ) { - LOG(2,("CPU #%d sound data -> $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound data -> $%02x\n", space->cpu->tag, data)); soundlatch2_w(space, 0, data); decocass_sound_ack |= 0x40; } @@ -135,7 +135,7 @@ WRITE8_HANDLER( decocass_sound_data_w ) READ8_HANDLER( decocass_sound_command_r ) { UINT8 data = soundlatch_r(space, 0); - LOG(4,("CPU #%d sound command <- $%02x\n", cpunum_get_active(), data)); + LOG(4,("CPU %s sound command <- $%02x\n", space->cpu->tag, data)); cpu_set_input_line(space->machine->cpu[1], M6502_IRQ_LINE, CLEAR_LINE); decocass_sound_ack &= ~0x80; return data; @@ -148,14 +148,14 @@ static TIMER_CALLBACK( decocass_sound_nmi_pulse ) WRITE8_HANDLER( decocass_sound_nmi_enable_w ) { - LOG(2,("CPU #%d sound NMI enb -> $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound NMI enb -> $%02x\n", space->cpu->tag, data)); timer_adjust_periodic(decocass_sound_timer, ATTOTIME_IN_HZ(256 * 57 / 8 / 2), 0, ATTOTIME_IN_HZ(256 * 57 / 8 / 2)); } READ8_HANDLER( decocass_sound_nmi_enable_r ) { UINT8 data = 0xff; - LOG(2,("CPU #%d sound NMI enb <- $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound NMI enb <- $%02x\n", space->cpu->tag, data)); timer_adjust_periodic(decocass_sound_timer, ATTOTIME_IN_HZ(256 * 57 / 8 / 2), 0, ATTOTIME_IN_HZ(256 * 57 / 8 / 2)); return data; } @@ -163,14 +163,14 @@ READ8_HANDLER( decocass_sound_nmi_enable_r ) READ8_HANDLER( decocass_sound_data_ack_reset_r ) { UINT8 data = 0xff; - LOG(2,("CPU #%d sound ack rst <- $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound ack rst <- $%02x\n", space->cpu->tag, data)); decocass_sound_ack &= ~0x40; return data; } WRITE8_HANDLER( decocass_sound_data_ack_reset_w ) { - LOG(2,("CPU #%d sound ack rst -> $%02x\n", cpunum_get_active(), data)); + LOG(2,("CPU %s sound ack rst -> $%02x\n", space->cpu->tag, data)); decocass_sound_ack &= ~0x40; } diff --git a/src/mame/machine/kaneko16.c b/src/mame/machine/kaneko16.c index 8b8b3faed67..1260fb20863 100644 --- a/src/mame/machine/kaneko16.c +++ b/src/mame/machine/kaneko16.c @@ -703,7 +703,7 @@ TOYBOX_MCU_COM_W(3) */ READ16_HANDLER( toybox_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; // most games test bit 0 for failure } diff --git a/src/mame/machine/namcos1.c b/src/mame/machine/namcos1.c index 6b3c781c6d3..701ab67f7ab 100644 --- a/src/mame/machine/namcos1.c +++ b/src/mame/machine/namcos1.c @@ -113,13 +113,13 @@ static UINT8 key[8]; static READ8_HANDLER( no_key_r ) { - popmessage("CPU #%d PC %08x: keychip read %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset); + popmessage("CPU %s PC %08x: keychip read %04x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset); return 0; } static WRITE8_HANDLER( no_key_w ) { - popmessage("CPU #%d PC %08x: keychip write %04x=%02x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset,data); + popmessage("CPU %s PC %08x: keychip write %04x=%02x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset, data); } @@ -224,7 +224,7 @@ CPU #0 PC e3d4: keychip read 0003 [AND #$37 = key no.] */ static READ8_HANDLER( key_type1_r ) { -// logerror("CPU #%d PC %04x: keychip read %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset); +// logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset); if (offset < 3) { @@ -255,7 +255,7 @@ static READ8_HANDLER( key_type1_r ) static WRITE8_HANDLER( key_type1_w ) { -// logerror("CPU #%d PC %04x: keychip write %04x=%02x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset,data); +// logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset, data); if (offset < 4) key[offset] = data; @@ -407,7 +407,7 @@ CPU #0 PC e574: keychip read 0001 static READ8_HANDLER( key_type2_r ) { -// logerror("CPU #%d PC %04x: keychip read %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset); +// logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset); key_numerator_high_word = 0; @@ -426,7 +426,7 @@ static READ8_HANDLER( key_type2_r ) static WRITE8_HANDLER( key_type2_w ) { -// logerror("CPU #%d PC %04x: keychip write %04x=%02x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset,data); +// logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset, data); if (offset < 5) { @@ -535,7 +535,7 @@ static READ8_HANDLER( key_type3_r ) { int op; -// logerror("CPU #%d PC %04x: keychip read %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset); +// logerror("CPU %s PC %04x: keychip read %04x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset); /* I need to handle blastoff's read from 0858. The game previously writes to 0858, using it as temporary storage, so maybe it expects to act as RAM, however @@ -551,14 +551,14 @@ static READ8_HANDLER( key_type3_r ) if (op == key_bottom4) return (offset << 4) | (key[key_swap4_arg] & 0x0f); if (op == key_top4) return (offset << 4) | (key[key_swap4_arg] >> 4); - popmessage("CPU #%d PC %08x: keychip read %04x",cpunum_get_active(),cpu_get_pc(space->cpu),offset); + popmessage("CPU %s PC %08x: keychip read %04x", space->cpu->tag, cpu_get_pc(space->cpu), offset); return 0; } static WRITE8_HANDLER( key_type3_w ) { -// logerror("CPU #%d PC %04x: keychip write %04x=%02x\n",cpunum_get_active(),cpu_get_pc(space->cpu),offset,data); +// logerror("CPU %s PC %04x: keychip write %04x=%02x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset, data); key[(offset & 0x70) >> 4] = data; } @@ -661,21 +661,21 @@ static WRITE8_HANDLER( soundram_w ) static WRITE8_HANDLER( rom_w ) { - logerror("CPU #%d PC %04x: warning - write %02x to rom address %04x\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,offset); + logerror("CPU %s PC %04x: warning - write %02x to rom address %04x\n", space->cpu->tag, cpu_get_pc(space->cpu), data, offset); } /* error handlers */ static READ8_HANDLER( unknown_r ) { - logerror("CPU #%d PC %04x: warning - read from unknown chip\n",cpunum_get_active(),cpu_get_pc(space->cpu) ); -// popmessage("CPU #%d PC %04x: read from unknown chip",cpunum_get_active(),cpu_get_pc(space->cpu) ); + logerror("CPU %s PC %04x: warning - read from unknown chip\n", space->cpu->tag, cpu_get_pc(space->cpu) ); +// popmessage("CPU %s PC %04x: read from unknown chip", space->cpu->tag, cpu_get_pc(space->cpu) ); return 0; } static WRITE8_HANDLER( unknown_w ) { - logerror("CPU #%d PC %04x: warning - wrote to unknown chip\n",cpunum_get_active(),cpu_get_pc(space->cpu) ); -// popmessage("CPU #%d PC %04x: wrote to unknown chip",cpunum_get_active(),cpu_get_pc(space->cpu) ); + logerror("CPU %s PC %04x: warning - wrote to unknown chip\n", space->cpu->tag, cpu_get_pc(space->cpu) ); +// popmessage("CPU %s PC %04x: wrote to unknown chip", space->cpu->tag, cpu_get_pc(space->cpu) ); } /* Main bankswitching routine */ @@ -746,7 +746,7 @@ static void namcos1_bankswitch(running_machine *machine, int cpu, offs_t offset, WRITE8_HANDLER( namcos1_bankswitch_w ) { -// logerror("cpu %d: namcos1_bankswitch_w offset %04x data %02x\n",cpunum_get_active(),offset,data); +// logerror("cpu %s: namcos1_bankswitch_w offset %04x data %02x\n", space->cpu->tag, offset, data); namcos1_bankswitch(space->machine, cpunum_get_active(), offset, data); } diff --git a/src/mame/machine/segas24.c b/src/mame/machine/segas24.c index 1d771b08b6d..b20353f8d04 100644 --- a/src/mame/machine/segas24.c +++ b/src/mame/machine/segas24.c @@ -48,7 +48,7 @@ void system24temp_sys16_io_set_callbacks(UINT8 (*io_r)(running_machine *machine, READ16_HANDLER ( system24temp_sys16_io_r ) { - // logerror("IO read %02x (%d:%x)\n", offset, cpunum_get_active(), cpu_get_pc(space->cpu)); + // logerror("IO read %02x (%s:%x)\n", offset, space->cpu->tag, cpu_get_pc(space->cpu)); if(offset < 8) return system24temp_sys16_io_io_r ? system24temp_sys16_io_io_r(space->machine,offset) : 0xff; else if (offset < 0x20) { @@ -66,7 +66,7 @@ READ16_HANDLER ( system24temp_sys16_io_r ) case 0xf: return system24temp_sys16_io_dir; default: - logerror("IO control read %02x (%d:%x)\n", offset, cpunum_get_active(), cpu_get_pc(space->cpu)); + logerror("IO control read %02x (%s:%x)\n", offset, space->cpu->tag, cpu_get_pc(space->cpu)); return 0xff; } } else @@ -84,7 +84,7 @@ WRITE16_HANDLER( system24temp_sys16_io_w ) if(ACCESSING_BITS_0_7) { if(offset < 8) { if(!(system24temp_sys16_io_dir & (1 << offset))) { - logerror("IO port write on input-only port (%d, [%02x], %02x, %d:%x)\n", offset, system24temp_sys16_io_dir, data & 0xff, cpunum_get_active(), cpu_get_pc(space->cpu)); + logerror("IO port write on input-only port (%d, [%02x], %02x, %s:%x)\n", offset, system24temp_sys16_io_dir, data & 0xff, space->cpu->tag, cpu_get_pc(space->cpu)); return; } if(system24temp_sys16_io_io_w) @@ -100,7 +100,7 @@ WRITE16_HANDLER( system24temp_sys16_io_w ) system24temp_sys16_io_dir = data; break; default: - logerror("IO control write %02x, %02x (%d:%x)\n", offset, data & 0xff, cpunum_get_active(), cpu_get_pc(space->cpu)); + logerror("IO control write %02x, %02x (%s:%x)\n", offset, data & 0xff, space->cpu->tag, cpu_get_pc(space->cpu)); } } } diff --git a/src/mame/video/bwing.c b/src/mame/video/bwing.c index 5e1e62c9256..6fe7324eac2 100644 --- a/src/mame/video/bwing.c +++ b/src/mame/video/bwing.c @@ -117,7 +117,7 @@ WRITE8_HANDLER( bwing_scrollreg_w ) } #if BW_DEBUG - logerror("(%1d)%04x: w=%02x a=%04x f=%d\n",cpunum_get_active(),cpu_get_pc(space->cpu),data,0x1b00+offset,video_screen_get_frame_number(space->machine->primary_screen)); + logerror("(%s)%04x: w=%02x a=%04x f=%d\n", space->cpu->tag, cpu_get_pc(space->cpu),data,0x1b00+offset,video_screen_get_frame_number(space->machine->primary_screen)); #endif break; } diff --git a/src/mame/video/leland.c b/src/mame/video/leland.c index cb7b043e2a2..fe99d3355bf 100644 --- a/src/mame/video/leland.c +++ b/src/mame/video/leland.c @@ -208,8 +208,8 @@ static int leland_vram_port_r(const address_space *space, int offset, int num) break; default: - logerror("CPU #%d %04x Warning: Unknown video port %02x read (address=%04x)\n", - cpunum_get_active(),cpu_get_pc(space->machine->activecpu), offset, addr); + logerror("CPU %s %04x Warning: Unknown video port %02x read (address=%04x)\n", + space->cpu->tag, cpu_get_pc(space->machine->activecpu), offset, addr); ret = 0; break; } @@ -294,8 +294,8 @@ static void leland_vram_port_w(const address_space *space, int offset, int data, break; default: - logerror("CPU #%d %04x Warning: Unknown video port write (address=%04x value=%02x)\n", - cpunum_get_active(),cpu_get_pc(space->machine->activecpu), offset, addr); + logerror("CPU %s %04x Warning: Unknown video port write (address=%04x value=%02x)\n", + space->cpu->tag, cpu_get_pc(space->machine->activecpu), offset, addr); break; } diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c index 0a8adacd151..61be20afe68 100644 --- a/src/mame/video/stvvdp1.c +++ b/src/mame/video/stvvdp1.c @@ -194,7 +194,7 @@ READ32_HANDLER( stv_vdp1_regs_r ) // x ^= 0x00020000; - logerror ("cpu #%d (PC=%08X) VDP1: Read from Registers, Offset %04x\n",cpunum_get_active(), cpu_get_pc(space->cpu), offset); + logerror ("cpu %s (PC=%08X) VDP1: Read from Registers, Offset %04x\n", space->cpu->tag, cpu_get_pc(space->cpu), offset); // if (offset == 0x04) return x; return stv_vdp1_regs[offset]; @@ -350,7 +350,7 @@ WRITE32_HANDLER ( stv_vdp1_vram_w ) // if (((offset * 4) > 0xdf) && ((offset * 4) < 0x140)) // { -// logerror("cpu #%d (PC=%08X): VRAM dword write to %08X = %08X & %08X\n", cpunum_get_active(), cpu_get_pc(space->cpu), offset*4, data, mem_mask); +// logerror("cpu %s (PC=%08X): VRAM dword write to %08X = %08X & %08X\n", space->cpu->tag, cpu_get_pc(space->cpu), offset*4, data, mem_mask); // } data = stv_vdp1_vram[offset]; diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c index 20ca6c7fe97..f80070dd7c1 100644 --- a/src/mame/video/stvvdp2.c +++ b/src/mame/video/stvvdp2.c @@ -5323,7 +5323,7 @@ READ32_HANDLER ( stv_vdp2_regs_r ) /*H/V Counter Register*/ /*H-Counter V-Counter */ stv_vdp2_regs[offset] = (((video_screen_get_visible_area(space->machine->primary_screen)->max_x - 1)<<16)&0x3ff0000)|(((video_screen_get_visible_area(space->machine->primary_screen)->max_y - 1)<<0)& ((STV_VDP2_LSMD == 3) ? 0x7ff : 0x3ff)); - if(LOG_VDP2) logerror("CPU #%d PC(%08x) = VDP2: H/V counter read : %08x\n",cpunum_get_active(),cpu_get_pc(space->cpu),stv_vdp2_regs[offset]); + if(LOG_VDP2) logerror("CPU %s PC(%08x) = VDP2: H/V counter read : %08x\n", space->cpu->tag, cpu_get_pc(space->cpu),stv_vdp2_regs[offset]); stv_vdp2_regs[offset] = 0; break; }