summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/nitedrvr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/nitedrvr.cpp')
-rw-r--r--src/mame/video/nitedrvr.cpp39
1 files changed, 14 insertions, 25 deletions
diff --git a/src/mame/video/nitedrvr.cpp b/src/mame/video/nitedrvr.cpp
index 6ef13d33553..d33c8472bfa 100644
--- a/src/mame/video/nitedrvr.cpp
+++ b/src/mame/video/nitedrvr.cpp
@@ -9,25 +9,6 @@
#include "emu.h"
#include "includes/nitedrvr.h"
-WRITE8_MEMBER(nitedrvr_state::nitedrvr_videoram_w)
-{
- m_videoram[offset] = data;
- m_bg_tilemap->mark_tile_dirty(offset);
-}
-
-
-TILE_GET_INFO_MEMBER(nitedrvr_state::get_bg_tile_info)
-{
- int code = m_videoram[tile_index] & 0x3f;
-
- SET_TILE_INFO_MEMBER(0, code, 0, 0);
-}
-
-void nitedrvr_state::video_start()
-{
- // note: tile rows ignored on V&8, V&64, V&128
- m_bg_tilemap = &machine().tilemap().create(*m_gfxdecode, tilemap_get_info_delegate(FUNC(nitedrvr_state::get_bg_tile_info),this), TILEMAP_SCAN_ROWS, 8, 16, 32, 4);
-}
void nitedrvr_state::draw_box(bitmap_ind16 &bitmap, const rectangle &cliprect, int bx, int by, int ex, int ey)
{
@@ -52,15 +33,23 @@ void nitedrvr_state::draw_roadway(bitmap_ind16 &bitmap, const rectangle &cliprec
}
}
-uint32_t nitedrvr_state::screen_update_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+void nitedrvr_state::draw_tiles(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- bitmap.fill(0, cliprect);
+ // draw tiles manually, note that tile rows are ignored on V&8, V&64, V&128
+ for (int offs = 0; offs < 0x80; offs++)
+ {
+ int code = m_videoram[offs];
+ int sx = (offs & 0x1f) * 8;
+ int sy = (offs >> 5) * 2 * 8;
- // don't wrap playfield
- rectangle clip = cliprect;
- if (clip.max_y > 63) clip.max_y = 63;
+ m_gfxdecode->gfx(0)->opaque(bitmap, cliprect, code, 0, 0, 0, sx, sy);
+ }
+}
- m_bg_tilemap->draw(screen, bitmap, clip, 0, 0);
+uint32_t nitedrvr_state::screen_update_nitedrvr(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ bitmap.fill(0, cliprect);
+ draw_tiles(bitmap, cliprect);
draw_roadway(bitmap, cliprect);
return 0;