From bc4c1ab47cf5f93121303251e63d131f8d57cfb5 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Thu, 27 Aug 2015 14:15:40 +0200 Subject: [PATCH 1/3] Linux/man page: Add documentation about evdev mappings --- shell/linux/man/reicast.1 | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/shell/linux/man/reicast.1 b/shell/linux/man/reicast.1 index 7facc81ec..1a9b91a4a 100644 --- a/shell/linux/man/reicast.1 +++ b/shell/linux/man/reicast.1 @@ -49,9 +49,22 @@ If you do not supply these files, \fBreicast\fR will fall back to reios, an expe [input] .br evdev_device_id_1 = X +.br +evdev_mapping_1 = my_mapping.cfg .LP -If the evdev input works for you, it's probably best to deaktivate the legacy joystick API input: +You can create your own mappings with the \fBreicast-joyconfig\fR tool. You should either put them into the "mappings" folder inside the reicast config directory. As an alternative, you can specify an absolute path (which has to begin with a leading slash "/"): +.IP +[input] +.br +evdev_device_id_1 = X +.br +evdev_mapping_1 = /path/to/my_mapping.cfg +.LP + +If you don't specify a mapping file, \fBreicast\fR will use one of the pre-defined mapping files (e.g. for Xbox 360 controllers). + +If the evdev input works for you, it's probably best to deactivate the legacy joystick API input: .IP [input] @@ -87,4 +100,4 @@ Head over to reicast's git repository if you want to contibute: \fIhttps://github.com/reicast/reicast-emulator\fP .TP -This is free software; you can redistribute it and/or modify it under the terms of the GNU Public License (Version 2). +This is free software; you can redistribute it and/or modify it under the terms of the GNU Public License (Version 2). \ No newline at end of file From 402e7eca704aeccb408928eca99183db36dcda11 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Thu, 27 Aug 2015 14:41:05 +0200 Subject: [PATCH 2/3] Linux: Add man page for reicast-joyconfig --- shell/linux/Makefile | 2 + shell/linux/man/reicast-joyconfig.1 | 74 +++++++++++++++++++++++++++++ shell/linux/man/reicast.1 | 5 +- 3 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 shell/linux/man/reicast-joyconfig.1 diff --git a/shell/linux/Makefile b/shell/linux/Makefile index 038593138..e3211affa 100644 --- a/shell/linux/Makefile +++ b/shell/linux/Makefile @@ -294,12 +294,14 @@ install: $(EXECUTABLE) install -m644 mappings/controller_xpad.cfg $(DESTDIR)$(PREFIX)/share/reicast/mappings install -m644 mappings/keyboard.cfg $(DESTDIR)$(PREFIX)/share/reicast/mappings install -m644 man/reicast.1 $(DESTDIR)$(MAN_DIR) + install -m644 man/reicast-joyconfig.1 $(DESTDIR)$(MAN_DIR) install -m644 reicast.desktop $(DESTDIR)$(MENUENTRY_DIR) install -m644 reicast.png $(DESTDIR)$(ICON_DIR) uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/$(EXECUTABLE) rm -f $(DESTDIR)$(MAN_DIR)/reicast.1 + rm -f $(DESTDIR)$(MAN_DIR)/reicast-joyconfig.1 clean: rm -f $(OBJECTS) $(EXECUTABLE) $(EXECUTABLE_STRIPPED) .map diff --git a/shell/linux/man/reicast-joyconfig.1 b/shell/linux/man/reicast-joyconfig.1 new file mode 100644 index 000000000..962507568 --- /dev/null +++ b/shell/linux/man/reicast-joyconfig.1 @@ -0,0 +1,74 @@ +.\" retroarch.1: + +.TH "REICAST-JOYCONFIG" "1" "August 27, 2015" "REICAST-JOYCONFIG" "reicast-joyconfig" + +.SH NAME + +reicast-joyconfig \- An editor for Reicast controller mappings. + +.SH SYNOPSIS + +\fBreicast-joyconfig\fR [-h | [-d DEVICE_ID] [-f FILE]] + +.SH "DESCRIPTION" + +\fBreicast-joyconfig\fR assists you when creating custom mappings for the \fBreicast\fR Dreamcast emulator. + +.SH "EXAMPLE COMMANDLINE" + +.TP +\fBNo command line options will give you a list of devices that you can choose from and then start the mapping assistant.\fR +reicast-joyconfig + +.TP +\fBCreate a mapping for /dev/input/event3.\fR +reicast-joyconfig -d 3 + +.TP +\fBCreate a mapping for /dev/input/event3 and save the mapping file to ~/.reicast/mappings/my_mapping.cfg.\fR +reicast-joyconfig -d 3 -f ~/.reicast/mappings/my_mapping.cfg + +.SH "GENERAL OPTIONS" + +.TP +\fB-h\fR, \fB--help\fR +Show a short help text. + +.TP +\fB-d DEVICE_ID\fR, \fB--device-id DEVICE_ID\fR +Create a mapping for a specific device. The device ID is the number X from /dev/input/eventX. + +\fB-f FILE\fR, \fB--file FILE\fR +Save the created mapping to a file. By default, the mapping will be printed to the standard output. + +.SH "KNOWN ISSUES" + +If you're using a wireless controller, please make sure it is on before creating a mapping. Some controllers emit "Button Pressed/Released" signals when turning them on, which may lead to wrongly mapped keys. + +.SH "PYTHON VERSION" + +.TP +\fBreicast-joyconfig\fR is written in Python and needs the evdev module to work: +\fIhttps://pypi.python.org/pypi/evdev\fP + +.TP +Distributions like Ubuntu have the evdev module as a package in their repositories - in these cases you should use your package manager instead of pip to install it. + +.TP +Although \fBreicast-joyconfig\fR does support both Python 2.6 or higher and 3.0 or higher, you need to run \fBreicast-joyconfig\fR with the same Python version that you installed the evdev module for, i.e. if you installed the evdev module for Python 2, you also need to run \fBreicast-joyconfig\fR using Python 2 and vice-versa. + +.SH "AUTHOR" + +.TP +\fBreicast\fR is developed by a number of people. A list of contributors can be obtained at: +\fIhttps://github.com/reicast/reicast-emulator/graphs/contributors\fP + +.TP +Head over to reicast's git repository if you want to contibute: +\fIhttps://github.com/reicast/reicast-emulator\fP + +.TP +This is free software; you can redistribute it and/or modify it under the terms of the GNU Public License (Version 2). + +.SH "SEE ALSO" +\fBreicast\fR(1) \ No newline at end of file diff --git a/shell/linux/man/reicast.1 b/shell/linux/man/reicast.1 index 1a9b91a4a..e8b565752 100644 --- a/shell/linux/man/reicast.1 +++ b/shell/linux/man/reicast.1 @@ -100,4 +100,7 @@ Head over to reicast's git repository if you want to contibute: \fIhttps://github.com/reicast/reicast-emulator\fP .TP -This is free software; you can redistribute it and/or modify it under the terms of the GNU Public License (Version 2). \ No newline at end of file +This is free software; you can redistribute it and/or modify it under the terms of the GNU Public License (Version 2). + +.SH "SEE ALSO" +\fBreicast-joyconfig\fR(1) \ No newline at end of file From 60d4ee19ea356ea5a48b570357b63d8879d93892 Mon Sep 17 00:00:00 2001 From: Jan Holthuis Date: Thu, 27 Aug 2015 14:44:31 +0200 Subject: [PATCH 3/3] Linux/Makefile: Add missing commands to 'uninstall' target --- shell/linux/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/shell/linux/Makefile b/shell/linux/Makefile index e3211affa..1d02e2e0b 100644 --- a/shell/linux/Makefile +++ b/shell/linux/Makefile @@ -300,8 +300,17 @@ install: $(EXECUTABLE) uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/$(EXECUTABLE) + rm -f $(DESTDIR)$(PREFIX)/bin/reicast-joyconfig + rm -f $(DESTDIR)$(PREFIX)/share/reicast/mappings/controller_gcwz.cfg + rm -f $(DESTDIR)$(PREFIX)/share/reicast/mappings/controller_generic.cfg + rm -f $(DESTDIR)$(PREFIX)/share/reicast/mappings/controller_pandora.cfg + rm -f $(DESTDIR)$(PREFIX)/share/reicast/mappings/controller_xboxdrv.cfg + rm -f $(DESTDIR)$(PREFIX)/share/reicast/mappings/controller_xpad.cfg + rm -f $(DESTDIR)$(PREFIX)/share/reicast/mappings/keyboard.cfg rm -f $(DESTDIR)$(MAN_DIR)/reicast.1 rm -f $(DESTDIR)$(MAN_DIR)/reicast-joyconfig.1 + rm -f $(DESTDIR)$(MENUENTRY_DIR)/reicast.desktop + rm -f $(DESTDIR)$(ICON_DIR)/reicast.png clean: rm -f $(OBJECTS) $(EXECUTABLE) $(EXECUTABLE_STRIPPED) .map