Small comment on this - I got this working on RetroPie v4.7.1 (Nov 20211)
Took a little bit of fiddling about.
Thanks a lot @tmop69 I've just replaced the retropie ti99sim binary with your compiled version (and added -orig to the original file to back it up,)
At first when I ran a game, it took me back to emulation station menu. I checked the error log and it said 'permission denied'. So in WinSCP I looked at the permissions given to the original ti99sim-sdl file, and updated it to the the same permissions as the original file, and now it works!
Now using a basic cheap SNES controller I can do everything, no keyboard required!!
Left shoulder - quit back to Emulation Station to select another game
West button - launch a game
North button - fire lasers (in Parsec)