Skip to content

Broker MQTT responsável por executar comandos enviados por remote-pad

License

Notifications You must be signed in to change notification settings

comsolid/remote-pad-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Remote Pad Server

MQTT Broker responsible to execute commands sent by remote-pad.

The idea is receive data from a mobile simulating for example a Steering wheel for a race game (SNES Top Gear or Nintendo 64 Mario Kart), and act as if the keyboard is sending commands to the emulator.

Getting Started

Getting Started

You can install Remote Pad GUI to start a desktop app.

Development

Install dependencies

npm install # or yarn

Add user credentials

./node_modules/.bin/mosca adduser alice alice \
    --credentials ./credentials.json \
    --authorize-publish '*/alice' \
    --authorize-subscribe '*/alice'

./node_modules/.bin/mosca adduser bob bob \
    --credentials ./credentials.json \
    --authorize-publish '*/bob' \
    --authorize-subscribe '*/bob'

./node_modules/.bin/mosca adduser carol carol \
    --credentials ./credentials.json \
    --authorize-publish '*/carol' \
    --authorize-subscribe '*/carol'

./node_modules/.bin/mosca adduser david david \
    --credentials ./credentials.json \
    --authorize-publish '*/david' \
    --authorize-subscribe '*/david'

./node_modules/.bin/mosca adduser gui gui \
    --credentials ./credentials.json \
    --authorize-publish 'gui/*' \
    --authorize-subscribe 'gui/*'

Start the server

npm start

It's starts a MQTT Broker on port 1883 and a fallback for WebSocket on port 1884.

Gamepad keyboard configuration

Every game has a profile for quick configuration. Look at the folder profiles/.

If you need to change any keyboard combination for SNES Top Gear, for example, go to profiles/race/snes--default. Every player has it's own file.

For production

Download the master branch to some folder. Unzip and use the setup script.

cd remote-pad-server-master
./scripts/setup.sh

This will install all required software for running both server and client. Debian/Ubuntu x86_64 only.

Monitoring

After run the setup script.

pm2 monit
pm2 stop remote-pad-server remote-pad
pm2 delete remote-pad-server remote-pad

SNES Emulator

Higan

sudo apt-get install higan

Troubleshooting

Error: OpenGL 3.2 is not available. Select another video driver on the Advanced Configuration tab and restart higan.

MESA_GL_VERSION_OVERRIDE=3.2 MESA_GLSL_VERSION_OVERRIDE=150 higan

SNES9x

Download from http://snes9x.ipherswipsite.com/

Tested with Ubuntu 14.04 with SNES9x version 1.52.

Configuration

Replace the file ~/.snes9x/snes9x.xml with ./profiles/race/snes--default/snes9x.xml.

Nintendo 64 Emulator

Mupen64plus

Starting the game with predefined configuration

For Mario Kart 64:

mupen64plus --configdir ./profiles/race/n64--default/

You can hack other configurations in ./profiles/race/n64--default/mupen64plus.cfg.