mirror of
https://github.com/holub/mame
synced 2025-06-14 16:37:00 +03:00
Improved X axis gun input in Locked N Loaded (nw)
This commit is contained in:
parent
c5d2107331
commit
7f6be704a5
@ -520,13 +520,21 @@ READ32_MEMBER(dragngun_state::service_r)
|
|||||||
return ioport("IN2")->read();
|
return ioport("IN2")->read();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: improve this, Y axis not understood at all
|
||||||
READ32_MEMBER(dragngun_state::lockload_gun_mirror_r)
|
READ32_MEMBER(dragngun_state::lockload_gun_mirror_r)
|
||||||
{
|
{
|
||||||
//logerror("%08x:Read gun %d\n",space.device().safe_pc(),offset);
|
//logerror("%08x:Read gun %d\n",space.device().safe_pc(),offset);
|
||||||
//return ((machine().rand()%0xffff)<<16) | machine().rand()%0xffff;
|
|
||||||
if (offset) /* Mirror of player 1 and player 2 fire buttons */
|
switch(offset)
|
||||||
return ioport("IN4")->read() | ((machine().rand()%0xff)<<16);
|
{
|
||||||
return ioport("IN3")->read() | ioport("LIGHT0_X")->read() | (ioport("LIGHT0_X")->read()<<16) | (ioport("LIGHT0_X")->read()<<24); //((machine().rand()%0xff)<<16);
|
case 0:
|
||||||
|
return ioport("IN3")->read() | (ioport("LIGHT0_X")->read()) | (ioport("LIGHT0_X")->read()<<11) | (ioport("LIGHT0_Y")->read()<<19);
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
return ioport("IN4")->read() | (ioport("LIGHT1_X")->read()) | (ioport("LIGHT1_X")->read()<<11) | (ioport("LIGHT1_Y")->read()<<19);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ~0;
|
||||||
}
|
}
|
||||||
|
|
||||||
READ32_MEMBER(dragngun_state::lightgun_r)
|
READ32_MEMBER(dragngun_state::lightgun_r)
|
||||||
|
Loading…
Reference in New Issue
Block a user