summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video/supbtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/video/supbtime.cpp')
-rw-r--r--src/mame/video/supbtime.cpp44
1 files changed, 33 insertions, 11 deletions
diff --git a/src/mame/video/supbtime.cpp b/src/mame/video/supbtime.cpp
index 797e61d1e4d..d77b7ca0a02 100644
--- a/src/mame/video/supbtime.cpp
+++ b/src/mame/video/supbtime.cpp
@@ -6,13 +6,16 @@
Video mixing
+ - are there priority registers / bits in the sprites that would allow
+ this to be collapsed further?
+
***************************************************************************/
#include "emu.h"
#include "includes/supbtime.h"
-// End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimej)
-uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+
+uint32_t supbtime_state::screen_update_common(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, bool use_offsets)
{
address_space &space = machine().dummy_space();
uint16_t flip = m_deco_tilegen->pf_control_r(space, 0, 0xffff);
@@ -23,6 +26,23 @@ uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_in
bitmap.fill(768, cliprect);
+ if (use_offsets)
+ {
+ // chinatwn and tumblep are verified as needing a 1 pixel offset on the tilemaps to match original hardware (supbtime appears to not want them)
+ m_deco_tilegen->set_scrolldx(0, 0, 1, -1);
+ m_deco_tilegen->set_scrolldx(0, 1, 1, -1);
+ m_deco_tilegen->set_scrolldx(1, 0, 1, -1);
+ m_deco_tilegen->set_scrolldx(1, 1, 1, -1);
+ }
+
+ return 0;
+}
+
+// End sequence uses rowscroll '98 c0' on pf1 (jmp to 1d61a on supbtimej)
+uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ screen_update_common(screen, bitmap, cliprect, false);
+
m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400);
m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
@@ -30,18 +50,20 @@ uint32_t supbtime_state::screen_update_supbtime(screen_device &screen, bitmap_in
return 0;
}
-// Tumblepop is one of few games to take advantage of the playfields ability
-// to switch between 8*8 tiles and 16*16 tiles.
-uint32_t supbtime_state::screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+uint32_t supbtime_state::screen_update_chinatwn(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- address_space &space = machine().dummy_space();
- uint16_t flip = m_deco_tilegen->pf_control_r(space, 0, 0xffff);
+ screen_update_common(screen, bitmap, cliprect, true);
- flip_screen_set(BIT(flip, 7));
- m_sprgen->set_flip_screen(BIT(flip, 7));
- m_deco_tilegen->pf_update(m_pf_rowscroll[0], m_pf_rowscroll[1]);
+ m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, 0, 0);
+ m_sprgen->draw_sprites(bitmap, cliprect, m_spriteram, 0x400);
+ m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);
+
+ return 0;
+}
- bitmap.fill(256+512, cliprect); // not verified
+uint32_t supbtime_state::screen_update_tumblep(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
+{
+ screen_update_common(screen, bitmap, cliprect, true);
m_deco_tilegen->tilemap_2_draw(screen, bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 0);
m_deco_tilegen->tilemap_1_draw(screen, bitmap, cliprect, 0, 0);