diff options
author | hap <happppp@users.noreply.github.com> | 2017-06-26 17:35:54 +0200 |
---|---|---|
committer | hap <happppp@users.noreply.github.com> | 2017-06-26 17:36:22 +0200 |
commit | cfafb707cc9c9630626d3591ebef81030f9a0c46 (patch) | |
tree | 2e252258bd15a13d8718c1c639f279905d4d8800 | |
parent | c87fb7a18df21439446579917b4753810dd27b61 (diff) |
hh_sm510: added cheatmode for MC25 (nw)
-rw-r--r-- | src/devices/cpu/sm510/sm500.h | 2 | ||||
-rw-r--r-- | src/mame/drivers/hh_sm510.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/devices/cpu/sm510/sm500.h b/src/devices/cpu/sm510/sm500.h index 727b789bbe3..a7b9b336220 100644 --- a/src/devices/cpu/sm510/sm500.h +++ b/src/devices/cpu/sm510/sm500.h @@ -111,7 +111,7 @@ protected: void shift_w(); u8 get_digit(); - void set_su(u8 su) { m_stack[0] = (m_stack[0] & ~0x3c0) | (su << 6); } + void set_su(u8 su) { m_stack[0] = (m_stack[0] & ~0x3c0) | (su << 6 & 0x3c0); } u8 get_su() { return m_stack[0] >> 6 & 0xf; } virtual int get_trs_field() { return 0; } diff --git a/src/mame/drivers/hh_sm510.cpp b/src/mame/drivers/hh_sm510.cpp index 6997f04e7e3..c264e056686 100644 --- a/src/mame/drivers/hh_sm510.cpp +++ b/src/mame/drivers/hh_sm510.cpp @@ -643,6 +643,11 @@ static INPUT_PORTS_START( mc25 ) PORT_START("ACL") PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_SERVICE1 ) PORT_CHANGED_MEMBER(DEVICE_SELF, hh_sm510_state, acl_button, nullptr) PORT_NAME("ACL") + + PORT_START("BA") // MCU BA(alpha) pin pulled to GND, only works after power-on + PORT_CONFNAME( 0x01, 0x01, "Infinite Lives (Cheat)") + PORT_CONFSETTING( 0x01, DEF_STR( Off ) ) + PORT_CONFSETTING( 0x00, DEF_STR( On ) ) INPUT_PORTS_END static MACHINE_CONFIG_START( mc25 ) @@ -652,6 +657,7 @@ static MACHINE_CONFIG_START( mc25 ) MCFG_SM500_WRITE_O_CB(WRITE8(hh_sm510_state, sm500_lcd_segment_w)) MCFG_SM510_READ_K_CB(READ8(hh_sm510_state, input_r)) MCFG_SM510_WRITE_R_CB(WRITE8(hh_sm510_state, piezo_input_w)) + MCFG_SM510_READ_BA_CB(IOPORT("BA")) /* video hardware */ MCFG_SCREEN_SVG_ADD("screen", "svg") |