From a49e8e13775e1d843741f916c3483d8f4a69c43b Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 3 May 2021 19:09:32 -0400 Subject: ma6710: Hook up ROM bank switch --- src/mame/drivers/merit3xx.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/mame/drivers/merit3xx.cpp b/src/mame/drivers/merit3xx.cpp index 9ea90182430..579d9767248 100644 --- a/src/mame/drivers/merit3xx.cpp +++ b/src/mame/drivers/merit3xx.cpp @@ -491,6 +491,8 @@ Dipswitch on CRT-352 MEM is labeled SW1 #include "sound/ay8910.h" #include "video/mc6845.h" +namespace { + class merit3xx_state : public driver_device { public: @@ -508,6 +510,8 @@ protected: private: MC6845_UPDATE_ROW(update_row); + void ppi1_pa_w(u8 data); + void main_map(address_map &map); void io_map(address_map &map); @@ -519,13 +523,18 @@ void merit3xx_state::machine_start() { memory_region *rom = memregion("maincpu"); m_rombank->configure_entries(0, rom->bytes() / 0x8000, rom->base(), 0x8000); - m_rombank->set_entry(1); } MC6845_UPDATE_ROW(merit3xx_state::update_row) { } +void merit3xx_state::ppi1_pa_w(u8 data) +{ + // OK for ma6710; others likely need something very different + m_rombank->set_entry((data & 0x04) >> 1 | (~data & 0x01)); +} + void merit3xx_state::main_map(address_map &map) { map(0x0000, 0x7fff).bankr("rombank"); @@ -556,7 +565,9 @@ void merit3xx_state::merit3xx(machine_config &config) //NVRAM(config, "nvram", nvram_device::DEFAULT_ALL_0); I8255(config, "ppi0"); - I8255(config, "ppi1"); + + i8255_device &ppi1(I8255(config, "ppi1")); + ppi1.out_pa_callback().set(FUNC(merit3xx_state::ppi1_pa_w)); screen_device &screen(SCREEN(config, "screen", SCREEN_TYPE_RASTER)); screen.set_raw(10_MHz_XTAL, 616, 0, 512, 270, 0, 256); @@ -652,6 +663,8 @@ ROM_START( ma7558 ) ROM_LOAD( "dallas_ds1230y-200.u17", 0x2000, 0x8000, CRC(9d196d52) SHA1(21fd5acd7652ba10ae6b4ae520abcc7c34eb37d1) ) ROM_END +} // anonymous namespace + // CRT-300 games GAME( 1989, ma6710, 0, merit3xx, merit3xx, merit3xx_state, empty_init, ROT0, "Merit", "Multi-Action 6710-13", MACHINE_IS_SKELETON ) -- cgit v1.2.3