From c81df094720ea60a7e0e8b0c6fb3106466bcaa34 Mon Sep 17 00:00:00 2001 From: hap Date: Fri, 4 Oct 2019 22:48:56 +0200 Subject: [PATCH] hh_sm510: output lcd at higher freq (nw) --- src/devices/cpu/sm510/sm510base.cpp | 2 +- src/mame/drivers/hh_sm510.cpp | 7 ++++--- src/mame/includes/hh_sm510.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/devices/cpu/sm510/sm510base.cpp b/src/devices/cpu/sm510/sm510base.cpp index ab7b659cbb2..81b027aade8 100644 --- a/src/devices/cpu/sm510/sm510base.cpp +++ b/src/devices/cpu/sm510/sm510base.cpp @@ -217,7 +217,7 @@ void sm510_base_device::init_lcd_driver() { // note: in reality, this timer runs at high frequency off the main divider, strobing one segment at a time m_lcd_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(sm510_base_device::lcd_timer_cb), this)); - attotime period = attotime::from_ticks(0x200, unscaled_clock()); // 64hz default + attotime period = attotime::from_ticks(0x20, unscaled_clock()); // default 1kHz m_lcd_timer->adjust(period, 0, period); } diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 05fbbe03f0e..d3cacb99175 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -147,9 +147,9 @@ void hh_sm510_state::machine_start() } } - // 1ms display decay ticks + // 1kHz display decay ticks m_display_decay_timer = machine().scheduler().timer_alloc(timer_expired_delegate(FUNC(hh_sm510_state::display_decay_tick),this)); - m_display_decay_timer->adjust(attotime::from_msec(1), 0, attotime::from_msec(1)); + m_display_decay_timer->adjust(attotime::from_hz(1024), 0, attotime::from_hz(1024)); // zerofill m_inp_mux = 0; @@ -238,13 +238,14 @@ void hh_sm510_state::set_display_size(u8 x, u8 y, u8 z) WRITE16_MEMBER(hh_sm510_state::sm510_lcd_segment_w) { + m_display_wait = 8; set_display_size(2, 16, 2); m_display_state[offset] = data; } WRITE16_MEMBER(hh_sm510_state::sm500_lcd_segment_w) { - m_display_wait = 32; + m_display_wait = 12; set_display_size(4, 4, 1); m_display_state[offset] = data; } diff --git a/src/mame/includes/hh_sm510.h b/src/mame/includes/hh_sm510.h index 878fee2b4c8..a4f1faac31c 100644 --- a/src/mame/includes/hh_sm510.h +++ b/src/mame/includes/hh_sm510.h @@ -24,7 +24,7 @@ public: m_out_x(*this, "%u.%u.%u", 0U, 0U, 0U), m_inp_lines(0), m_inp_fixed(-1), - m_display_wait(16) + m_display_wait(8) { } // devices @@ -58,7 +58,7 @@ public: virtual DECLARE_WRITE8_MEMBER(piezo2bit_input_w); // display common - int m_display_wait; // lcd segment on/off-delay in milliseconds (default 16ms) + int m_display_wait; // lcd segment on/off-delay in 1kHz ticks u8 m_display_x_len; // lcd number of groups u8 m_display_y_len; // lcd number of segments u8 m_display_z_len; // lcd number of commons