summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2020-11-18 14:15:44 +0100
committer Olivier Galibert <galibert@pobox.com>2020-11-18 14:15:44 +0100
commit5085851a37ed38e3a359e2815dccbdc9feba579b (patch)
tree178f829c7dccf0e08217ef33b23938ed87b8cb18
parentc245230f4005a7543d87d4cbbf3a9b2180dfd504 (diff)
Fix tmnt2 and derivatives
-rw-r--r--src/mame/drivers/tmnt.cpp4
-rw-r--r--src/mame/includes/tmnt.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mame/drivers/tmnt.cpp b/src/mame/drivers/tmnt.cpp
index fe47a15f414..9caf8b42801 100644
--- a/src/mame/drivers/tmnt.cpp
+++ b/src/mame/drivers/tmnt.cpp
@@ -681,7 +681,7 @@ void prmrsocr_state::prmrsocr_main_map(address_map &map)
inline uint32_t tmnt_state::tmnt2_get_word( uint32_t addr )
{
if (addr <= 0x07ffff / 2)
- return(m_tmnt2_rom[addr]);
+ return(m_tmnt2_rom->as_u32(addr));
else if (addr >= 0x104000 / 2 && addr <= 0x107fff / 2)
return(m_sunset_104000[addr - 0x104000 / 2]);
else if (addr >= 0x180000 / 2 && addr <= 0x183fff / 2)
@@ -915,7 +915,7 @@ logerror("copy command %04x sprite %08x data %08x: %04x%04x %04x%04x modifiers
void tmnt_state::tmnt2_main_map(address_map &map)
{
- map(0x000000, 0x0fffff).rom().share("tmnt2_rom");
+ map(0x000000, 0x0fffff).rom();
map(0x104000, 0x107fff).ram().share("sunset_104000"); /* main RAM */
map(0x140000, 0x140fff).ram().w(m_palette, FUNC(palette_device::write16)).share("palette");
map(0x180000, 0x183fff).ram().w(FUNC(tmnt_state::k053245_scattered_word_w)).share("spriteram"); // k053245_scattered_word_r
diff --git a/src/mame/includes/tmnt.h b/src/mame/includes/tmnt.h
index 95baf1e8cba..5b734d7c3cb 100644
--- a/src/mame/includes/tmnt.h
+++ b/src/mame/includes/tmnt.h
@@ -26,7 +26,7 @@ public:
tmnt_state(const machine_config &mconfig, device_type type, const char *tag) :
driver_device(mconfig, type, tag),
m_spriteram(*this, "spriteram"),
- m_tmnt2_rom(*this, "tmnt2_rom"),
+ m_tmnt2_rom(*this, "maincpu"),
m_sunset_104000(*this, "sunset_104000"),
m_tmnt2_1c0800(*this, "tmnt2_1c0800"),
m_maincpu(*this, "maincpu"),
@@ -71,7 +71,7 @@ protected:
/* memory pointers */
optional_shared_ptr<uint16_t> m_spriteram;
- optional_shared_ptr<uint16_t> m_tmnt2_rom;
+ required_memory_region m_tmnt2_rom;
optional_shared_ptr<uint16_t> m_sunset_104000;
optional_shared_ptr<uint16_t> m_tmnt2_1c0800;