summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Angelo Salese <lordkale4@gmail.com>2019-07-27 00:29:02 +0200
committer Angelo Salese <lordkale4@gmail.com>2019-07-27 00:29:02 +0200
commit73b3b18d6e625db5b08fb96be6e4817e3f30057e (patch)
tree387694107cde5c2ec66a52af1672918e4574f465
parenta7151ac57f5493521f561d2c66abfc58bcd3d68a (diff)
Workaround MT #00349 (nw)
-rw-r--r--src/mame/drivers/shaolins.cpp3
-rw-r--r--src/mame/video/shaolins.cpp12
2 files changed, 12 insertions, 3 deletions
diff --git a/src/mame/drivers/shaolins.cpp b/src/mame/drivers/shaolins.cpp
index e9577900407..b5572481a0f 100644
--- a/src/mame/drivers/shaolins.cpp
+++ b/src/mame/drivers/shaolins.cpp
@@ -51,8 +51,7 @@ void shaolins_state::shaolins_map(address_map &map)
map(0x1800, 0x1800).w(FUNC(shaolins_state::palettebank_w));
map(0x2000, 0x2000).w(FUNC(shaolins_state::scroll_w));
map(0x2800, 0x2bff).ram(); /* RAM BANK 2 */
- map(0x3000, 0x30ff).ram(); /* RAM BANK 1 */
- map(0x3100, 0x33ff).ram().share("spriteram");
+ map(0x3000, 0x33ff).ram().share("spriteram"); /* RAM BANK 1 */
map(0x3800, 0x3bff).ram().w(FUNC(shaolins_state::colorram_w)).share("colorram");
map(0x3c00, 0x3fff).ram().w(FUNC(shaolins_state::videoram_w)).share("videoram");
map(0x4000, 0x5fff).rom(); /* Machine checks for extra rom */
diff --git a/src/mame/video/shaolins.cpp b/src/mame/video/shaolins.cpp
index eab6c5d169b..e3ecdc9d8a3 100644
--- a/src/mame/video/shaolins.cpp
+++ b/src/mame/video/shaolins.cpp
@@ -119,6 +119,9 @@ WRITE8_MEMBER(shaolins_state::nmi_w)
flip_screen_set(data & 0x01);
machine().tilemap().mark_all_dirty();
}
+
+ machine().bookkeeping().coin_counter_w(0,data & 0x08);
+ machine().bookkeeping().coin_counter_w(1,data & 0x10);
}
TILE_GET_INFO_MEMBER(shaolins_state::get_bg_tile_info)
@@ -144,7 +147,14 @@ void shaolins_state::video_start()
void shaolins_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
- for (int offs = m_spriteram.bytes() - 32; offs >= 0; offs -= 32 ) /* max 24 sprites */
+ // area $3000-1f is written and never read to.
+ // Its values are filled to 0x00 when it's expected to have no sprites (cross hatch, service mode, between level transitions ...)
+ // May be a rudimentary per-sprite disable
+ // TODO: understand actual disabling conditions (either by schematics or by probing the real HW)
+ if (m_spriteram[0] == 0)
+ return;
+
+ for (int offs = m_spriteram.bytes() - 32; offs >= 0x100; offs -= 32 ) /* max 24 sprites */
{
if (m_spriteram[offs] && m_spriteram[offs + 6]) /* stop rogue sprites on high score screen */
{