petrockblog / snesdev-rpi Goto Github PK
View Code? Open in Web Editor NEWSimulates a virtual keyboard for two SNES controllers that are connected to the GPIO pins of the Raspberry Pi (TM)
Simulates a virtual keyboard for two SNES controllers that are connected to the GPIO pins of the Raspberry Pi (TM)
Check out my branch.
https://github.com/axle-h/SNESDev-RPi
I haven't made a pull request because I've changed so much.
Instead, here's where I think you can improve this.
Performance:
Accuracy:
Some general daemon stuff:
Improvements
root@raspberrypi:~/SNESDev-RPi# make
gcc -c -Wall -O3 -Iinclude -lbcm2835 -lrt src/main.c -o obj/main.o
src/main.c: In function ‘main’:
src/main.c:216:15: error: ‘RPI_V2_GPIO_P1_11’ undeclared (first use in this function)
src/main.c:216:15: note: each undeclared identifier is reported only once for each function it appears in
src/main.c:271:17: error: ‘RPI_V2_GPIO_P1_19’ undeclared (first use in this function)
src/main.c:272:17: error: ‘RPI_V2_GPIO_P1_23’ undeclared (first use in this function)
src/main.c:273:17: error: ‘RPI_V2_GPIO_P1_07’ undeclared (first use in this function)
src/main.c:274:17: error: ‘RPI_V2_GPIO_P1_05’ undeclared (first use in this function)
make: *** [obj/main.o] Error 1
Hi Florian, when i connect the Snes controller to Pi i get an unlimited serie de characters in the command line, It stops if i disconnect the controller. I installed your Snesdv trough the lastest RetroPie-Setup script, and all connections to GPIO ports seem to be ok.
Any ideas? How can i reconfigure or reinstall Snesdv cfg?
Suggestion from Fritiof: Since both controllers are using the same clock and strobe signal, the button states coud be read in parallel.
Ive been futzing with this for a few days on and off, and it seems like the install scripts are not quite getting SNESDev installed all the way as a service. Upon attempting to run the scripts manually my RPi will reboot at the install service portion. I have to Uninstall the service first, then Install it. Not sure if its part of a bad image that may be causing the issue but im burning retropie-4.1-rpi2_rpi3.img from the website last downloaded on Dec 5, 2016. Something about this particular combination makes for an unhappy pi.
The SNES controllers are the wrong way around.
I've double checked my wiring and it's definitely correct.
I'm only using 1 controller and when i run jstest /dev/input/js0 i get nothing, then when i run jstest /dev/input/js1 it works.
How can i reverse this? I'm only using 1 controller so it's not like i can just use them in this way.
Revision : 000e (Model B, Revision 2.0, 512MB)
For users not using the SNES Dev Shield and just going raw onto the pins having a dedicated GPIO that can be used similar to the button on the Sheild.
The documentation for going without the shield seems to have a few mixed versions eventually found the correct one on reddit - in your documentation in the GIT hub having it spelled out explicitly would be a huge help. Thanks
The Command will not work because there is not /bin folder inside the Folder SNESDev-RPi
Something has gone wrong durign make?
I am trying to setup another SD card and trying to install SNESDev. I started out with the RetroPie image (1.9.1).
If I try the manual install I get this:
pi@raspberrypi ~/RetroPie/supplementary $ git clone git://github.com/petrockblog/SNESDev-RPi.git
Cloning into 'SNESDev-RPi'...
remote: Reusing existing pack: 395, done.
remote: Total 395 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (395/395), 669.38 KiB | 1.15 MiB/s, done.
Resolving deltas: 100% (107/107), done.
pi@raspberrypi ~/RetroPie/supplementary $ cd SNESDev-RPi/
pi@raspberrypi ~/RetroPie/supplementary/SNESDev-RPi $ sudo ./build.sh
= = = = = = = = = =
Building BCM 2835 library
= = = = = = = = = =
/home/pi/RetroPie/supplementary/SNESDev-RPi/libs/bcm2835-1.14 /home/pi/RetroPie/supplementary/SNESDev-RPi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/pi/RetroPie/supplementary/SNESDev-RPi/libs/bcm2835-1.14': configure: error: C compiler cannot create executables See
config.log' for more details
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
/home/pi/RetroPie/supplementary/SNESDev-RPi
= = = = = = = = = =
Building Confuse library
= = = = = = = = = =
/home/pi/RetroPie/supplementary/SNESDev-RPi/libs/confuse-2.7 /home/pi/RetroPie/supplementary/SNESDev-RPi
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/pi/RetroPie/supplementary/SNESDev-RPi/libs/confuse-2.7': configure: error: C compiler cannot create executables See
config.log' for more details.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
/home/pi/RetroPie/supplementary/SNESDev-RPi
= = = = = = = = = =
Building SNESDev-Rpi
= = = = = = = = = =
CC src/uinput_gamepad.c
/usr/lib/gcc/arm-linux-gnueabihf/4.6/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: Input/output error
make: *** [build/uinput_gamepad.o] Error 1
If I try from the retropie setup script I get this:
= = = = = = = = = = = = = = = = = = = = =
Installing SNESDev as GPIO interface for SNES controllers
= = = = = = = = = = = = = = = = = = = = =
Cloning into '/home/pi/RetroPie/supplementary/SNESDev-Rpi'...
/home/pi/RetroPie/supplementary/SNESDev-Rpi /home/pi/RetroPie-Setup
= = = = = = = = = =
Building BCM 2835 library
= = = = = = = = = =
/home/pi/RetroPie/supplementary/SNESDev-Rpi/libs/bcm2835-1.14 /home/pi/RetroPie/supplementary/SNESDev-Rpi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/pi/RetroPie/supplementary/SNESDev-Rpi/libs/bcm2835-1.14': configure: error: C compiler cannot create executables See
config.log' for more details
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
/home/pi/RetroPie/supplementary/SNESDev-Rpi
= = = = = = = = = =
Building Confuse library
= = = = = = = = = =
/home/pi/RetroPie/supplementary/SNESDev-Rpi/libs/confuse-2.7 /home/pi/RetroPie/supplementary/SNESDev-Rpi
checking whether to enable maintainer-specific portions of Makefiles... no
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in /home/pi/RetroPie/supplementary/SNESDev-Rpi/libs/confuse-2.7': configure: error: C compiler cannot create executables See
config.log' for more details.
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target `install'. Stop.
/home/pi/RetroPie/supplementary/SNESDev-Rpi
= = = = = = = = = =
Building SNESDev-Rpi
= = = = = = = = = =
CC src/uinput_gamepad.c
/usr/lib/gcc/arm-linux-gnueabihf/4.6/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: Input/output error
make: *** [build/uinput_gamepad.o] Error 1
/home/pi/RetroPie-Setup
chgrp: changing group of /home/pi/RetroPie/emulators/mame4all-pi/src/sound/ym2151.h': Input/output error chgrp: changing group of
/home/pi/RetroPie/emulators/mame4all-pi/src/sound/c140.h': Input/output error
chgrp: changing group of /home/pi/RetroPie/emulators/fbzx-2.10.0/Z80free.o': Input/output error chgrp: changing group of
/home/pi/RetroPie/emulators/gngeo-0.7/installdir/share/gngeo/romrc.d/lresort.rc': Input/output error
chgrp: changing group of /home/pi/RetroPie/emulators/gngeo-0.7/installdir/share/gngeo/romrc.d/samsho5sp.rc': Input/output error chown: changing ownership of
/home/pi/RetroPie/emulators/mame4all-pi/src/sound/ym2151.h': Input/output error
chown: changing ownership of /home/pi/RetroPie/emulators/mame4all-pi/src/sound/c140.h': Input/output error chown: changing ownership of
/home/pi/RetroPie/emulators/fbzx-2.10.0/Z80free.o': Input/output error
chown: changing ownership of /home/pi/RetroPie/emulators/gngeo-0.7/installdir/share/gngeo/romrc.d/lresort.rc': Input/output error chown: changing ownership of
/home/pi/RetroPie/emulators/gngeo-0.7/installdir/share/gngeo/romrc.d/samsho5sp.rc': Input/output error
What am I doing wrong?
Curently libconfuse is built/installed to /usr/local/lib - perhaps it could just link with it directly after building without installing - keeps everything in one place then. Also on raspbian, it should check if there is a system libconfuse installed - that way we can just add a dependency on RetroPie-Setup for libconfuse which saves building it at all.
Hey guys,
I'm running the v3.3 BETA Retropie SD Card Image on a RPi2. Manually downloading, compiling and manually starting SNESDev works (also compiling and installing via the retropie setup works fine)
However, there is no start script for the Systemd, so SNESDev isn't loaded automatically everytime retropie starts.
Please fix :)
Thanks!
Instead of virtual keyboard, implement gamepad driver(s). This would require less configuration.
First press: rewind
Three taps: ESC
Five taps: Shutdown
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.