First post, by PicoFemto
Good day,
Background
I'm attempting to play my (purchased) copy of Blood (1997, Monolith) on DosBox (on my Raspberry Pi 3b+, aka RPI3b+, running RetroPie). I am able to launch the game, get audio working, etc. Graphics are limited to 320x240 (VESA modes are slow, not sure if it can be run on a RPI due to limited computing power). My main problem is getting a gamepad working, using "joymap" (i.e. emulate a gamepad to behave as if it were a mouse).
I'm attempting to use my Logitech F310 gamepad (which is very similar to the Playstation style controllers with dual analog thumb sticks). I've used the following tutorials to get to where I currently am:
- "DosBox - PC", <https://github.com/retropie/retropie-setup/wiki/PC#tutorials>, accessed 2019-12-02.
- "Mapping a Game Controller in Kodi - PetRockBlock", <https://blog.petrockblock.com/forums/topic/ma … di/#post-106586>, accessed 2019-12-02.
- "DosBox; Mapping mouse to PS3 Analog Stick", <https://retropie.org.uk/forum/topic/2032/dosb … s3-analog-stick>, accessed 2019-12-02.
- "F310 Gamepad - Logitech", <https://www.logitechg.com/en-ca/products/game … 10-gamepad.html>, accessed 2019-12-02.
What I've done, is configure Blood to use "Keyboard + Mouse" controls via the "SETUP.EXE" tool that is bundled with it. For example, the WASD keys are mapped to movement/strafing, and the mouse is configured for turning/aiming. I also use the following launcher script to invoke "joymap" and DosBox to launch my game.
/home/pi/RetroPie/roms/pc/blood.sh
#!/bin/bash
LOADMAP="/home/pi/joy/loadmap"
KEYMAP="/home/pi/RetroPie/roms/pc/blood/blood_keys.map"
DOSBOX="/opt/retropie/emulators/dosbox/bin/dosbox"
PC_ROMS="/home/pi/RetroPie/roms/pc"
sudo "${LOADMAP}" "${KEYMAP}" &
"${DOSBOX}" -c "mount c ${PC_ROMS}" -c "c:" -c "cd BLOOD" -c "SETUP.EXE" -c "exit"
sudo killall loadmap
sleep 1
Additionally, by careful inspection using the jscal and jstest tools via the command-line, I generated the following joymap configuration file.
/home/pi/RetroPie/roms/pc/blood/blood_keys.map
# General Mouse Mapping for DOSBox for Blood (1997), Monolith.
################################################################################
# Movement.
################################################################################
# Walk forward/backward.
# "w" ==> Logitech F310 "Left-analog-stick up"
# "s" ==> Logitech F310 "Left-analog-stick down"
axis vendor=0x046d product=0xc21d src=1 target=kbd minus="w" plus="s"
# Strafe left/right.
# "a" ==> Logitech F310 "Left-analog-stick left"
# "d" ==> Logitech F310 "Left-analog-stick right"
axis vendor=0x046d product=0xc21d src=0 target=kbd minus="a" plus="d"
# Rotate left/right.
axis vendor=0x046d product=0xc21d src=3 target=mouse axis=1 deadzone=1000
# Look up/down (must use "toggle mouse aim" toggle button at least once!).
axis vendor=0x046d product=0xc21d src=4 target=mouse axis=0 deadzone=1000
# Run.
# "t" ==> Logitech F310 "Left-shoulder"
axis vendor=0x046d product=0xc21d src=2 target=kbd plus="t"
# Jump.
# "k" ==> Logitech F310 "A"
button vendor=0x046d product=0xc21d src=0 target=kbd button="k"
# Crouch.
# "h" ==> Logitech F310 "Left-analog-button"
button vendor=0x046d product=0xc21d src=9 target=kbd button="h"
################################################################################
# Action buttons.
################################################################################
# Use item.
# "p" ==> Logitech F310 "Right-shoulder"
axis vendor=0x046d product=0xc21d src=5 target=kbd plus="p"
# Open door (action).
# "j" ==> Logitech F310 "X"
button vendor=0x046d product=0xc21d src=2 target=kbd button="j"
# Toggle mouse/right-analog-stick aiming (always do this once).
# "l" ==> Logitech F310 "Right-analog-button"
button vendor=0x046d product=0xc21d src=10 target=kbd button="l"
# Previous weapon.
# "u" ==> Logitech F310 "Y"
button vendor=0x046d product=0xc21d src=3 target=kbd button="u"
# Next weapon.
# "i" ==> Logitech F310 "B"
button vendor=0x046d product=0xc21d src=1 target=kbd button="i"
# Previous item.
# "," ==> Logitech F310 "Select"
button vendor=0x046d product=0xc21d src=6 target=kbd button=","
# Next item.
# "." ==> Logitech F310 "Start"
button vendor=0x046d product=0xc21d src=7 target=kbd button="."
# Fire weapon.
# "o" ==> Logitech F310 "Right trigger"
button vendor=0x046d product=0xc21d src=5 target=kbd button="o"
# Alt-fire weapon.
# "y" ==> Logitech F310 "Left trigger"
button vendor=0x046d product=0xc21d src=4 target=kbd button="y"
Problem/Question
- If I click the left mouse button, the thumb sticks (left for movement, right for aiming), begin to work, but they are constantly spinning in circles. I tried setting "deadzone" to 100, 1000, etc.; but can't get the thumb sticks to be usable (in a meaningful sense). How do I fine-tune the analog sticks?
- None of the "button" entries work. I've configured the game to expect, the "w", "a", "s", "d"; buttons to correspond to movement. However, none of my button inputs work at all. I could, hypothetically, use the DosBox mapper (i.e. via CTRL+F1) to configure these keys, but I'd prefer to use a single tool to remap all the game pad's digital/analog controls rather than adding more levels of complexity to my setup. How do I get my button mappings working?
If I can figure this out, I'll gladly post an in-depth tutorial (with pictures) in the future.
Thank you in advance for your time and assistance.