diff options
author | Nigel Barnes <Pernod70@users.noreply.github.com> | 2020-06-15 13:30:32 +0100 |
---|---|---|
committer | Nigel Barnes <Pernod70@users.noreply.github.com> | 2020-06-15 13:38:07 +0100 |
commit | c6b0a57f4f4fe8fbc6ae6766c0ba7d7e15b19069 (patch) | |
tree | 791969730cbea04a077ee272d64e15001e18c766 /src/devices/machine/i8271.cpp | |
parent | 469e50bc209761c119d041468afb8335b1885cdc (diff) |
i8271: Invert signal to seek/step when writing to drive control port. Fixes MT07674 [crazyc]
Diffstat (limited to 'src/devices/machine/i8271.cpp')
-rw-r--r-- | src/devices/machine/i8271.cpp | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/src/devices/machine/i8271.cpp b/src/devices/machine/i8271.cpp index 1bac233f955..7d11e3aa26a 100644 --- a/src/devices/machine/i8271.cpp +++ b/src/devices/machine/i8271.cpp @@ -787,9 +787,8 @@ void i8271_device::start_command(int cmd) break; } case C_SPECIFY: - logerror("%s: command specify %02x %02x %02x %02x\n", - tag(), command[1], - command[2], command[3], command[4]); + logerror("command specify %02x %02x %02x %02x\n", + command[1], command[2], command[3], command[4]); switch(command[1]) { case 0x0d: srate = command[2]; @@ -894,7 +893,7 @@ void i8271_device::start_command(int cmd) floppy_info &fi = flopi[BIT(command[0], 7)]; if (fi.dev) { fi.dev->dir_w(BIT(command[2], 2)); - fi.dev->stp_w(BIT(command[2], 1)); + fi.dev->stp_w(!BIT(command[2], 1)); } opt_cb(BIT(command[2], 5)); hdl_cb(BIT(command[2], 3)); @@ -912,7 +911,7 @@ void i8271_device::start_command(int cmd) void i8271_device::command_end(floppy_info &fi, bool data_completion) { - logerror("%s: command done (%s) - %02x\n", tag(), data_completion ? "data" : "seek", rr); + logerror("command done (%s) - %02x\n", data_completion ? "data" : "seek", rr); fi.main_state = fi.sub_state = IDLE; idle_icnt = 0; main_phase = PHASE_RESULT; @@ -921,7 +920,7 @@ void i8271_device::command_end(floppy_info &fi, bool data_completion) void i8271_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; @@ -931,7 +930,7 @@ void i8271_device::recalibrate_start(floppy_info &fi) void i8271_device::seek_start(floppy_info &fi) { - logerror("%s: command seek %d\n", tag(), command[1]); + logerror("command seek %d\n", command[1]); fi.main_state = SEEK; fi.sub_state = SEEK_WAIT_STEP_TIME_DONE; fi.dir = fi.pcn > command[1] ? 1 : 0; @@ -1012,8 +1011,7 @@ void i8271_device::read_data_start(floppy_info &fi) hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; - logerror("%s: command read%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", - tag(), + logerror("command read%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", command[0] & 0x04 ? " deleted" : "", command[0] & 0x01 ? " multi" : "", command[0], @@ -1042,8 +1040,7 @@ void i8271_device::scan_start(floppy_info &fi) hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; - logerror("%s: command scan%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", - tag(), + logerror("command scan%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", command[0] & 0x04 ? " deleted" : "", command[0] & 0x01 ? " multi" : "", command[0], @@ -1074,8 +1071,7 @@ void i8271_device::verify_data_start(floppy_info &fi) hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; - logerror("%s: command verify%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", - tag(), + logerror("command verify%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", command[0] & 0x04 ? " deleted" : "", command[0] & 0x01 ? " multi" : "", command[0], @@ -1160,8 +1156,7 @@ void i8271_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], @@ -1216,8 +1211,7 @@ void i8271_device::write_data_start(floppy_info &fi) hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; - logerror("%s: command write%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", - tag(), + logerror("command write%s data%s cmd=%02x crn=(%d, %d, %d) len=%02x rate=%d\n", command[0] & 0x04 ? " deleted" : "", command[0] & 0x01 ? " multi" : "", command[0], @@ -1349,8 +1343,7 @@ void i8271_device::format_track_start(floppy_info &fi) hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; - logerror("%s: command format track c=%02x n=%02x sc=%02x gap3=%02x gap5=%02x gap1=%02x\n", - tag(), + logerror("command format track c=%02x n=%02x sc=%02x gap3=%02x gap5=%02x gap1=%02x\n", command[1], command[3] >> 5, command[3] & 0x1f, command[2], command[4], command[5]); rr = ERR_NONE; @@ -1418,7 +1411,7 @@ void i8271_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()); set_drq(true); @@ -1442,9 +1435,7 @@ void i8271_device::read_id_start(floppy_info &fi) hdl_cb(true); fi.sub_state = HEAD_LOAD_DONE; - logerror("%s: command read id, rate=%d\n", - tag(), - cur_rate); + logerror("command read id, rate=%d\n", cur_rate); rr = ERR_NONE; @@ -1734,7 +1725,7 @@ void i8271_device::live_write_fm(uint8_t fm) bool i8271_device::sector_matches() const { if(0) - logerror("%s: matching %02x %02x %02x - %02x %02x %02x\n", tag(), + logerror("matching %02x %02x %02x - %02x %02x %02x\n", cur_live.idbuf[0], cur_live.idbuf[2], cur_live.idbuf[3], command[1], command[2], command[3] >> 5); return |