After xboxdrv mapping, controller isn't recognized by emulator
-
@mediamogul said in After xboxdrv mapping, controller isn't recognized by emulator:
Seeing as how you're key-mapping, the emulator shouldn't be looking for a controller at all, but rather the keyboard. Are you sure you have the emulator set to use the 'Keyboard Maps' for controller input?
I do not. Where would I change that setting? I tried looking it up but it's Google-proof.
-
I'm not near my Pi at the moment, but after invoking the options menu, it should be labeled something like 'Controller Input Settings'. From there, the option should be in one of the pull-down menus.
-
@mediamogul Which options menu do you mean? There's the Retroarch RGUI (which I can't open with the joystick set the way it is), the Atari 800 emulator options via F1 (I don't see an option by that name there), or do you mean a different menu like in EmulationStation?
I don't see anything that has the name "Controller input settings" anywhere that I've been looking.
-
@lummox-jr said in After xboxdrv mapping, controller isn't recognized by emulator:
In the standalone Atari800 emulator, you invoke the options menu with 'F1' and then navigate to the 'Controller Configuration' menu. From there, you'll see 'Enable Keyboard Joystick' and 'Define Layout of Keyboard Joystick'. Between those two settings you'll be able to enable and map accordingly. You'll notice that there's no input setting for the second action button, necessary for some games. For some reason this is hard-coded into the emulator to be the 'Right Shift' key for both player one and two. Using xboxdrv, you can map the 'Right Shift' key using
KEY_RIGHTSHIFT
to whatever button you like and you should be good to go. -
@mediamogul The emulator I'm using is lr-atari800. When I go to "Controller configuration" in the F1 menu, I see these options:
Joystick autofire: No Enable MultiJoy4: No Mouse device: None Mouse port: 1 Mouse speed: 3
There is no option to enable a keyboard joystick.
If I change the emulator to just plain atari800, I do see that option. However, the colors of the non-lr atari800 emulator are totally messed up, so that the default colors instead of being white on blue are very light blue on white, and the game looks all wrong.
-
@lummox-jr said in After xboxdrv mapping, controller isn't recognized by emulator:
However, the colors of the non-lr atari800 emulator are totally messed up, so that the default colors instead of being white on blue are very light blue on white, and the game looks all wrong.
Believe it or not, this is meant to better simulate how the games would actually look on original hardware. In the Options menu, you can set it to use true black and vibrant colors, which is probably the way lr-atari800 is set by default.
-
@mediamogul I'm using the
atari800
emulator too. @Lummox-JR As mediamogul says, mapping to the keys generally works better than other methods.If you can't get
lr-atari800
to work properly, inatari800's
GUI (entered with F1), go to "controller configuration" and define the joystick keys for both joysticks 1 and 2. For example, I mapped joystick 1/player 1 up/down/left/right to W, S, A and D etc. My xboxdrv configuration looks like this:Player1_atari800="sudo /opt/retropie/supplementary/xboxdrv/bin/xboxdrv >> /dev/shm/runcommand.log 2>&1 \ --silent \ --detach-kernel-driver \ --deadzone=4000 \ --deadzone-trigger 15% \ --force-feedback \ --mimic-xpad \ --trigger-as-button \ --ui-buttonmap b=void,x=void,y=void,lb=void,rb=void,tl=void,tr=void,guide=void \ --evdev /dev/input/by-path/platform-3f980000.usb-usb-0:1.3.3:1.0-event-joystick \ --device-name "Player_1" \ --evdev-absmap ABS_X=y1,ABS_Y=x1 \ --ui-axismap X1=KEY_A:KEY_D,Y1=KEY_W:KEY_S \ --evdev-keymap BTN_THUMB2=a,BTN_BASE3=back,BTN_BASE6=start,BTN_BASE2=lt,BTN_BASE5=rt \ --ui-buttonmap a=KEY_F \ --ui-buttonmap back=KEY_UNKNOWN,start=KEY_UNKNOWN,rt+back=KEY_F1,back+rt=KEY_F9,lt=KEY_F4,rt=KEY_SPACE \ --ui-buttonmap lt+rt=exec:/opt/retropie/configs/all/SoundToggle.sh"
-
@mediamogul Thank you! I finally got all this working!
The only question I have left is that if I have a .bin file that I'm loading, is there any way to tell the emulator what cartridge type is being loaded so I don't have to manually select that (with the keyboard) each time? (Also, is there a way to choose to load BASIC with certain images? There were lots of BASIC games I used to play from Compute! magazine.)
-
@lummox-jr said in After xboxdrv mapping, controller isn't recognized by emulator:
is there any way to tell the emulator what cartridge type is being loaded so I don't have to manually select that (with the keyboard) each time? (Also, is there a way to choose to load BASIC with certain images? There were lots of BASIC games I used to play from Compute! magazine.)
Both can be accomplished by first selecting the right cartridge type or to load with BASICand then save the ROM out through the options menu using the cartridge management menu. I would recommend saving them to a separate location, rather than saving over the existing files, then archive the originals and finally move the newly saved ROMs into place.Edit: Come to think of it, I don't believe you can specify BASIC this way, but cartridge types will definitely work.
-
@mediamogul I found a solution to running BASIC games (these being in .atr files created by basic2boot). This is what the relevant part of my
runcommand-onstart.sh
file looks like now:# In the case statement atari800) eval $xboxkill joycommand="$retropad $atari800 &" eval $joycommand basicregex='basic\.atr$' if [[ $rom =~ $basicregex ]]; then newcmd=`echo $4 | sed 's/\(atari800 \)/\1-basic -xl /'` echo >>/dev/shm/runcommand.log "Execute: $newcmd" # Launch the game with altered params eval >>/dev/shm/runcommand.log $newcmd eval $xboxkill # Kill the calling script so it doesn't launch the game kill $(ps ex | grep runcommand.sh | grep bash | awk '{print $1}') fi ;;
I thought that might be pretty useful for others looking to run BASIC games when the emulator is configured to leave BASIC off by default. In my case it was Gold Rush from the Compute! magazine. The filename is "goldrush -basic.atr". I haven't figured out yet how to get the i flag into the regex I'm using in the if statement (this is largely cobbled together via a lot of Google fu and trial and error) but I'm otherwise happy with it.
-
Darn it, I'm trying to edit my post but the stupid spam filter isn't letting me.
-
It should let you edit it now that some time has passed. If not, I'll delete it and you can post your revision below. In any event, thanks for posting your solution. I don't currently have any games in mind that this would apply to, but I'm sure I'll run across some eventually and I'll give this a shot.
-
Six years later, I’m on 4.8.8 on a Pi 5 and I too cannot get the standalone emulator to work with my controller (8BitDo Pro 2). Have followed all the steps, but nothing.
Well, almost nothing…
If I start emulationstation under tmux directly on the Pi, then log into the same tmux session via SSH on my laptop, I can see the remapped button values (‘4’ when I D-Pad left, ‘6’ when right, etc.) which possibly means xboxdrv is being loaded correctly, the remapping is working but atari800 cannot ‘see’ this.
I’m connecting by Bluetooth and xboxdrv assigns a different event handler to that it initially connects on. The guide is unclear on having to remap the controller once it is being handled by xboxdrv. I had to quit out of ES with F4, then run the xboxdrv command in the background, restart ES and remap. Is thia how it should be done? I’m not starting xboxdrv through rc.local as a) Bluetooth and b) I only want to use this method for this emulator, particularly to remap number keys for games like Miner 2049er.
-
-
@cheesymonkey please don't bump ancient topics.
For your controller model, you should install the
xpadneo
driver and then (re-)map the controller in EmulationStation, you don't needxboxdrv
unless nowadays unless you're trying to set-up some special mapping (i.e. emulate 4way joysticks, keys pressed on button combo, modify the deadzone, etc.)If you still have issues after installing
xpadneo
with the gamepad, please open a separate topic. -
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.