summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/drivers/mephisto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mame/drivers/mephisto.cpp')
-rw-r--r--src/mame/drivers/mephisto.cpp75
1 files changed, 39 insertions, 36 deletions
diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp
index 1184f1f1206..d853893d7f3 100644
--- a/src/mame/drivers/mephisto.cpp
+++ b/src/mame/drivers/mephisto.cpp
@@ -222,42 +222,45 @@ WRITE8_MEMBER( mephisto_state::write_led_mm2 )
m_led7= BIT(data, 7) ? 0xff :0x00; //MM2
}
-ADDRESS_MAP_START(mephisto_state::rebel5_mem)
- AM_RANGE( 0x0000, 0x1fff) AM_RAM // AM_BASE(m_p_ram)
- AM_RANGE( 0x2000, 0x2007) AM_WRITE(write_led) // Status LEDs+ buzzer
- AM_RANGE( 0x3000, 0x4000) AM_DEVREAD("board", mephisto_board_device, input_r)
- AM_RANGE( 0x3000, 0x3007) AM_READ(read_keys) // Rebel 5.0
- AM_RANGE( 0x5000, 0x5000) AM_WRITE(write_lcd)
- AM_RANGE( 0x6000, 0x6000) AM_DEVWRITE("board", mephisto_board_device, led_w)
- AM_RANGE( 0x7000, 0x7000) AM_DEVWRITE("board", mephisto_board_device, mux_w)
- AM_RANGE( 0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-
-ADDRESS_MAP_START(mephisto_state::mephisto_mem)
- AM_RANGE( 0x0000, 0x1fff) AM_RAM //AM_BASE(m_p_ram)
- AM_RANGE( 0x2000, 0x2000) AM_WRITE(write_lcd)
- AM_RANGE( 0x2400, 0x2407) AM_DEVWRITE("board", mephisto_board_device, led_w)
- AM_RANGE( 0x2800, 0x2800) AM_DEVWRITE("board", mephisto_board_device, mux_w)
- AM_RANGE( 0x2c00, 0x2c07) AM_READ(read_keys)
- AM_RANGE( 0x3000, 0x3000) AM_DEVREAD("board", mephisto_board_device, input_r)
- AM_RANGE( 0x3400, 0x3407) AM_WRITE(write_led) // Status LEDs+ buzzer
- AM_RANGE( 0x3800, 0x3800) AM_WRITE(mephisto_NMI) // NMI enable
- AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library
- AM_RANGE( 0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
-
-ADDRESS_MAP_START(mephisto_state::mm2_mem)
- AM_RANGE( 0x0000, 0x0fff) AM_RAM //AM_BASE(m_p_ram)
- AM_RANGE( 0x1000, 0x1007) AM_WRITE(write_led_mm2) //Status LEDs
- AM_RANGE( 0x1800, 0x1807) AM_READ(read_keys)
- AM_RANGE( 0x2000, 0x2000) AM_DEVREAD("board", mephisto_board_device, input_r)
- AM_RANGE( 0x2800, 0x2800) AM_WRITE(write_lcd)
- AM_RANGE( 0x3000, 0x3000) AM_DEVWRITE("board", mephisto_board_device, led_w)
- AM_RANGE( 0x3800, 0x3800) AM_DEVWRITE("board", mephisto_board_device, mux_w)
- AM_RANGE( 0x4000, 0x7fff) AM_ROM // Opening Library ?
- AM_RANGE( 0x8000, 0xffff) AM_ROM
-ADDRESS_MAP_END
+void mephisto_state::rebel5_mem(address_map &map)
+{
+ map(0x0000, 0x1fff).ram(); // AM_BASE(m_p_ram)
+ map(0x2000, 0x2007).w(this, FUNC(mephisto_state::write_led)); // Status LEDs+ buzzer
+ map(0x3000, 0x4000).r("board", FUNC(mephisto_board_device::input_r));
+ map(0x3000, 0x3007).r(this, FUNC(mephisto_state::read_keys)); // Rebel 5.0
+ map(0x5000, 0x5000).w(this, FUNC(mephisto_state::write_lcd));
+ map(0x6000, 0x6000).w("board", FUNC(mephisto_board_device::led_w));
+ map(0x7000, 0x7000).w("board", FUNC(mephisto_board_device::mux_w));
+ map(0x8000, 0xffff).rom();
+}
+
+
+void mephisto_state::mephisto_mem(address_map &map)
+{
+ map(0x0000, 0x1fff).ram(); //AM_BASE(m_p_ram)
+ map(0x2000, 0x2000).w(this, FUNC(mephisto_state::write_lcd));
+ map(0x2400, 0x2407).w("board", FUNC(mephisto_board_device::led_w));
+ map(0x2800, 0x2800).w("board", FUNC(mephisto_board_device::mux_w));
+ map(0x2c00, 0x2c07).r(this, FUNC(mephisto_state::read_keys));
+ map(0x3000, 0x3000).r("board", FUNC(mephisto_board_device::input_r));
+ map(0x3400, 0x3407).w(this, FUNC(mephisto_state::write_led)); // Status LEDs+ buzzer
+ map(0x3800, 0x3800).w(this, FUNC(mephisto_state::mephisto_NMI)); // NMI enable
+ map(0x4000, 0x7fff).rom(); // Opening Library
+ map(0x8000, 0xffff).rom();
+}
+
+void mephisto_state::mm2_mem(address_map &map)
+{
+ map(0x0000, 0x0fff).ram(); //AM_BASE(m_p_ram)
+ map(0x1000, 0x1007).w(this, FUNC(mephisto_state::write_led_mm2)); //Status LEDs
+ map(0x1800, 0x1807).r(this, FUNC(mephisto_state::read_keys));
+ map(0x2000, 0x2000).r("board", FUNC(mephisto_board_device::input_r));
+ map(0x2800, 0x2800).w(this, FUNC(mephisto_state::write_lcd));
+ map(0x3000, 0x3000).w("board", FUNC(mephisto_board_device::led_w));
+ map(0x3800, 0x3800).w("board", FUNC(mephisto_board_device::mux_w));
+ map(0x4000, 0x7fff).rom(); // Opening Library ?
+ map(0x8000, 0xffff).rom();
+}
INPUT_PORTS_EXTERN( chessboard );