From e7c861f2e1f0cc27ee4c0714171ec001576440d1 Mon Sep 17 00:00:00 2001 From: angelosa Date: Sun, 25 Dec 2016 22:59:49 +0100 Subject: MT #04907 --- src/mame/includes/combatsc.h | 1 + src/mame/video/combatsc.cpp | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/mame/includes/combatsc.h b/src/mame/includes/combatsc.h index 9aef51765a0..d762be420e2 100644 --- a/src/mame/includes/combatsc.h +++ b/src/mame/includes/combatsc.h @@ -46,6 +46,7 @@ public: int m_vreg; int m_bank_select; /* 0x00..0x1f */ int m_video_circuit; /* 0 or 1 */ + bool m_textflip; uint8_t *m_page[2]; /* misc */ diff --git a/src/mame/video/combatsc.cpp b/src/mame/video/combatsc.cpp index ea839d681b9..e53b1c5fa14 100644 --- a/src/mame/video/combatsc.cpp +++ b/src/mame/video/combatsc.cpp @@ -325,8 +325,14 @@ WRITE8_MEMBER(combatsc_state::combatsc_pf_control_w) k007121->ctrl_w(space, offset, data); if (offset == 7) + { m_bg_tilemap[m_video_circuit]->set_flip((data & 0x08) ? (TILEMAP_FLIPY | TILEMAP_FLIPX) : 0); - + if(m_video_circuit == 0) + { + m_textflip = (data & 0x08) == 0x08; + m_textlayer->set_flip((data & 0x08) ? TILEMAP_FLIPY | TILEMAP_FLIPX : 0); + } + } if (offset == 3) { if (data & 0x08) @@ -425,13 +431,15 @@ uint32_t combatsc_state::screen_update_combatsc(screen_device &screen, bitmap_in { rectangle clip; clip = cliprect; - + for (i = 0; i < 32; i++) { // scrollram [0x20]-[0x3f]: char enable (presumably bit 0 only) - if(m_scrollram[0x20 + i] == 0) + uint8_t base_scroll = m_textflip == true ? (0x3f - i) : (0x20 + i); + if(m_scrollram[base_scroll] == 0) continue; + clip.min_y = i * 8; clip.max_y = clip.min_y + 7; -- cgit v1.2.3