TI994A (ti99sim) joystick
-
i've been playing around with the TI994A emulator (https://retropie.org.uk/docs/TI-99/) and having trouble getting my joypad working within the emulator (Retropie 4.5 from Pre made SD Image on RetroPie website running on Pi Zero W inside Retroflag GPi Case).
i've seen this post about how to assign the joystick on launch but my
/opt/retropie/configs/ti99/emulators.cfg
looks different, like this:ti99sim = "pushd /opt/retropie/emulators/ti99sim; /opt/retropie/emulators/ti99sim/ti99sim-sdl -f %ROM%; popd" default = "ti99sim"
i tried changing it to this but then the emulator wouldn't launch anymore from emulationstation:
ti99sim = "pushd /opt/retropie/emulators/ti99sim; /opt/retropie/emulators/ti99sim/ti99sim-sdl --joystick=1 -f %ROM%; popd" default = "ti99sim"
any ideas what i'm doing wrong or how to get my joypad working with this emulator?
-
oops, i see per the other post that it should be:
ti99sim = "pushd /opt/retropie/emulators/ti99sim; /opt/retropie/emulators/ti99sim/ti99sim-sdl --joystick1=1 -f %ROM%; popd" default = "ti99sim"
(joystick1=1, not joystick=1)
this allows the emulator to launch but the joystick still doesn't work in the games (i tried moon patrol and shamus). could this have something to do with hat mode vs axis mode or whatever?
-
@pajordan said in TI994A (ti99sim) joystick:
this allows the emulator to launch but the joystick still doesn't work in the games (i tried moon patrol and shamus). could this have something to do with hat mode vs axis mode or whatever?
What gamepad are you using ? You've not added any info about your system.
-
sorry, i thought i added enough info - the Retroflag GPi case has a built-in gamepad that is detected as a "Microsoft X-Box 360 pad"; here's my
/opt/retropie/emulators/ti99sim/ti99sim-sdl --list-joysticks
results:
https://imgur.com/a/9UjYdry -
So no analog controls. Can you try updating the emulator from source and see if the joystick handling is changed ?
-
just finished updating from source, reran
/opt/retropie/emulators/ti99sim/ti99sim-sdl --list-joysticks
, and got the same results:
https://imgur.com/a/DezGe6v -
@pajordan said in TI994A (ti99sim) joystick:
just finished updating from source, reran /opt/retropie/emulators/ti99sim/ti99sim-sdl --list-joysticks, and got the same results:
I think that's expected. What I meant was if the joystick is working in-game or not.
-
@mitu oh i see, no, the joystick is still not working in-game. for moon patrol i can control the vehicle with keyboard arrow keys but not the d-pad; the b and a button both shoot, but that was happening before. for shamus i can move the guy around with keyboard arrow keys but that's it (don't know how to shoot).
i have a little bluetooth keyboard, which is good for getting past the opening screens and entering a few one-off commands but not good for controlling in-game.
-
I think
ti99sim
only supports analog controls for the joystick, the code looks only for JOYAXISMOTION. But it looks like the GPICase has a way to switch how the D-pad is handled (according to this):To switch to Axis mode, simply hold the LEFT D-PAD and SELECT for around five seconds until the Power LED flashes purple.
To switch back to Hat mode, hold the UP D-PAD and SELECT for around five seconds until the Power LED flashes purple.
Try switching to D-Pad to Axis mode and see if it works in-game.
-
i switched to axis mode as suggested and the joystick works in-game - thanks.
i was reading some other posts on this forum and saw something called xboxdrv - would this allow for keeping the controller in "Hat" mode and pass joystick presses as keyboard presses to the emulator (similar to what joy-to-key does)? would be neat to be able to map keyboard presses to the joystick to bypass the first TI994A screens (press any key, press 2 for game), and to map ESC to a button to exit the emulator (and eliminate the need for a keyboard). this could be useful for me with other emulators that require a keyboard and don't allow for configuring joystick presses to keys (like the lr-x1). anyway, is that what xboxdrv can be used for?
-
@pajordan Yes,
xboxdrv
can be used to re-map your gamepad and enhance the gamepad with other inputs. There's a pretty detailed guide here and various other posts in the forum with configuration.EDIT: note that
ti99sim
already emulates some keyboard inputs via the gamepad (some numbers are mapped to the buttons), but I don't think it emulatesEsc
to exit the emulator. -
it's really cool what you can do with xboxdrv. i followed portions of the guide linked by mitu (here); i jumped down to the "Key-Mapping For Individual Emulators" section. (thank you, @mitu)
(before starting this, i installed the xboxdrv via RetroPie Setup - Manage packages - driver - xboxdrv - Install from source; this takes a while to install, like over an hour.)
per the guide, i created the runcommand-onstart.sh; but i pasted the contents from this xboxdrvstart.sh script that was made with the GPi case in mind; this script is similar to the sample script in the "Expanding Launch Capabilities" section of the guide and allows for setting specific configurations by emulator and even by rom for each emulator, which is really cool. with this i'm able to control TI99/4A games mostly as i wish now.
however, i have two questions:
-
is it possible to map a joystick button for the system being emulated (i.e., not a keyboard key) to one of the gamepad buttons? it looks like Shamus for the TI99/4A was only meant to be played with a joystick, according to this manual i found, so i was hoping to map one of my GPi case buttons to the TI99/4A joystick button; hope that makes sense.
-
is it possible to map a gamepad button (not a dpad or analog stick) to the mouse for the system being emulated? i see from the guide - "Key-Mapping For Individual Emulators" section - that in the sample scummvm script, this line maps the left analog stick to the mouse:
--ui-axismap x1=REL_X:10,y1=REL_Y:10 \
i'm hoping to map just the mouse y-direction to a GPi case button (left trigger) to get the mouse pointer out of the way before playing a game. i tried with this line but it doesn't seem to do anything:
--ui-axismap lb=REL_Y:10 \
it probably doesn't make sense to map a button to a mouse pointer direction, but is it possible?
-
-
for 2. (mapping the mouse), i used the strategy from this post to map a toggle to switch functions between a keyboard mapping to the dpad and a mouse mapping when activated with this kind of line:
--ui-buttonmap du=KEY_UP,y+du=REL_Y:1:20,dd=KEY_DOWN,y+dd=REL_Y:-1:20,dl=KEY_LEFT,y+dl=REL_X:-1:20,dr=KEY_RIGHT,y+dr=REL_X:1:20 \
(so when Y+dpad are held in conjunction it moves the mouse pointer)
still unsure how to solve 1. to map the joystick fire button to a gamepad button, but search goes on.
-
just closing the loop here, for 1. i didn't figure out how to map the system's joystick fire button to a gamepad button but after some online searching apparently every TI994A game can be controlled solely by the keyboard - the fire key for Shamus is "q" after some trial and error (hold "q" and press the direction of fire). all good now!
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.