diff options
Diffstat (limited to 'src/mame/drivers/blit.cpp')
-rw-r--r-- | src/mame/drivers/blit.cpp | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/src/mame/drivers/blit.cpp b/src/mame/drivers/blit.cpp index 4878a60865a..d75273aa559 100644 --- a/src/mame/drivers/blit.cpp +++ b/src/mame/drivers/blit.cpp @@ -56,6 +56,8 @@ #define LOGDBG(...) LOGMASKED(LOG_DEBUG, __VA_ARGS__) +namespace { + class blit_state : public driver_device { public: @@ -95,7 +97,7 @@ private: required_shared_ptr<uint16_t> m_p_ram; required_region_ptr<uint16_t> m_sysrom; - memory_passthrough_handler *m_rom_shadow_tap; + memory_passthrough_handler m_rom_shadow_tap; int m_videostart = 0; }; @@ -211,20 +213,22 @@ void blit_state::machine_reset() { address_space &program = m_maincpu->space(AS_PROGRAM); program.install_rom(0x000000, 0x000007, m_sysrom); // do it here for F3 - m_rom_shadow_tap = program.install_read_tap(0x040000, 0x045fff, "rom_shadow_r",[this](offs_t offset, u16 &data, u16 mem_mask) - { - if (!machine().side_effects_disabled()) - { - // delete this tap - m_rom_shadow_tap->remove(); - - // reinstall ram over the rom shadow - m_maincpu->space(AS_PROGRAM).install_ram(0x000000, 0x000007, m_p_ram); - } + m_rom_shadow_tap.remove(); + m_rom_shadow_tap = program.install_read_tap( + 0x040000, 0x045fff, + "rom_shadow_r", + [this] (offs_t offset, u16 &data, u16 mem_mask) + { + if (!machine().side_effects_disabled()) + { + // delete this tap + m_rom_shadow_tap.remove(); - // return the original data - return data; - }); + // reinstall ram over the rom shadow + m_maincpu->space(AS_PROGRAM).install_ram(0x000000, 0x000007, m_p_ram); + } + }, + &m_rom_shadow_tap); *m_misccr = 0; } @@ -284,6 +288,8 @@ ROM_START( blit ) ROMX_LOAD("rom5.bin", 0x4000, 0x08bf, CRC(d87f121f) SHA1(6e776ac29554b8a8bb332168c155bcc502c927b5), ROM_BIOS(0)|ROM_SKIP(1)) ROM_END +} // anonymous namespace + /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS COMP( 1981, blit, 0, 0, blit, blit, blit_state, empty_init, "AT&T", "Blit", MACHINE_IS_SKELETON ) |