Remapping joystick to keyboard events and integrating into newbie-friendly launch script

Por parallax

Expert (85)

imagem de parallax

07-03-2021, 12:32

Dear all,

My goal was to have some sort of openMSX launch script, possibly even include in the distribution of a game, that originally would work with a two player mode and depended on a joystick, to work only with a keyboard.

I had a look at e.g. https://openmsx.org/manual/commands.html#bind but seems that this is a rabbit hole of looking up keymatrix things and how to automate the settings upon launch. I could probably spend some hours on chasing this up and making a nice wrapper script, but I somehow feel others will have done this already and I'm just duplicating work.

Concretely, I was trying this for Blade Lords, because I think it's still sort of fun with two players for a quick game. If I could find the sources it might even make sense to hack it directly into the game, but this is unlikely. Currently, the lack of hardware sort of stops people from enjoying the two player mode.

I was thinking of a setup like having player two on ASWD and shift, player one on space + arrow keys as usual? Notably, Blade Lords has can work with a single button stick mode and a dual button stick mode, so it should work with just five keys.

Does anyone have such a script lying around, and importantly, how could one make using this easiest for users that are not familiar with openMSX?

Entrar ou registrar-se para comentar

Por Manuel

Ascended (19691)

imagem de Manuel

07-03-2021, 14:26

Have you seen that you can plug in a keyjoystick in a joystick port?

Por Manuel

Ascended (19691)

imagem de Manuel

07-03-2021, 21:28

Por parallax

Expert (85)

imagem de parallax

08-03-2021, 11:10

Thanks for the pointers! Is there any way to "package" this for new users?

Por Manuel

Ascended (19691)

imagem de Manuel

21-03-2021, 22:49

Wow, missed this post, sorry about that. With the 'packaging' you mean, put it in a launch script? Of course, you can put the commands in a text file and pass it to openMSX with the -script command line option. (Or use the -command option and put the commands in there.)