Workaround MT #00349 (nw)

This commit is contained in:
Angelo Salese 2019-07-27 00:29:02 +02:00
parent a7151ac57f
commit 73b3b18d6e
2 changed files with 12 additions and 3 deletions

View File

@ -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 */

View File

@ -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 */
{