From d393dc213923e409e31cefb611aee749665dacf8 Mon Sep 17 00:00:00 2001 From: Sergey Svishchev Date: Sun, 14 Aug 2016 01:33:48 +0300 Subject: [PATCH] upd765: drop redundant tag() in logerror calls (nw) --- src/devices/machine/upd765.cpp | 88 +++++++++++++++------------------- 1 file changed, 39 insertions(+), 49 deletions(-) diff --git a/src/devices/machine/upd765.cpp b/src/devices/machine/upd765.cpp index 96dd03fa1a9..4711767bc39 100644 --- a/src/devices/machine/upd765.cpp +++ b/src/devices/machine/upd765.cpp @@ -235,7 +235,7 @@ void upd765_family_device::soft_reset() void upd765_family_device::tc_w(bool _tc) { - logerror("%s: tc=%d\n", tag(), _tc); + logerror("tc=%d\n", _tc); if(tc != _tc && _tc) { live_sync(); tc_done = true; @@ -304,7 +304,7 @@ READ8_MEMBER(upd765_family_device::dor_r) WRITE8_MEMBER(upd765_family_device::dor_w) { - logerror("%s: dor = %02x\n", tag(), data); + logerror("dor = %02x\n", data); UINT8 diff = dor ^ data; dor = data; if(diff & 4) @@ -367,7 +367,7 @@ READ8_MEMBER(upd765_family_device::msr_r) WRITE8_MEMBER(upd765_family_device::dsr_w) { - logerror("%s: dsr_w %02x\n", tag(), data); + logerror("dsr_w %02x\n", data); if(data & 0x80) soft_reset(); dsr = data & 0x7f; @@ -386,7 +386,7 @@ READ8_MEMBER(upd765_family_device::fifo_r) case PHASE_EXEC: if(internal_drq) return fifo_pop(false); - logerror("%s: fifo_r in phase %d\n", tag(), main_phase); + logerror("fifo_r in phase %d\n", main_phase); break; case PHASE_RESULT: @@ -397,7 +397,7 @@ READ8_MEMBER(upd765_family_device::fifo_r) main_phase = PHASE_CMD; break; default: - logerror("%s: fifo_r in phase %d\n", tag(), main_phase); + logerror("fifo_r in phase %d\n", main_phase); break; } @@ -415,7 +415,7 @@ WRITE8_MEMBER(upd765_family_device::fifo_w) if(cmd == C_INCOMPLETE) break; if(cmd == C_INVALID) { - logerror("%s: Invalid on %02x\n", tag(), command[0]); + logerror("Invalid on %02x\n", command[0]); main_phase = PHASE_RESULT; result[0] = ST0_UNK; result_pos = 1; @@ -430,11 +430,11 @@ WRITE8_MEMBER(upd765_family_device::fifo_w) fifo_push(data, false); return; } - logerror("%s: fifo_w in phase %d\n", tag(), main_phase); + logerror("fifo_w in phase %d\n", main_phase); break; default: - logerror("%s: fifo_w in phase %d\n", tag(), main_phase); + logerror("fifo_w in phase %d\n", main_phase); break; } } @@ -501,7 +501,7 @@ void upd765_family_device::fifo_push(UINT8 data, bool internal) if(fifo_pos == 16) { if(internal) { if(!(st1 & ST1_OR)) - logerror("%s: Fifo overrun\n", tag()); + logerror("Fifo overrun\n"); st1 |= ST1_OR; } return; @@ -522,7 +522,7 @@ UINT8 upd765_family_device::fifo_pop(bool internal) if(!fifo_pos) { if(internal) { if(!(st1 & ST1_OR)) - logerror("%s: Fifo underrun\n", tag()); + logerror("Fifo underrun\n"); st1 |= ST1_OR; } return 0; @@ -1031,8 +1031,8 @@ void upd765_family_device::live_run(attotime limit) command[12+cur_live.byte_counter-16] = byte; live_write_mfm(byte); if(cur_live.byte_counter == 19) - logerror("%s: formatting sector %02x %02x %02x %02x\n", - tag(), command[12], command[13], command[14], command[15]); + logerror("formatting sector %02x %02x %02x %02x\n", + command[12], command[13], command[14], command[15]); } else if(cur_live.byte_counter < 22) live_write_mfm(cur_live.crc >> 8); else if(cur_live.byte_counter < 44) @@ -1067,8 +1067,8 @@ void upd765_family_device::live_run(attotime limit) command[12+cur_live.byte_counter-7] = byte; live_write_fm(byte); if(cur_live.byte_counter == 10) - logerror("%s: formatting sector %02x %02x %02x %02x\n", - tag(), command[12], command[13], command[14], command[15]); + logerror("formatting sector %02x %02x %02x %02x\n", + command[12], command[13], command[14], command[15]); } else if(cur_live.byte_counter < 13) live_write_fm(cur_live.crc >> 8); else if(cur_live.byte_counter < 24) @@ -1226,8 +1226,7 @@ void upd765_family_device::start_command(int cmd) tc_done = false; switch(cmd) { case C_CONFIGURE: - logerror("%s: command configure %02x %02x %02x\n", - tag(), + logerror("command configure %02x %02x %02x\n", command[1], command[2], command[3]); // byte 1 is ignored, byte 3 is precompensation-related fifocfg = command[2]; @@ -1236,7 +1235,7 @@ void upd765_family_device::start_command(int cmd) break; case C_DUMP_REG: - logerror("%s: command dump regs\n", tag()); + logerror("command dump regs\n"); main_phase = PHASE_RESULT; result[0] = flopi[0].pcn; result[1] = flopi[1].pcn; @@ -1261,11 +1260,11 @@ void upd765_family_device::start_command(int cmd) main_phase = PHASE_RESULT; result[0] = locked ? 0x10 : 0x00; result_pos = 1; - logerror("%s: command lock (%s)\n", tag(), locked ? "on" : "off"); + logerror("command lock (%s)\n", locked ? "on" : "off"); break; case C_PERPENDICULAR: - logerror("%s: command perpendicular\n", tag()); + logerror("command perpendicular\n"); perpmode = command[1]; main_phase = PHASE_CMD; break; @@ -1309,7 +1308,7 @@ void upd765_family_device::start_command(int cmd) (fi.dev->wpt_r() ? ST3_WP : 0x00) | (fi.dev->trk00_r() ? 0x00 : ST3_T0) | (fi.dev->twosid_r() ? 0x00 : ST3_TS); - logerror("%s: command sense drive status %d (%02x)\n", tag(), fi.id, result[0]); + logerror("command sense drive status %d (%02x)\n", fi.id, result[0]); result_pos = 1; break; } @@ -1317,7 +1316,7 @@ void upd765_family_device::start_command(int cmd) case C_SENSE_INTERRUPT_STATUS: { // Documentation is somewhat contradictory w.r.t polling // and irq. PC bios, especially 5150, requires that only - // one irq happens. That's also wait the ns82077a doc + // one irq happens. That's also what the ns82077a doc // says it does. OTOH, a number of docs says you need to // call SIS 4 times, once per drive... // @@ -1339,7 +1338,7 @@ void upd765_family_device::start_command(int cmd) if(fid == 4) { result[0] = ST0_UNK; result_pos = 1; - logerror("%s: command sense interrupt status (%02x)\n", tag(), result[0]); + logerror("command sense interrupt status (%02x)\n", result[0]); break; } @@ -1349,7 +1348,7 @@ void upd765_family_device::start_command(int cmd) result[0] = fi.st0; result[1] = fi.pcn; - logerror("%s: command sense interrupt status (fid=%d %02x %02x)\n", tag(), fid, result[0], result[1]); + logerror("command sense interrupt status (fid=%d %02x %02x)\n", fid, result[0], result[1]); result_pos = 2; other_irq = false; @@ -1358,8 +1357,7 @@ void upd765_family_device::start_command(int cmd) } case C_SPECIFY: - logerror("%s: command specify %02x %02x\n", - tag(), + logerror("command specify %02x %02x\n", command[1], command[2]); spec = (command[1] << 8) | command[2]; main_phase = PHASE_CMD; @@ -1377,7 +1375,7 @@ void upd765_family_device::start_command(int cmd) void upd765_family_device::command_end(floppy_info &fi, bool data_completion) { - logerror("%s: command done (%s) -", tag(), data_completion ? "data" : "seek"); + logerror("command done (%s) -", data_completion ? "data" : "seek"); for(int i=0; i != result_pos; i++) logerror(" %02x", result[i]); logerror("\n"); @@ -1394,7 +1392,7 @@ void upd765_family_device::command_end(floppy_info &fi, bool data_completion) void upd765_family_device::recalibrate_start(floppy_info &fi) { - logerror("%s: command recalibrate\n", tag()); + logerror("command recalibrate\n"); fi.main_state = RECALIBRATE; fi.sub_state = SEEK_WAIT_STEP_TIME_DONE; fi.dir = 1; @@ -1406,7 +1404,7 @@ void upd765_family_device::recalibrate_start(floppy_info &fi) void upd765_family_device::seek_start(floppy_info &fi) { - logerror("%s: command %sseek %d\n", tag(), command[0] & 0x80 ? "relative " : "", command[2]); + logerror("command %sseek %d\n", command[0] & 0x80 ? "relative " : "", command[2]); fi.main_state = SEEK; fi.sub_state = SEEK_WAIT_STEP_TIME_DONE; fi.dir = fi.pcn > command[2] ? 1 : 0; @@ -1489,8 +1487,7 @@ void upd765_family_device::read_data_start(floppy_info &fi) fi.sub_state = HEAD_LOAD_DONE; mfm = command[0] & 0x40; - logerror("%s: command read%s data%s%s%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n", - tag(), + logerror("command read%s data%s%s%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n", command[0] & 0x08 ? " deleted" : "", command[0] & 0x80 ? " mt" : "", command[0] & 0x40 ? " mfm" : "", @@ -1534,8 +1531,7 @@ void upd765_family_device::scan_start(floppy_info &fi) fi.sub_state = HEAD_LOAD_DONE; mfm = command[0] & 0x40; - logerror("%s: command scan%s data%s%s%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x stp=%02x rate=%d\n", - tag(), + logerror("command scan%s data%s%s%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x stp=%02x rate=%d\n", command[0] & 0x08 ? " deleted" : "", command[0] & 0x80 ? " mt" : "", command[0] & 0x40 ? " mfm" : "", @@ -1638,8 +1634,7 @@ void upd765_family_device::read_data_continue(floppy_info &fi) live_start(fi, SEARCH_ADDRESS_MARK_HEADER); return; } - logerror("%s: reading sector %02x %02x %02x %02x\n", - tag(), + logerror("reading sector %02x %02x %02x %02x\n", cur_live.idbuf[0], cur_live.idbuf[1], cur_live.idbuf[2], @@ -1725,8 +1720,7 @@ void upd765_family_device::write_data_start(floppy_info &fi) fi.main_state = WRITE_DATA; fi.sub_state = HEAD_LOAD_DONE; mfm = command[0] & 0x40; - logerror("%s: command write%s data%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n", - tag(), + logerror("command write%s data%s%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n", command[0] & 0x08 ? " deleted" : "", command[0] & 0x80 ? " mt" : "", command[0] & 0x40 ? " mfm" : "", @@ -1853,8 +1847,7 @@ void upd765_family_device::read_track_start(floppy_info &fi) mfm = command[0] & 0x40; sectors_read = 0; - logerror("%s: command read track%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n", - tag(), + logerror("command read track%s cmd=%02x sel=%x chrn=(%d, %d, %d, %d) eot=%02x gpl=%02x dtl=%02x rate=%d\n", command[0] & 0x40 ? " mfm" : "", command[0], command[1], @@ -1936,7 +1929,7 @@ void upd765_family_device::read_track_continue(floppy_info &fi) return; case WAIT_INDEX_DONE: - logerror("%s: index found, reading track\n", tag()); + logerror("index found, reading track\n"); fi.sub_state = SCAN_ID; live_start(fi, SEARCH_ADDRESS_MARK_HEADER); return; @@ -1946,8 +1939,7 @@ void upd765_family_device::read_track_continue(floppy_info &fi) st1 |= ST1_DE; } st1 &= ~ST1_MA; - logerror("%s: reading sector %02x %02x %02x %02x\n", - tag(), + logerror("reading sector %02x %02x %02x %02x\n", cur_live.idbuf[0], cur_live.idbuf[1], cur_live.idbuf[2], @@ -2027,8 +2019,7 @@ void upd765_family_device::format_track_start(floppy_info &fi) fi.sub_state = HEAD_LOAD_DONE; mfm = command[0] & 0x40; - logerror("%s: command format track %s h=%02x n=%02x sc=%02x gpl=%02x d=%02x\n", - tag(), + logerror("command format track %s h=%02x n=%02x sc=%02x gpl=%02x d=%02x\n", command[0] & 0x40 ? "mfm" : "fm", command[1], command[2], command[3], command[4], command[5]); @@ -2063,7 +2054,7 @@ void upd765_family_device::format_track_continue(floppy_info &fi) return; case WAIT_INDEX_DONE: - logerror("%s: index found, writing track\n", tag()); + logerror("index found, writing track\n"); fi.sub_state = TRACK_DONE; cur_live.pll.start_writing(machine().time()); live_start(fi, WRITE_TRACK_PRE_SECTORS); @@ -2095,8 +2086,7 @@ void upd765_family_device::read_id_start(floppy_info &fi) fi.sub_state = HEAD_LOAD_DONE; mfm = command[0] & 0x40; - logerror("%s: command read id%s, rate=%d\n", - tag(), + logerror("command read id%s, rate=%d\n", command[0] & 0x40 ? " mfm" : "", cur_rate); @@ -2174,7 +2164,7 @@ void upd765_family_device::check_irq() cur_irq = data_irq || other_irq || internal_drq; cur_irq = cur_irq && (dor & 4) && (mode != MODE_AT || (dor & 8)); if(cur_irq != old_irq) { - logerror("%s: irq = %d\n", tag(), cur_irq); + logerror("irq = %d\n", cur_irq); intrq_cb(cur_irq); } } @@ -2232,7 +2222,7 @@ void upd765_family_device::run_drive_ready_polling() for(int fid=0; fid<4; fid++) { bool ready = get_ready(fid); if(ready != flopi[fid].ready) { - logerror("%s: polled %d : %d -> %d\n", tag(), fid, flopi[fid].ready, ready); + logerror("polled %d : %d -> %d\n", fid, flopi[fid].ready, ready); flopi[fid].ready = ready; if(!flopi[fid].st0_filled) { flopi[fid].st0 = ST0_ABRT | fid; @@ -2416,7 +2406,7 @@ void upd765_family_device::live_write_fm(UINT8 fm) bool upd765_family_device::sector_matches() const { if(0) - logerror("%s: matching %02x %02x %02x %02x - %02x %02x %02x %02x\n", tag(), + logerror("matching %02x %02x %02x %02x - %02x %02x %02x %02x\n", cur_live.idbuf[0], cur_live.idbuf[1], cur_live.idbuf[2], cur_live.idbuf[3], command[2], command[3], command[4], command[5]); return