I have a X68000 setup at my work desk which I only use for games, and I found it annoying to have to reach for the keyboard every time I wanted to launch a game through LHES.
My initial thinking was that I could create a custom game launcher which supported controllers, or modify LHES to have support for them. After thinking about it a bit, I realized that a better option would be making a utility for mapping joypad inputs as keyboard inputs.
I wasn’t initially sure if this was possible, but after some experimentation, this turned out really well!
It’s now available on github as x68k-joykey.
As an example, to use LHES as a launcher with the standard SCSI image that people are using (with !Start.bat scripts for launching games), you can run:
JOYKEY ENABLE -P1 -U=UP -D=DOWN -L=BS -R=CR -B=Q -P2 -C -A=OPT1 -B=ESC
LHES
JOYKEY DISABLE
IF EXIST !Start.bat !Start.bat
Player 1 controller is used for navigating into games (Double tap B to quit LHES and run !Start.bat). Player 2 controller is used to swap between HDD drives.
No changes are needed to AUTOEXEC.BAT/CONFIG.SYS. Just run the util to remap things.
Only tested with LHES, SWITCH and ED so far, but should work for a lot of stuff.
Note that since this relies on hooking things up to the VBLANK interrupt, apps/games which require ownership of this will NOT work.