diff options
| author | 2024-05-05 13:46:07 +0200 | |
|---|---|---|
| committer | 2024-05-05 13:46:52 +0200 | |
| commit | b3ffbf757343e996e650ca014b36d06816ed3bb7 (patch) | |
| tree | 3a835d212da831a06c346b849559a034cdb5b57e /src/devices | |
| parent | 62016959d34d7494a6546f72cb6a6c5ba1ae3225 (diff) | |
hd44780: Simplify some code
sh_adc: Remove some debug stuff
psr540: Add the buttons
Diffstat (limited to 'src/devices')
| -rw-r--r-- | src/devices/cpu/sh/sh_adc.cpp | 2 | ||||
| -rw-r--r-- | src/devices/video/hd44780.cpp | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/devices/cpu/sh/sh_adc.cpp b/src/devices/cpu/sh/sh_adc.cpp index 55f6833d853..282e994254a 100644 --- a/src/devices/cpu/sh/sh_adc.cpp +++ b/src/devices/cpu/sh/sh_adc.cpp @@ -306,8 +306,6 @@ void sh_adc_device::mode_update() m_end_channel = m_adcsr & 3; } else m_start_channel = m_end_channel = m_adcsr & 3; - if(m_start_channel == 2) - machine().debug_break(); } } diff --git a/src/devices/video/hd44780.cpp b/src/devices/video/hd44780.cpp index 314c1a8a85a..ca1fda0dd60 100644 --- a/src/devices/video/hd44780.cpp +++ b/src/devices/video/hd44780.cpp @@ -486,24 +486,23 @@ const u8 *hd44780_device::render() { uint16_t char_pos = line * 0x40 + ((pos + m_disp_shift) % line_size); - int char_base; + const u8 *src; if (m_ddram[char_pos] < 0x10) { // draw CGRAM characters if (m_char_size == 8) - char_base = (m_ddram[char_pos] & 0x07) * 8; + src = m_cgram + (m_ddram[char_pos] & 0x07) * 8; else - char_base = ((m_ddram[char_pos] >> 1) & 0x03) * 16; + src = m_cgram + ((m_ddram[char_pos] >> 1) & 0x03) * 16; } else { // draw CGROM characters - char_base = m_ddram[char_pos] * 0x10; + src = m_cgrom + m_ddram[char_pos] * 0x10; } - const u8 *charset = (m_ddram[char_pos] < 0x10) ? m_cgram : m_cgrom; u8 *dest = m_render_buf + 16 * (line * line_size + pos); - memcpy (dest, charset + char_base, m_char_size); + memcpy (dest, src, m_char_size); if (char_pos == m_ac) { |
