diff options
Diffstat (limited to 'src/devices/machine/hp_dc100_tape.cpp')
-rw-r--r-- | src/devices/machine/hp_dc100_tape.cpp | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/devices/machine/hp_dc100_tape.cpp b/src/devices/machine/hp_dc100_tape.cpp index a9cbb925163..2c4b55e0156 100644 --- a/src/devices/machine/hp_dc100_tape.cpp +++ b/src/devices/machine/hp_dc100_tape.cpp @@ -84,6 +84,7 @@ hp_dc100_tape_device::hp_dc100_tape_device(const machine_config &mconfig, const , m_motion_handler(*this) , m_rd_bit_handler(*this) , m_wr_bit_handler(*this) + , m_unit_name() , m_image() , m_image_dirty(false) { @@ -128,7 +129,14 @@ std::string hp_dc100_tape_device::call_display() return buffer; } - char track = m_track ? 'B' : 'A'; + if (!m_unit_name.empty()) { + buffer += m_unit_name; + buffer += " "; + } + + if (m_image.no_of_tracks() > 1) { + buffer += m_track ? "B " : "A "; + } char r_w = m_current_op == OP_WRITE || m_current_op == OP_ERASE ? 'W' : 'R'; char m1; char m2; @@ -143,7 +151,7 @@ std::string hp_dc100_tape_device::call_display() int pos_in = get_approx_pos() / hti_format_t::ONE_INCH_POS; - buffer = string_format("%c %c %c%c [%04d/1824]" , track , r_w , m1 , m2 , pos_in); + buffer += string_format("%c %c%c [%04d/1824]" , r_w , m1 , m2 , pos_in); return buffer; } @@ -169,9 +177,9 @@ void hp_dc100_tape_device::set_tick_size(hti_format_t::tape_pos_t size) m_tick_size = size; } -void hp_dc100_tape_device::set_bits_per_word(unsigned bits) +void hp_dc100_tape_device::set_image_format(hti_format_t::image_format_t fmt) { - m_image.set_bits_per_word(bits); + m_image.set_image_format(fmt); } void hp_dc100_tape_device::set_go_threshold(double threshold) @@ -179,9 +187,14 @@ void hp_dc100_tape_device::set_go_threshold(double threshold) m_go_threshold = threshold; } +void hp_dc100_tape_device::set_name(const std::string& name) +{ + m_unit_name = name; +} + void hp_dc100_tape_device::set_track_no(unsigned track) { - if (m_track != track) { + if (m_track != track && track < m_image.no_of_tracks()) { LOG_DBG("Setting track %u (op=%d)\n" , track , static_cast<int>(m_current_op)); auto saved_op = m_current_op; if (m_current_op != OP_IDLE) { @@ -434,7 +447,7 @@ void hp_dc100_tape_device::time_to_next_gap(hti_format_t::tape_pos_t min_gap_siz hti_format_t::track_iterator_t it; found = m_image.next_data(get_track_no() , tmp , fwd , true , it); if (found) { - tmp = hti_format_t::farthest_end(it , !fwd); + tmp = m_image.farthest_end(it , !fwd); } } if (found && m_image.next_gap(get_track_no() , tmp , fwd , min_gap_size)) { @@ -875,7 +888,7 @@ void hp_dc100_tape_device::load_rd_word() m_bit_idx = 0; } // This is actually the nearest end (dir is inverted) - m_rw_pos = m_next_bit_pos = hti_format_t::farthest_end(m_rd_it , !fwd); + m_rw_pos = m_next_bit_pos = m_image.farthest_end(m_rd_it , !fwd); // Compute end of bit cell hti_format_t::tape_pos_t bit_len = m_image.bit_length(BIT(m_rd_it->second , m_bit_idx)); if (!fwd) { |