hh_sm510: output lcd at higher freq (nw)

This commit is contained in:
hap 2019-10-04 22:48:56 +02:00
parent 43cac214a4
commit c81df09472
3 changed files with 7 additions and 6 deletions

View File

@ -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);
}

View File

@ -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;
}

View File

@ -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