summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/tail2nos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/tail2nos.cpp')
-rw-r--r--src/mame/video/tail2nos.cpp59
1 files changed, 33 insertions, 26 deletions
diff --git a/src/mame/video/tail2nos.cpp b/src/mame/video/tail2nos.cpp
index 46210eddee8..b8191e93382 100644
--- a/src/mame/video/tail2nos.cpp
+++ b/src/mame/video/tail2nos.cpp
@@ -79,43 +79,43 @@ WRITE16_MEMBER(tail2nos_state::tail2nos_zoomdata_w)
m_k051316->mark_gfx_dirty(offset * 2);
}
-WRITE16_MEMBER(tail2nos_state::tail2nos_gfxbank_w)
+WRITE8_MEMBER(tail2nos_state::tail2nos_gfxbank_w)
{
// -------- --pe-b-b
// p = palette bank
// b = tile bank
// e = video enable
- if (ACCESSING_BITS_0_7)
- {
- int bank;
- bank = 0;
- /* bits 0 and 2 select char bank */
- if (data & 0x04) bank |= 2;
- if (data & 0x01) bank |= 1;
+ // bits 0 and 2 select char bank
+ int bank = 0;
+ if (data & 0x04) bank |= 2;
+ if (data & 0x01) bank |= 1;
+ if (m_txbank != bank)
+ {
+ m_txbank = bank;
+ m_tx_tilemap->mark_all_dirty();
+ }
- if (m_txbank != bank)
- {
- m_txbank = bank;
- m_tx_tilemap->mark_all_dirty();
- }
+ // bit 5 seems to select palette bank (used on startup)
+ if (data & 0x20)
+ bank = 7;
+ else
+ bank = 3;
- /* bit 5 seems to select palette bank (used on startup) */
- if (data & 0x20)
- bank = 7;
- else
- bank = 3;
+ if (m_txpalette != bank)
+ {
+ m_txpalette = bank;
+ m_tx_tilemap->mark_all_dirty();
+ }
- if (m_txpalette != bank)
- {
- m_txpalette = bank;
- m_tx_tilemap->mark_all_dirty();
- }
+ // bit 4 seems to be video enable
+ m_video_enable = BIT(data, 4);
- /* bit 4 seems to be video enable */
- m_video_enable = data & 0x10;
- }
+ // bit 7 is flip screen
+ m_flip_screen = BIT(data, 7);
+ m_tx_tilemap->set_flip(m_flip_screen ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
+ m_tx_tilemap->set_scrolly(m_flip_screen ? -8 : 0);
}
@@ -145,6 +145,13 @@ void tail2nos_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &clipre
color = (spriteram[offs + 2] & 0xe000) >> 13;
flipx = spriteram[offs + 2] & 0x1000;
flipy = spriteram[offs + 2] & 0x0800;
+ if (m_flip_screen)
+ {
+ flipx = !flipx;
+ flipy = !flipy;
+ sx = 302 - sx;
+ sy = 216 - sy;
+ }
m_gfxdecode->gfx(1)->transpen(bitmap,/* placement relative to zoom layer verified on the real thing */
cliprect,