From ca544ca03e9f2766c27c494ae8c8e148de8b6890 Mon Sep 17 00:00:00 2001 From: yz70s Date: Fri, 15 Jun 2018 19:24:46 +0200 Subject: svga_tseng.cpp: move memory mappings to remap routine (nw) --- src/devices/bus/isa/svga_tseng.cpp | 14 ++++++++++++-- src/devices/bus/isa/svga_tseng.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/devices/bus/isa/svga_tseng.cpp b/src/devices/bus/isa/svga_tseng.cpp index b5b99399fb8..fd232b01d8d 100644 --- a/src/devices/bus/isa/svga_tseng.cpp +++ b/src/devices/bus/isa/svga_tseng.cpp @@ -73,9 +73,9 @@ void isa8_svga_et4k_device::device_start() m_vga = subdevice("vga"); - m_isa->install_rom(this, 0xc0000, 0xc7fff, "et4000", "et4000"); map_io(); map_ram(); + map_rom(); } //------------------------------------------------- @@ -87,14 +87,19 @@ void isa8_svga_et4k_device::device_reset() } //------------------------------------------------- -// remap - remap ram since something +// remap - remap ram/io since something // could have unmapped it //------------------------------------------------- void isa8_svga_et4k_device::remap(int space_id, offs_t start, offs_t end) { if (space_id == AS_PROGRAM) + { map_ram(); + map_rom(); + } + else if (space_id == AS_IO) + map_io(); } void isa8_svga_et4k_device::map_io() @@ -108,3 +113,8 @@ void isa8_svga_et4k_device::map_ram() { m_isa->install_memory(0xa0000, 0xbffff, read8_delegate(FUNC(tseng_vga_device::mem_r), m_vga), write8_delegate(FUNC(tseng_vga_device::mem_w), m_vga)); } + +void isa8_svga_et4k_device::map_rom() +{ + m_isa->install_rom(this, 0xc0000, 0xc7fff, "et4000", "et4000"); +} diff --git a/src/devices/bus/isa/svga_tseng.h b/src/devices/bus/isa/svga_tseng.h index 6fe70d06fff..f83460e86ff 100644 --- a/src/devices/bus/isa/svga_tseng.h +++ b/src/devices/bus/isa/svga_tseng.h @@ -38,6 +38,7 @@ protected: private: void map_io(); void map_ram(); + void map_rom(); tseng_vga_device *m_vga; }; -- cgit v1.2.3