diff options
Diffstat (limited to 'src/mame/drivers/micral.cpp')
-rw-r--r-- | src/mame/drivers/micral.cpp | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/mame/drivers/micral.cpp b/src/mame/drivers/micral.cpp index 829fd292128..915ab57fb98 100644 --- a/src/mame/drivers/micral.cpp +++ b/src/mame/drivers/micral.cpp @@ -9,7 +9,7 @@ Bull (Originally R2E) Micral 80-22G http://www.ti99.com/exelvision/website/index.php?page=r2e-micral-8022-g This expensive, futuristic-looking design featured a motherboard and slots, -much like an ancient pc. The known chip complement is: +much like an ancient PC. The known chip complement is: Z80A, 4MHz; 64KB RAM, 2KB BIOS ROM, 256x4 prom (7611); CRT8002, TMS9937 (=CRT5037), 4KB video RAM, 256x4 prom (7611); 2x 5.25 inch floppy drives, one ST506 5MB hard drive; @@ -56,17 +56,21 @@ https://www.esocop.org/docs/Questar.pdf *********************************************************************************/ #include "emu.h" + +#include "bus/rs232/rs232.h" #include "cpu/z80/z80.h" -#include "video/tms9927.h" +#include "machine/ay31015.h" +#include "machine/clock.h" //#include "sound/beep.h" +#include "video/tms9927.h" + #include "emupal.h" #include "screen.h" #include "speaker.h" -#include "machine/ay31015.h" -#include "machine/clock.h" -#include "bus/rs232/rs232.h" +namespace { + class micral_state : public driver_device { public: @@ -101,7 +105,7 @@ private: u8 s_command = 0U; u8 s_data = 0U; std::unique_ptr<u8[]> m_vram; - memory_passthrough_handler *m_rom_shadow_tap; + memory_passthrough_handler m_rom_shadow_tap; required_device<cpu_device> m_maincpu; required_region_ptr<u8> m_rom; required_shared_ptr<u8> m_ram; @@ -373,20 +377,22 @@ void micral_state::machine_reset() address_space &program = m_maincpu->space(AS_PROGRAM); program.install_rom(0x0000, 0x07ff, m_rom); // do it here for F3 - m_rom_shadow_tap = program.install_read_tap(0xf800, 0xffff, "rom_shadow_r",[this](offs_t offset, u8 &data, u8 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(0x0000, 0x07ff, m_ram); - } + m_rom_shadow_tap.remove(); + m_rom_shadow_tap = program.install_read_tap( + 0xf800, 0xffff, + "rom_shadow_r", + [this] (offs_t offset, u8 &data, u8 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(0x0000, 0x07ff, m_ram); + } + }, + &m_rom_shadow_tap); } void micral_state::machine_start() @@ -464,6 +470,8 @@ ROM_START( questarm ) ROM_LOAD( "c10_char.bin", 0x0000, 0x2000, BAD_DUMP CRC(cb530b6f) SHA1(95590bbb433db9c4317f535723b29516b9b9fcbf)) ROM_END +} // anonymous namespace + /* Driver */ // YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS |