summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mephisto_montec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mephisto_montec.cpp')
-rw-r--r--src/mame/drivers/mephisto_montec.cpp111
1 files changed, 58 insertions, 53 deletions
diff --git a/src/mame/drivers/mephisto_montec.cpp b/src/mame/drivers/mephisto_montec.cpp
index d131deea478..71aeefdbf0a 100644
--- a/src/mame/drivers/mephisto_montec.cpp
+++ b/src/mame/drivers/mephisto_montec.cpp
@@ -245,40 +245,43 @@ READ8_MEMBER(mephisto_montec_state::megaiv_input_r)
}
-ADDRESS_MAP_START(mephisto_montec_state::montec_mem)
- AM_RANGE( 0x0000, 0x1fff ) AM_RAM AM_SHARE("nvram")
- AM_RANGE( 0x2400, 0x2400 ) AM_READ(montec_input_r)
- AM_RANGE( 0x2800, 0x2800 ) AM_DEVWRITE("board", mephisto_board_device, mux_w)
- AM_RANGE( 0x2c00, 0x2c00 ) AM_DEVWRITE("board", mephisto_board_device, led_w)
- AM_RANGE( 0x3400, 0x3400 ) AM_WRITE(montec_led_w)
- AM_RANGE( 0x3000, 0x3001 ) AM_WRITE(montec_mux_w)
- AM_RANGE( 0x3002, 0x3002 ) AM_WRITE(montec_beeper_w)
- AM_RANGE( 0x3004, 0x3004 ) AM_WRITE(montec_lcd_data_w)
- AM_RANGE( 0x3005, 0x3005 ) AM_WRITE(montec_ldc_cs1_w)
- AM_RANGE( 0x3006, 0x3006 ) AM_WRITE(montec_lcd_clk_w)
- AM_RANGE( 0x3007, 0x3007 ) AM_WRITE(montec_ldc_cs0_w)
- AM_RANGE( 0x2000, 0x2000 ) AM_READWRITE(montec_nmi_ack_r, montec_nmi_ack_w)
- AM_RANGE( 0x8000, 0xffff ) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(mephisto_montec_state::megaiv_mem)
- AM_RANGE( 0x0000, 0x1fff ) AM_RAM AM_SHARE("nvram")
- AM_RANGE( 0x2400, 0x2400 ) AM_WRITE(megaiv_led_w)
- AM_RANGE( 0x2800, 0x2800 ) AM_DEVWRITE("board", mephisto_board_device, mux_w)
- AM_RANGE( 0x2c00, 0x2c03 ) AM_WRITE(montec_mux_w) AM_READNOP
- AM_RANGE( 0x2c04, 0x2c04 ) AM_WRITE(montec_lcd_data_w)
- AM_RANGE( 0x2c05, 0x2c05 ) AM_WRITE(montec_ldc_cs1_w)
- AM_RANGE( 0x2c06, 0x2c06 ) AM_WRITE(montec_lcd_clk_w)
- AM_RANGE( 0x2c07, 0x2c07 ) AM_WRITE(montec_ldc_cs0_w)
- AM_RANGE( 0x3000, 0x3007 ) AM_READ(megaiv_input_r)
- AM_RANGE( 0x8000, 0xffff ) AM_ROM
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(mephisto_montec_state::smondial2_mem)
- AM_IMPORT_FROM(megaiv_mem)
- AM_RANGE( 0x4000, 0x7fff ) AM_DEVREAD("cartslot", generic_slot_device, read_rom)
-ADDRESS_MAP_END
+void mephisto_montec_state::montec_mem(address_map &map)
+{
+ map(0x0000, 0x1fff).ram().share("nvram");
+ map(0x2400, 0x2400).r(this, FUNC(mephisto_montec_state::montec_input_r));
+ map(0x2800, 0x2800).w(m_board, FUNC(mephisto_board_device::mux_w));
+ map(0x2c00, 0x2c00).w(m_board, FUNC(mephisto_board_device::led_w));
+ map(0x3400, 0x3400).w(this, FUNC(mephisto_montec_state::montec_led_w));
+ map(0x3000, 0x3001).w(this, FUNC(mephisto_montec_state::montec_mux_w));
+ map(0x3002, 0x3002).w(this, FUNC(mephisto_montec_state::montec_beeper_w));
+ map(0x3004, 0x3004).w(this, FUNC(mephisto_montec_state::montec_lcd_data_w));
+ map(0x3005, 0x3005).w(this, FUNC(mephisto_montec_state::montec_ldc_cs1_w));
+ map(0x3006, 0x3006).w(this, FUNC(mephisto_montec_state::montec_lcd_clk_w));
+ map(0x3007, 0x3007).w(this, FUNC(mephisto_montec_state::montec_ldc_cs0_w));
+ map(0x2000, 0x2000).rw(this, FUNC(mephisto_montec_state::montec_nmi_ack_r), FUNC(mephisto_montec_state::montec_nmi_ack_w));
+ map(0x8000, 0xffff).rom();
+}
+
+void mephisto_montec_state::megaiv_mem(address_map &map)
+{
+ map(0x0000, 0x1fff).ram().share("nvram");
+ map(0x2400, 0x2400).w(this, FUNC(mephisto_montec_state::megaiv_led_w));
+ map(0x2800, 0x2800).w(m_board, FUNC(mephisto_board_device::mux_w));
+ map(0x2c00, 0x2c03).w(this, FUNC(mephisto_montec_state::montec_mux_w)).nopr();
+ map(0x2c04, 0x2c04).w(this, FUNC(mephisto_montec_state::montec_lcd_data_w));
+ map(0x2c05, 0x2c05).w(this, FUNC(mephisto_montec_state::montec_ldc_cs1_w));
+ map(0x2c06, 0x2c06).w(this, FUNC(mephisto_montec_state::montec_lcd_clk_w));
+ map(0x2c07, 0x2c07).w(this, FUNC(mephisto_montec_state::montec_ldc_cs0_w));
+ map(0x3000, 0x3007).r(this, FUNC(mephisto_montec_state::megaiv_input_r));
+ map(0x8000, 0xffff).rom();
+}
+
+
+void mephisto_montec_state::smondial2_mem(address_map &map)
+{
+ megaiv_mem(map);
+ map(0x4000, 0x7fff).r("cartslot", FUNC(generic_slot_device::read_rom));
+}
WRITE8_MEMBER(mephisto_montec_state::smondial_board_mux_w)
@@ -308,18 +311,19 @@ WRITE8_MEMBER(mephisto_montec_state::smondial_led_data_w)
m_beeper->set_state(BIT(m_leds_mux, 7));
}
-ADDRESS_MAP_START(mephisto_montec_state::smondial_mem)
- AM_RANGE( 0x0000, 0x1fff ) AM_RAM AM_SHARE("nvram")
- AM_RANGE( 0x4000, 0x4007 ) AM_READ(megaiv_input_r)
- AM_RANGE( 0x6400, 0x6407 ) AM_WRITE(smondial_led_data_w)
- AM_RANGE( 0x6800, 0x6807 ) AM_WRITE(smondial_board_mux_w)
- AM_RANGE( 0x6c00, 0x6c03 ) AM_WRITE(montec_mux_w)
- AM_RANGE( 0x6c04, 0x6c04 ) AM_WRITE(montec_lcd_data_w)
- AM_RANGE( 0x6c05, 0x6c05 ) AM_WRITE(montec_ldc_cs1_w)
- AM_RANGE( 0x6c06, 0x6c06 ) AM_WRITE(montec_lcd_clk_w)
- AM_RANGE( 0x6c07, 0x6c07 ) AM_WRITE(montec_ldc_cs0_w)
- AM_RANGE( 0x8000, 0xffff ) AM_ROM
-ADDRESS_MAP_END
+void mephisto_montec_state::smondial_mem(address_map &map)
+{
+ map(0x0000, 0x1fff).ram().share("nvram");
+ map(0x4000, 0x4007).r(this, FUNC(mephisto_montec_state::megaiv_input_r));
+ map(0x6400, 0x6407).w(this, FUNC(mephisto_montec_state::smondial_led_data_w));
+ map(0x6800, 0x6807).w(this, FUNC(mephisto_montec_state::smondial_board_mux_w));
+ map(0x6c00, 0x6c03).w(this, FUNC(mephisto_montec_state::montec_mux_w));
+ map(0x6c04, 0x6c04).w(this, FUNC(mephisto_montec_state::montec_lcd_data_w));
+ map(0x6c05, 0x6c05).w(this, FUNC(mephisto_montec_state::montec_ldc_cs1_w));
+ map(0x6c06, 0x6c06).w(this, FUNC(mephisto_montec_state::montec_lcd_clk_w));
+ map(0x6c07, 0x6c07).w(this, FUNC(mephisto_montec_state::montec_ldc_cs0_w));
+ map(0x8000, 0xffff).rom();
+}
WRITE8_MEMBER(mephisto_montec_state::mondial2_input_mux_w)
{
@@ -339,13 +343,14 @@ WRITE8_MEMBER(mephisto_montec_state::mondial2_input_mux_w)
}
-ADDRESS_MAP_START(mephisto_montec_state::mondial2_mem)
- AM_RANGE( 0x0000, 0x07ff ) AM_RAM AM_SHARE("nvram")
- AM_RANGE( 0x2000, 0x2000 ) AM_WRITE(mondial2_input_mux_w)
- AM_RANGE( 0x2800, 0x2800 ) AM_DEVWRITE("board", mephisto_board_device, mux_w)
- AM_RANGE( 0x3000, 0x3007 ) AM_READ(megaiv_input_r)
- AM_RANGE( 0x8000, 0xffff ) AM_ROM
-ADDRESS_MAP_END
+void mephisto_montec_state::mondial2_mem(address_map &map)
+{
+ map(0x0000, 0x07ff).ram().share("nvram");
+ map(0x2000, 0x2000).w(this, FUNC(mephisto_montec_state::mondial2_input_mux_w));
+ map(0x2800, 0x2800).w(m_board, FUNC(mephisto_board_device::mux_w));
+ map(0x3000, 0x3007).r(this, FUNC(mephisto_montec_state::megaiv_input_r));
+ map(0x8000, 0xffff).rom();
+}
TIMER_DEVICE_CALLBACK_MEMBER(mephisto_montec_state::refresh_leds)
{