From 3e36a2c27076e380041e179b2d4230950e53bf36 Mon Sep 17 00:00:00 2001 From: Sandro Ronco Date: Sat, 26 Aug 2017 18:37:49 +0200 Subject: mephisto.cpp: hooked up mmboard device. (nw) --- src/mame/drivers/mephisto.cpp | 31 ++-- src/mame/layout/mephisto.lay | 339 ++++++++++++++++++++++++++++++++++++++---- 2 files changed, 326 insertions(+), 44 deletions(-) diff --git a/src/mame/drivers/mephisto.cpp b/src/mame/drivers/mephisto.cpp index 0649fd98a7a..721c8422d05 100644 --- a/src/mame/drivers/mephisto.cpp +++ b/src/mame/drivers/mephisto.cpp @@ -64,9 +64,11 @@ Mephisto 4 Turbo Kit 18mhz - (mm4tk) #include "emu.h" #include "cpu/m6502/m65c02.h" +#include "machine/mmboard.h" #include "sound/beep.h" #include "speaker.h" -//#include "mephisto.lh" + +#include "mephisto.lh" class mephisto_state : public driver_device { @@ -216,10 +218,10 @@ static ADDRESS_MAP_START( rebel5_mem, AS_PROGRAM, 8, mephisto_state ) 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, 0x3007) AM_READ(read_keys) // Rebel 5.0 - //AM_RANGE( 0x3000, 0x4000) AM_READ(mboard_read_board_8) // Chessboard + AM_RANGE( 0x3000, 0x4000) AM_DEVREAD("board", mephisto_board_device, input_r) AM_RANGE( 0x5000, 0x5000) AM_WRITE(write_lcd) - //AM_RANGE( 0x6000, 0x6000) AM_WRITE(mboard_write_LED_8) // Chessboard - //AM_RANGE( 0x7000, 0x7000) AM_WRITE(mboard_write_board_8) // Chessboard + 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 @@ -227,10 +229,10 @@ ADDRESS_MAP_END static ADDRESS_MAP_START( mephisto_mem, AS_PROGRAM, 8, mephisto_state ) AM_RANGE( 0x0000, 0x1fff) AM_RAM //AM_BASE(m_p_ram) AM_RANGE( 0x2000, 0x2000) AM_WRITE(write_lcd) - //AM_RANGE( 0x2400, 0x2407) AM_WRITE(mboard_write_LED_8) // Chessboard - //AM_RANGE( 0x2800, 0x2800) AM_WRITE(mboard_write_board_8) // Chessboard + 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_READ(mboard_read_board_8) // Chessboard + 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 @@ -241,10 +243,10 @@ static ADDRESS_MAP_START( mm2_mem, AS_PROGRAM, 8, mephisto_state ) 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_READ(mboard_read_board_8) //Chessboard + 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_WRITE(mboard_write_LED_8) //Chessboard - //AM_RANGE( 0x3800, 0x3800) AM_WRITE(mboard_write_board_8) //Chessboard + 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 @@ -316,15 +318,12 @@ void mephisto_state::machine_start() { m_lcd_shift_counter = 3; m_allowNMI = 1; - //mboard_savestate_register(); } MACHINE_START_MEMBER(mephisto_state,mm2) { m_lcd_shift_counter = 3; m_led7=0xff; - - //mboard_savestate_register(); } @@ -332,8 +331,6 @@ void mephisto_state::machine_reset() { m_lcd_shift_counter = 3; m_allowNMI = 1; - //mboard_set_border_pieces(); - //mboard_set_board(); /* adjust artwork depending on current emulation*/ @@ -366,7 +363,9 @@ static MACHINE_CONFIG_START( mephisto ) MCFG_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) MCFG_TIMER_DRIVER_ADD_PERIODIC("nmi_timer", mephisto_state, update_nmi, attotime::from_hz(600)) - //MCFG_TIMER_DRIVER_ADD_PERIODIC("artwork_timer", mephisto_state, mboard_update_artwork, attotime::from_hz(100)) + + MCFG_MEPHISTO_SENSORS_BOARD_ADD("board") + MCFG_DEFAULT_LAYOUT(layout_mephisto) MACHINE_CONFIG_END static MACHINE_CONFIG_DERIVED( rebel5, mephisto ) diff --git a/src/mame/layout/mephisto.lay b/src/mame/layout/mephisto.lay index ec5cf8c480a..1d128109809 100644 --- a/src/mame/layout/mephisto.lay +++ b/src/mame/layout/mephisto.lay @@ -1,62 +1,345 @@ + - - - - + + + + - - - + + + + + + + + + + + + + + + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3