From c57c3e5be5e5c9ca7e0b33ac3e7c3859ffe05f0a Mon Sep 17 00:00:00 2001 From: Olivier Galibert Date: Fri, 27 Nov 2020 17:42:38 +0100 Subject: [PATCH] Fix magtouch, fake the bios shadow a little less badly --- src/mame/drivers/magtouch.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/mame/drivers/magtouch.cpp b/src/mame/drivers/magtouch.cpp index 169eff9b4ec..513a29fb1a9 100644 --- a/src/mame/drivers/magtouch.cpp +++ b/src/mame/drivers/magtouch.cpp @@ -92,6 +92,7 @@ public: : pcat_base_state(mconfig, type, tag) , m_isabus(*this, "isa") , m_rombank(*this, "rombank") + , m_shadow(*this, "shadow") , m_in0(*this, "IN0") { } @@ -100,12 +101,14 @@ public: private: required_device m_isabus; required_memory_bank m_rombank; + required_shared_ptr m_shadow; required_ioport m_in0; uint8_t magtouch_io_r(offs_t offset); void magtouch_io_w(offs_t offset, uint8_t data); void dma8237_1_dack_w(uint8_t data); virtual void machine_start() override; + virtual void machine_reset() override; static void magtouch_sb_conf(device_t *device); void magtouch_io(address_map &map); void magtouch_map(address_map &map); @@ -145,7 +148,7 @@ void magtouch_state::magtouch_map(address_map &map) map(0x000c0000, 0x000c7fff).rom().region("video_bios", 0); map(0x000d0000, 0x000d1fff).ram().share("nvram"); map(0x000d8000, 0x000dffff).bankr("rombank"); - map(0x000f0000, 0x000fffff).rom().region("bios", 0); + map(0x000f0000, 0x000fffff).ram().share(m_shadow); map(0xffff0000, 0xffffffff).rom().region("bios", 0); } @@ -178,6 +181,12 @@ void magtouch_state::machine_start() subdevice("nvram")->set_base(memshare("nvram")->ptr(), 0x2000); } +void magtouch_state::machine_reset() +{ + // Rom shadow is not handled, well, at all + memcpy(m_shadow, memregion("bios")->base(), 0x10000); +} + static void magtouch_isa8_cards(device_slot_interface &device) { device.option_add("sb15", ISA8_SOUND_BLASTER_1_5);