Menu

Tree [078425] master /
 History

HTTPS access


File Date Author Commit
 doc 2024-01-12 Alexandre Hardy Alexandre Hardy [c8ec75] Update documents for controller instance
 man 2023-11-09 Alexandre Hardy Alexandre Hardy [15b0b0] Make skipping axes optional
 oldexamples 2009-07-20 Alexandre Hardy Alexandre Hardy [aacd49] Added sync events to each event sent.
 oldparser 2009-07-17 Alexandre Hardy Alexandre Hardy [696312] Initial creation of project
 tools 2023-04-15 Alexandre Hardy Alexandre Hardy [2eee25] Replace tabs with spaces
 COPYING 2009-07-17 Alexandre Hardy Alexandre Hardy [696312] Initial creation of project
 Makefile 2024-01-12 Alexandre Hardy Alexandre Hardy [308b61] Fix blocker code
 README 2023-11-10 Alexandre Hardy Alexandre Hardy [b11efb] Add a library to limit joystick access to only ...
 clock.h 2016-02-20 Alexandre Hardy Alexandre Hardy [4537b6] Pull in osxjoymap changes
 config.c 2023-11-09 Alexandre Hardy Alexandre Hardy [15b0b0] Make skipping axes optional
 config.h 2023-11-09 Alexandre Hardy Alexandre Hardy [15b0b0] Make skipping axes optional
 daemon.c 2023-11-10 Alexandre Hardy Alexandre Hardy [712c8e] Always write the PID file to make kill always work
 devices.c 2024-01-12 Alexandre Hardy Alexandre Hardy [308b61] Fix blocker code
 dictionary.c 2013-10-27 Alexandre Hardy Alexandre Hardy [d7565e] Remove trailing whitespace
 dictionary.h 2023-09-02 Alexandre Hardy Alexandre Hardy [7b35ed] Fix tabbing
 events.c 2024-01-12 Alexandre Hardy Alexandre Hardy [baf36d] Handle multiple controllers better
 file.c 2023-10-03 Alexandre Hardy Alexandre Hardy [6255af] Tabs to spaces
 joymap_blocker.c 2023-11-10 Alexandre Hardy Alexandre Hardy [b11efb] Add a library to limit joystick access to only ...
 keys.h 2009-07-17 Alexandre Hardy Alexandre Hardy [696312] Initial creation of project
 keys.txt 2009-07-17 Alexandre Hardy Alexandre Hardy [696312] Initial creation of project
 loadmap.c 2024-01-12 Alexandre Hardy Alexandre Hardy [baf36d] Handle multiple controllers better
 makekeys.sh 2013-10-26 Alexandre Hardy Alexandre Hardy [a15b00] Update makekeys.sh
 mapparser.c 2024-01-12 Alexandre Hardy Alexandre Hardy [078425] Fix instance with shift
 mapper.h 2024-01-12 Alexandre Hardy Alexandre Hardy [baf36d] Handle multiple controllers better
 parser.h 2024-01-12 Alexandre Hardy Alexandre Hardy [baf36d] Handle multiple controllers better
 program.h 2024-01-12 Alexandre Hardy Alexandre Hardy [baf36d] Handle multiple controllers better
 programparser.c 2023-09-22 Alexandre Hardy Alexandre Hardy [c386cc] Support loading files relative to map file, and...
 reserve_js.c 2023-11-09 Alexandre Hardy Alexandre Hardy [15b0b0] Make skipping axes optional
 validkeys.c 2013-10-26 Alexandre Hardy Alexandre Hardy [a15b00] Update makekeys.sh
 validkeys.h 2013-10-26 Alexandre Hardy Alexandre Hardy [a15b00] Update makekeys.sh
 vm.c 2016-02-20 Alexandre Hardy Alexandre Hardy [4537b6] Pull in osxjoymap changes

Read Me

1) Make sure that the module uinput is loaded,
     I have
        rmmod ehci_hcd
        rmmod ohci_hcd
        rmmod uinput
        modprobe uinput
        /sbin/reserve_js
        modprobe ehci_hcd
        modprobe ohci_hcd
    in /etc/rc.d/rc.local. This ensures that js0 through 16 are reserved
    for the program. The program /sbin/reserve_js waits 10 seconds
    before releasing js0 through 16.

2) You need permissions on /dev/uinput and /dev/input/event*
3) The uinput device can now be specified with --uinput_dev,
   and the event device prefix with --event_dev
4) Run the program loadmap with your script, it will continue running
   and provide the joystick events programmed until the program is
   terminated.
5) Joystick selection by number is broken, the vendor and product
   identifier must be used


For a UI, please have a look at https://rensg.home.xs4all.nl/rb3d/joymixerUI.html


I've been looking for alternatives to reserving js0 for joymap. This
code base now includes a library joymap_blocker.so which
is installed to /usr/local/lib64/joymap_blocker.so which can
filter out non-joymap joysticks for a program. It does this
using LD_PRELOAD.

For example, you can limit dosbox to joymap joysticks with:
    LD_PRELOAD=/usr/local/lib64/joymap_blocker.so dosbox

The blocker code uses minimal logic to try determine if the device
opened is a joystick device, and if so it will try to
enforce that only joymap devices are opened. The checks are
not absolutely foolproof, but I expect it to work well in general.