From 984cb27a7ee4c2cb70f590b4631a0820bb5997a4 Mon Sep 17 00:00:00 2001 From: AJR Date: Fri, 15 Nov 2019 16:55:07 -0500 Subject: hd44780: Better workaround for mtd1256 (nw) --- src/devices/video/hd44780.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index 01035d4f5b5..03cb2c9013f 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -13,7 +13,7 @@ #include "emu.h" #include "video/hd44780.h" -//#define VERBOSE 1 +#define VERBOSE 1 #include "logmacro.h" @@ -475,7 +475,6 @@ void hd44780_device::control_write(u8 data) return; } - m_first_cmd = false; m_char_size = BIT(m_ir, 2) ? 10 : 8; m_data_len = BIT(m_ir, 4) ? 8 : 4; m_num_line = BIT(m_ir, 3) + 1; @@ -485,12 +484,6 @@ void hd44780_device::control_write(u8 data) LOG("HD44780: char size 5x%d, data len %d, lines %d\n", m_char_size, m_data_len, m_num_line); return; } - else if (m_first_cmd) - { - // Some machines do a "clear display" first, even though the datasheet insists "function set" must come before all else - LOG("HD44780: command %x ignored (function not set yet)\n", m_ir); - return; - } else if (BIT(m_ir, 4)) { // cursor or display shift @@ -546,7 +539,12 @@ void hd44780_device::control_write(u8 data) m_disp_shift = 0; memset(m_ddram, 0x20, sizeof(m_ddram)); set_busy_flag(1520); + + // Some machines do a "clear display" first, even though the datasheet insists "function set" must come before all else + return; } + + m_first_cmd = false; } u8 hd44780_device::control_read() -- cgit v1.2.3