mirror of
https://github.com/holub/mame
synced 2025-05-29 00:53:09 +03:00
PORT_ADJUSTER for sound volume
This commit is contained in:
parent
f705b623e5
commit
3ad8bce7a6
@ -168,8 +168,12 @@ WRITE32_MEMBER(superchs_state::superchs_input_w)
|
||||
|
||||
READ32_MEMBER(superchs_state::superchs_stick_r)
|
||||
{
|
||||
/* Todo: Verify brake - and figure out other input */
|
||||
return (ioport("WHEEL")->read() << 24) | (ioport("ACCEL")->read() << 16) | (ioport("SOUND")->read() << 8) | ioport("UNKNOWN")->read();
|
||||
UINT8 b0 = ioport("UNKNOWN")->read();
|
||||
UINT8 b1 = ((ioport("SOUND")->read() * 255) / 100) ^ 0xff; // 00 = full, ff = silent
|
||||
UINT8 b2 = ioport("ACCEL")->read() ^ 0xff;
|
||||
UINT8 b3 = ioport("WHEEL")->read();
|
||||
|
||||
return b3 << 24 | b2 << 16 | b1 << 8 | b0;
|
||||
}
|
||||
|
||||
WRITE32_MEMBER(superchs_state::superchs_stick_w)
|
||||
@ -247,17 +251,18 @@ static INPUT_PORTS_START( superchs )
|
||||
PORT_BIT( 0x40000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
PORT_BIT( 0x80000000, IP_ACTIVE_LOW, IPT_UNKNOWN )
|
||||
|
||||
PORT_START("WHEEL") /* steering wheel */
|
||||
// 4 analog ports
|
||||
PORT_START("WHEEL")
|
||||
PORT_BIT( 0xff, 0x80, IPT_PADDLE ) PORT_SENSITIVITY(100) PORT_KEYDELTA(4) PORT_REVERSE PORT_NAME("Steering Wheel")
|
||||
|
||||
PORT_START("ACCEL") /* accel */
|
||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(30) PORT_REVERSE PORT_NAME("Gas Pedal")
|
||||
PORT_START("ACCEL")
|
||||
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_SENSITIVITY(100) PORT_KEYDELTA(15) PORT_NAME("Gas Pedal") /* in upright cab, it is a digital (1 bit) switch instead */
|
||||
|
||||
PORT_START("SOUND") /* sound volume */
|
||||
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_X ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_REVERSE PORT_PLAYER(2)
|
||||
PORT_START("SOUND")
|
||||
PORT_ADJUSTER( 75, "PCB - Sound Volume" )
|
||||
|
||||
PORT_START("UNKNOWN") /* unknown */
|
||||
PORT_BIT( 0xff, 0x00, IPT_AD_STICK_Y ) PORT_SENSITIVITY(20) PORT_KEYDELTA(10) PORT_PLAYER(2)
|
||||
PORT_START("UNKNOWN") // unused?
|
||||
PORT_BIT( 0xff, IP_ACTIVE_HIGH, IPT_UNKNOWN )
|
||||
INPUT_PORTS_END
|
||||
|
||||
/***********************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user