diff --git a/src/mame/drivers/contra.cpp b/src/mame/drivers/contra.cpp index 3af801f7f68..797c7ded4c1 100644 --- a/src/mame/drivers/contra.cpp +++ b/src/mame/drivers/contra.cpp @@ -86,11 +86,11 @@ void contra_state::contra_map(address_map &map) map(0x2400, 0x27ff).w(FUNC(contra_state::contra_fg_vram_w)).share("fg_vram"); map(0x2800, 0x2bff).w(FUNC(contra_state::contra_text_cram_w)).share("tx_cram"); map(0x2c00, 0x2fff).w(FUNC(contra_state::contra_text_vram_w)).share("tx_vram"); - map(0x3000, 0x37ff).writeonly().share("spriteram");/* 2nd bank is at 0x5000 */ - map(0x3800, 0x3fff).writeonly(); // second sprite buffer + map(0x3000, 0x3fff).ram().share("spriteram"); map(0x4000, 0x43ff).w(FUNC(contra_state::contra_bg_cram_w)).share("bg_cram"); map(0x4400, 0x47ff).w(FUNC(contra_state::contra_bg_vram_w)).share("bg_vram"); - map(0x4800, 0x5fff).writeonly(); + map(0x4800, 0x4fff).ram(); + map(0x5000, 0x5fff).ram().share("spriteram_2"); map(0x6000, 0x7fff).bankr("bank1"); map(0x7000, 0x7000).w(FUNC(contra_state::contra_bankswitch_w)); diff --git a/src/mame/includes/contra.h b/src/mame/includes/contra.h index 93585e3beda..80115d52038 100644 --- a/src/mame/includes/contra.h +++ b/src/mame/includes/contra.h @@ -20,6 +20,7 @@ public: m_tx_cram(*this, "tx_cram"), m_tx_vram(*this, "tx_vram"), m_spriteram(*this, "spriteram"), + m_spriteram_2(*this, "spriteram_2"), m_bg_cram(*this, "bg_cram"), m_bg_vram(*this, "bg_vram"), m_audiocpu(*this, "audiocpu"), @@ -38,6 +39,7 @@ public: required_shared_ptr m_tx_cram; required_shared_ptr m_tx_vram; required_shared_ptr m_spriteram; + required_shared_ptr m_spriteram_2; required_shared_ptr m_bg_cram; required_shared_ptr m_bg_vram; diff --git a/src/mame/video/contra.cpp b/src/mame/video/contra.cpp index 45bab77d1f6..ef97ba765a7 100644 --- a/src/mame/video/contra.cpp +++ b/src/mame/video/contra.cpp @@ -239,9 +239,9 @@ WRITE8_MEMBER(contra_state::contra_K007121_ctrl_1_w) if (offset == 3) { if ((data & 0x8) == 0) - memcpy(m_buffered_spriteram_2.get(), m_spriteram + 0x2800, 0x800); + memcpy(m_buffered_spriteram_2.get(), m_spriteram_2 + 0x800, 0x800); else - memcpy(m_buffered_spriteram_2.get(), m_spriteram + 0x2000, 0x800); + memcpy(m_buffered_spriteram_2.get(), m_spriteram_2 + 0x000, 0x800); } if (offset == 6) {