From 7329c4038ad672818b6f78ab197684395f9f019e Mon Sep 17 00:00:00 2001 From: Robbbert Date: Thu, 1 May 2014 07:02:25 +0000 Subject: [PATCH] i8275 fixes - Codes f0-f3 should be invisible - Fixed rubbish on zorba intro screen Unior: fixed regression with cursor. --- src/emu/video/i8275.c | 12 +++++++++++- src/emu/video/i8275.h | 1 + src/mess/drivers/unior.c | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/emu/video/i8275.c b/src/emu/video/i8275.c index d19e32a6217..1bf232c94ee 100644 --- a/src/emu/video/i8275.c +++ b/src/emu/video/i8275.c @@ -118,7 +118,8 @@ i8275_device::i8275_device(const machine_config &mconfig, const char *tag, devic m_dma_stop(false), m_end_of_screen(false), m_cursor_blink(0), - m_char_blink(0) + m_char_blink(0), + m_stored_attr(0) { } @@ -266,6 +267,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, m_char_blink++; m_char_blink &= 0x3f; + m_stored_attr = 0; } if (m_scanline == m_vrtc_drq_scanline) @@ -283,6 +285,11 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, { int line_counter = OFFSET_LINE_COUNTER ? ((lc - 1) % SCANLINES_PER_ROW) : lc; bool end_of_row = false; + m_hlgt = (m_stored_attr & FAC_H) ? 1 : 0; + m_vsp = (m_stored_attr & FAC_B) ? 1 : 0; + m_gpa = (m_stored_attr & FAC_GG) >> 2; + m_rvv = (m_stored_attr & FAC_R) ? 1 : 0; + m_lten = (m_stored_attr & FAC_U) ? 1 : 0; for (int sx = 0; sx < CHARACTERS_PER_ROW; sx++) { @@ -302,6 +309,8 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, m_gpa = (data & FAC_GG) >> 2; m_rvv = (data & FAC_R) ? 1 : 0; m_lten = (data & FAC_U) ? 1 : 0; + if ((SCANLINES_PER_ROW - lc)==1) + m_stored_attr = data; if (!VISIBLE_FIELD_ATTRIBUTE) { @@ -334,6 +343,7 @@ void i8275_device::device_timer(emu_timer &timer, device_timer_id id, int param, m_end_of_screen = true; break; } + vsp = 1; } else { diff --git a/src/emu/video/i8275.h b/src/emu/video/i8275.h index 461122820fd..305252ca1ba 100644 --- a/src/emu/video/i8275.h +++ b/src/emu/video/i8275.h @@ -222,6 +222,7 @@ protected: int m_cursor_blink; int m_char_blink; + UINT8 m_stored_attr; // timers emu_timer *m_hrtc_on_timer; diff --git a/src/mess/drivers/unior.c b/src/mess/drivers/unior.c index 8f7c986d8d6..3481061c517 100644 --- a/src/mess/drivers/unior.c +++ b/src/mess/drivers/unior.c @@ -264,7 +264,7 @@ I8275_DRAW_CHARACTER_MEMBER(unior_state::display_pixels) UINT8 gfx = m_p_chargen[(linecount & 7) | (charcode << 3)]; if(linecount == 8) - return; + gfx = 0; if (vsp) gfx = 0;