diff options
author | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2012-10-10 16:05:05 +0000 |
---|---|---|
committer | Michaël Banaan Ananas <happppp@users.noreply.github.com> | 2012-10-10 16:05:05 +0000 |
commit | 3e33bb3e7bf769e9bfb804dc12de759b5b904fae (patch) | |
tree | cfb70cbbeda60bf4f7eca70a219d1e2e027d8bb4 /src/mame/drivers/system1.c | |
parent | 9d1aaf97ae5a4d5b2272f064fe6b6fe7df9dbf88 (diff) |
fix shtngmst gun position
Diffstat (limited to 'src/mame/drivers/system1.c')
-rw-r--r-- | src/mame/drivers/system1.c | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/src/mame/drivers/system1.c b/src/mame/drivers/system1.c index d704a4246a4..6e6c410da94 100644 --- a/src/mame/drivers/system1.c +++ b/src/mame/drivers/system1.c @@ -465,6 +465,21 @@ static void dakkochn_custom_w(running_machine &machine, UINT8 data, UINT8 prevda /************************************* * + * Shooting Master gun input + * + *************************************/ + +READ8_MEMBER(system1_state::shtngmst_gunx_r) +{ + // x is slightly offset, and has a range of 00-fe + UINT8 x = ioport("GUNX")->read() - 0x12; + return (x == 0xff) ? 0xfe : x; +} + + + +/************************************* + * * Sound I/O * *************************************/ @@ -669,12 +684,10 @@ READ8_MEMBER(system1_state::nob_mcu_status_r) /************************************* * - * Generic port definitions + * nob bootleg protection * *************************************/ -// nobb - these ports are used for some kind of replacement protection system used by the bootleg - READ8_MEMBER(system1_state::nobb_inport1c_r) { // logerror("IN $1c : pc = %04x - data = 0x80\n",space.device().safe_pc()); @@ -1747,10 +1760,10 @@ static INPUT_PORTS_START( shtngmst ) PORT_DIPSETTING( 0x00, DEF_STR( On ) ) PORT_START("GUNX") /* 1c */ - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) + PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_X ) PORT_CROSSHAIR(X, 1.0, 0.0, 0) PORT_SENSITIVITY(48) PORT_KEYDELTA(8) PORT_START("GUNY") /* 1d */ - PORT_BIT( 0xff, 0x80, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_SENSITIVITY(25) PORT_KEYDELTA(15) PORT_PLAYER(1) PORT_REVERSE + PORT_BIT( 0xff, 0x90, IPT_LIGHTGUN_Y ) PORT_CROSSHAIR(Y, -1.0, 0.0, 0) PORT_MINMAX(0x20, 0xff) PORT_SENSITIVITY(64) PORT_KEYDELTA(8) PORT_REVERSE PORT_START("18") /* 18 */ /* what is this? check the game code... */ @@ -4782,7 +4795,7 @@ DRIVER_INIT_MEMBER(system1_state,shtngmst) address_space &iospace = machine().device("maincpu")->memory().space(AS_IO); iospace.install_read_port(0x12, 0x12, 0x00, 0x00, "TRIGGER"); iospace.install_read_port(0x18, 0x18, 0x00, 0x03, "18"); - iospace.install_read_port(0x1c, 0x1c, 0x00, 0x02, "GUNX"); + iospace.install_read_handler(0x1c, 0x1c, 0x00, 0x02, read8_delegate(FUNC(system1_state::shtngmst_gunx_r),this)); iospace.install_read_port(0x1d, 0x1d, 0x00, 0x02, "GUNY"); DRIVER_INIT_CALL(bank0c); } |