How configure USB gamepad for POP on DOSBOX

Discuss PoP1 for DOS here.
Post Reply
Anaferon1
Scholar Scribe
Scholar Scribe
Posts: 2
Joined: January 5th, 2013, 8:24 pm

How configure USB gamepad for POP on DOSBOX

Post by Anaferon1 »

Hi.
How can I configure usb gamepad for POP on DOSBOX, I want set a jump for keypad "1" not on analogstick or keypads UP+LEFT or UP+Right, I want that It be like at NES - A - JUMP, B - slow run.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: How configure USB gamepad for POP on DOSBOX

Post by Norbert »

Anaferon1 wrote:usb gamepad [...] A - JUMP, B - slow run.
I don't have a gamepad myself, but maybe I can give you some pointers.

Based on what you're writing, it seems your gamepad works okay, you just want the A and B buttons to fire certain keys or key combinations.

If the gamepad is not properly working, read the following, else skip this.
- - - - -
As you know, Ctrl+j enters joystick mode in Prince of Persia, which is what you need for the gamepad.
If the gamepad isn't working properly, try one or more of the following:
- Recalibrate the gamepad under Windows, after plugging it in again.
- Run INT19.COM before starting Prince of Persia.
- Check the DOSBox settings under [joystick]. Make sure timed=false and set joysticktype=2axis (or 4axis).
- - - - -

DOSBox has a key mapper, that you can start with:
- DOSBOX.EXE -startmapper
- Or start DOSBox and then press Ctrl+F1.
Delete the existing mappings on the joystick buttons, then reassign them as needed.

Also, you could try this shareware program, which will convert joystick input to keyboard input.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: How configure USB gamepad for POP on DOSBOX

Post by Norbert »

Norbert wrote:[...], then reassign them as needed.
If you don't really understand what to do, even after reading the mapper page that I linked to...

When I want to change the key mapping myself, I usually edit the mapper-0.74.map file by hand.
I will give you an example below.

Example:
- - - - -
For instance, to start recording I want to use Ctrl+Tab.
In the .map file, it says:

key_tab "key 9"
mod_1 "key 306" "key 305"
key_lctrl "key 306"
key_rctrl "key 305"

This means that Tab is "key 9" and Ctrl is mod1.
So, if I change hand_video to "key 9 mod1", I can record videos with Ctrl+Tab.
- - - - -

You can do the same thing with Shift, since you want to use that keyboard key to make small steps with your gamepad controller.
key_lshift "key 304"
key_rshift "key 303"
This means, for example, that setting jbutton_0_4 to "key 304" will result in Shift being used when you press that particular joystick button.
Just try various keys for the jbuttons and test the buttons inside Prince of Persia.
Anaferon1
Scholar Scribe
Scholar Scribe
Posts: 2
Joined: January 5th, 2013, 8:24 pm

Re: How configure USB gamepad for POP on DOSBOX

Post by Anaferon1 »

Thanks for help. :)
Post Reply