Changed Lunar Lander thrust control to a pedal. This more accurately emulates the control.

Note: the current code uses IPT_PADDLE.  This causes the game to start with the thrust at 50%.  This is not correct.  The control is really a hand operated pedal.
This commit is contained in:
Derrick Renaud 2009-05-01 00:26:07 +00:00
parent b5cd272823
commit c19d6768e7

View File

@ -269,7 +269,7 @@ static ADDRESS_MAP_START( llander_map, ADDRESS_SPACE_PROGRAM, 8 )
AM_RANGE(0x2000, 0x2000) AM_READ_PORT("IN0")
AM_RANGE(0x2400, 0x2407) AM_READ(asteroid_IN1_r) /* IN1 */
AM_RANGE(0x2800, 0x2803) AM_READ(asteroid_DSW1_r) /* DSW1 */
AM_RANGE(0x2c00, 0x2c00) AM_READ_PORT("PADDLE")
AM_RANGE(0x2c00, 0x2c00) AM_READ_PORT("THRUST")
AM_RANGE(0x3000, 0x3000) AM_WRITE(avgdvg_go_w)
AM_RANGE(0x3200, 0x3200) AM_WRITE(llander_led_w)
AM_RANGE(0x3400, 0x3400) AM_WRITE(watchdog_reset_w)
@ -547,8 +547,10 @@ static INPUT_PORTS_START( llander )
/* The way the DAC/counter circuit always trys to self center at the voltage derived from the thrust control, */
/* I don't think it ever expected to get to 0xff. We can not emulate the external DAC circuit exactly, */
/* so changing the range to 0xfe seems to solve the problem. */
PORT_START("PADDLE")
PORT_BIT( 0xff, 0x00, IPT_PADDLE ) PORT_MINMAX(0,254) PORT_SENSITIVITY(100) PORT_KEYDELTA(10) PORT_CODE_DEC(KEYCODE_UP) PORT_CODE_DEC(JOYCODE_Y_UP_SWITCH) PORT_CODE_INC(KEYCODE_DOWN) PORT_CODE_INC(JOYCODE_Y_DOWN_SWITCH) PORT_REVERSE
/* The thrust control is basically a hand operated pedal. */
/* so IPT_PEDAL is used because it more accurately emulates the control then using IPT_PADDLE */
PORT_START("THRUST")
PORT_BIT( 0xff, 0x00, IPT_PEDAL ) PORT_MINMAX(0,254) PORT_SENSITIVITY(100) PORT_KEYDELTA(10)
INPUT_PORTS_END