Giter Site home page Giter Site logo

petrockblog / controlblockservice2 Goto Github PK

View Code? Open in Web Editor NEW
21.0 5.0 9.0 2.68 MB

This is the driver for the ControlBlock re.v 2.X, a power switch and input/output/gameapd gadget for the Raspberry Pi

Home Page: https://controlblock.petrockblock.com

License: Other

Shell 3.81% C++ 78.86% CMake 1.93% C 15.41%
petrockblock retropie retro raspberry rpi rpi2 rpi3 raspberry-pi gamepad power-switch

controlblockservice2's People

Contributors

ftheile avatar markhalls avatar petrockblog avatar themontezuma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

controlblockservice2's Issues

Support multiple stacked ControlBlocks

The hardware of the ControlBlock allows stacking on top of each other.

The driver should be updated such that multiple ControlBlock can be configured and controlled by the driver.

Install process does not enable SPI

I recently installed Retropie 4.5.1 on a RPi 3b+ with a controlblock v2.1

As a first step, attempted to build/install ControlBlockService2. The service built successfully, but I didn't get any response from any ControlBlock inputs.

When running the ControlBlock service binary directly, I was presented with a flood of SPI communication errors.

I found this thread on the RetroPie forum that suggested I enable SPI through raspi-config. This solved my issues immediately.

It would be great to see enabling SPI added as a setup step in your documentation, and included with your otherwise perfect install script.

Thanks for the ControlBlock :)

ControlBlockService2 doesn't install correctly

Installing ControlBlockService2 seems to be broken currently. Following installation, the service doesn't seem to function (LED only blinks, switch can't be used to turn device off, any controls wired to ControlBlock don't function), and it doesn't generate a default config file at /etc/controlblockconfig.cfg (Creating one at that location doesn't fix anything).

Installation of ControlBlockService (Original rather than 2, though the device is a revision 2) seems to fix LED and switch functionality, but controls are still broken.

Cannot install on RetroPie 3.4

I've make a fresh installation of Retropie 3.4
After this I'm try to install a Controlblock V2
driver.
I receive this error:

pi@retropie:/ControlBlockService2 $ sudo make
installservice
cd scripts && make installservice
make[1]: Entering directory
'/home/pi/ControlBlockService2/scripts'
sed -i -e "s|^blacklist spi-bcm2708|#blacklist
spi-bcm2708|g" /etc/modprobe.d/ra
spi-blacklist.conf
sed: can't read
/etc/modprobe.d/raspi-blacklist.conf: No such file
or directory
Makefile:2: recipe for target 'installservice'
failed
make[1]: *** [installservice] Error 2
make[1]: Leaving directory
'/home/pi/ControlBlockService2/scripts'
Makefile:19: recipe for target 'installservice'
failed
make: *** [installservice] Error 2
pi@retropie:
/ControlBlockService2 $ Makefile:19:
recipe for target 'installserv
ice' failed
-bash: Makefile:19:: command not found

a workaround is create a file
/etc/modprobe.d/raspi-blacklist.conf

Switch doesn't power on, service status doesn't show as running

After installing current master, my controllers are working and the power switch shuts down the Pi. However on pressing the power button again, whilst the LED flashes slowly, it never stops flashing nor properly boots. No HDMI output or ssh connection becomes available.

To get it to boot again, I have to leave the power switch toggled on, then replug the Pi at the wall.

sudo service controlblockservice status shows

controlblockservice.service - LSB: ControlBlockService init script
   Loaded: loaded (/etc/init.d/controlblockservice; generated; vendor preset: enabled)
   Active: active (running) since Thu 2019-01-03 13:04:32 UTC; 7min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 4808 ExecStart=/etc/init.d/controlblockservice start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/controlblockservice.service
           └─4816 /usr/bin/controlblock

but service --status-all shows a minus next to controlblockservice. Not running or registered properly?
sudo service controlblockservice start has no impact on the service --status-all output.

Attempting to clean & reinstall via sudo make uninstallservice, uninstall, install, installservice has had no effect.

I have also followed instructions here to try ensure HDMI output is configured correctly at boot.
https://blog.mivia.dk/solved-hdmi-working-raspberry-pi/

install broken

Use the install script and it shutdowns the pi. Every time it starts it shuts itself down.

Run without CE

This is a proposal for improvement, the SPI is possible to run in standard mode without CE, and leaving this pin of GPIO free is extremely important to be able to use it for other functions such as video output.

GPIO-CS

Any GPIO pin can be used as CS in the latest RPi versions, but I tried to make an Overlay by moving CS0 from pin 7 to 25 but ControlBlock does not recognize it.
I have recompiled bcm2835.c by changing the CS pins and also mcp23s17pi.cpp by adding the address of the new CS in pin 25 but nothing.
Could it be possible to explain what changes are necessary to be able to move CS to any GPIO?
Many thanks.

broken compatibility with SDL

With your changes related to issue 14:
#14
you broke compatibility with SDL (and all SDL based games) regarding the joystick axes...

Change pin for CS

hi, is there any way to modify the driver to work in conjunction with vga666 in dpi = 3 then using gpio25 as CS?
Thank you
Vincenzo

SNES EJECT button support

Currently I'm working on my second RaspberryPi/RetropPie inside a SNES case project. When I started my first project was at the time when support for the SNES reset button was added to the ControlBlock SNES gamepad driver. I really liked that feature as it provides a convenient to exit a running game, especially helpful for casual games who resist to learn hotkeys to do so. I always had the idea to also make use of the SNES eject button. In my setup I'd like the reset button to restart the currently running game (Select+B) and the eject button exit the game (Select+Start).

Long story short: is there any chance that this is integrated into the ControlBlock SNES driver? Or is there already a generic way to configured custom keys/switches connected to the ControlBlock?

Cannot reliably drive 2 NES Advantage joysticks, but regular NES controllers are fine

ControlBlockService2 from commit c9d0ab3
RetroPie 4.1

I have this strange situation where I can use 2 regular NES controllers fine, but cannot get NES Advantage joysticks to reliably work.

Unplugging a NES controller, and plugging in a NES Advantage stick will 90% of the time stop any controller from working until rebooting the system. But 10% of the time it'll work fine. Right before it breaks everything, it seems like a lot of button presses are happening.

Booting with the NES Advantage sticks plugged in almost never works. But 5% of the time they'll boot up fine.

When the NES Advantage sticks are working, no amount of jiggling my wires or connections will cause them to fail. So I don't believe it is a wiring or contact issue.

None of these reliability problems exist for the regular NES controllers.

A failed state for the NES Advantage sticks includes not lighting up the buttons when they're pressed. When a NES Advantage stick is working, the little lights under the turbo dials always light up when the buttons are pressed. If those lights are working by the time the ES logo appears, then the stick will be working fine.

I suspect is has something to do with powering the sticks vs powering the controllers. Or maybe in detecting whether anything is plugged in. Maybe the NES Advantage sticks follow a mildly different communications protocol. I don't know. Grasping.

jstest /dev/input/js0 doesn't show any activity for the NES Advantage sticks when they're in that "no lights" mode. Regular NES Controllers always work with the jstest, unless the NES Advantage stick has caused the "nothing is going to work now" problem.

Maybe the driver crashes? Would there be crash logs anywhere?

How should I proceed with troubleshooting this?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.