From 6c09bf860793ab00cd9ced5c4fbef3a292580ebe Mon Sep 17 00:00:00 2001 From: Zakk Date: Tue, 30 Aug 2022 16:17:36 -0400 Subject: [PATCH] Initial commit --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ README.md | 13 +++++++++++++ gamecontrollerdb_header.txt | 5 +++++ gamecontrollerdb_mister.txt | 8 ++++++++ 4 files changed, 59 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 README.md create mode 100644 gamecontrollerdb_header.txt create mode 100644 gamecontrollerdb_mister.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5fe1a4f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Gamecontrolledb merge +on: + push: + schedule: + - cron: '0 0 * * *' +jobs: + gcdb-assemble: + runs-on: ubuntu-latest + steps: + - name: Checkout Main + uses: actions/checkout@v2 + with: + path: main + - name: Download gamecontrollerdb.txt + run: | + curl https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt -o gamecontrollerdb_sdl.txt + - name: Merge gamecontrollerdb + run: | + cat ./main/gamecontrollerdb_header.txt > ./main/gamecontrollerdb.txt + grep "platform:Linux" gamecontrollerdb_sdl.txt >> ./main/gamecontrollerdb.txt + cat ./main/gamecontrollerdb_mister.txt >> ./main/gamecontrollerdb.txt + - name: Check in release + uses: EndBug/add-and-commit@v7 + with: + author_name: Zakk + author_email: zakk@rsdio.com + message: Automated Release + add: '["gamecontrollerdb.txt"]' + cwd: './main' + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..9c50229 --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +## Game controller database for MiSTer + +Game controller default mappings derived from https://github.com/gabomdq/SDL_GameControllerDB. + +Non-Linux platform entries are removed and some MiSTer specific entries are added. + + +### MiSTer specific extensions to gamecontrollerdb format + +- platform 'MiSTer' added. In the event of conflict the MiSTer platform takes priority over 'Linux'. +- buttons 'menuok' and 'menuesc' are mappable. If these entries do not exist in the mapping 'a' and 'b' buttons are mapped to these functions. +- Core based matching. 'mistercore:' limits the mapping entry to only the named core. Wildcards are supported. A database linecan have multiple mistercore entries. + diff --git a/gamecontrollerdb_header.txt b/gamecontrollerdb_header.txt new file mode 100644 index 0000000..7c43268 --- /dev/null +++ b/gamecontrollerdb_header.txt @@ -0,0 +1,5 @@ +# Original source: +# Game Controller DB for SDL in 2.0.16 format +# Source: https://github.com/gabomdq/SDL_GameControllerDB + +# Modified to remove non-Linux platforms and add MiSTer specific entries diff --git a/gamecontrollerdb_mister.txt b/gamecontrollerdb_mister.txt new file mode 100644 index 0000000..db71f72 --- /dev/null +++ b/gamecontrollerdb_mister.txt @@ -0,0 +1,8 @@ +# MiSTer specific default controller mappings + +#MiSTer uses a modified version of hid-playstation that exposes the microphone mute as a normal button. +#Adjust the button numbers to reflect this +030000004c050000e60c000011810000,PS5 Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b3,y:b2,platform:MiSTer, +050000004c050000e60c000000810000,PS5 Controller,a:b0,b:b1,back:b9,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b11,leftshoulder:b5,leftstick:b12,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b6,rightstick:b13,righttrigger:a5,rightx:a3,righty:a4,start:b10,x:b3,y:b2,platform:MiSTer, + +