Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord

    GPIO ON/OFF Switch und Reset Problem

    Controller/GPIO/USB
    gpio onoff switch und reset
    1
    1
    1351
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • megakoni
      megakoni last edited by

      Hi.

      Ich hab über GPIO an die passenden Pins einen Schalter für Power On oder Off angeschlossen, und einen taster für Reset. Funktioniert auch alles soweit.

      Ich hab mir im Prinzip eine SNES gebaut, folgendes verbaut:
      Raspberry Pi 3 mit Recalbox 4.1 installiert,
      einen USB HUB angeschlossen damit ich am SNES Gehäuse ein paar freie Ports hab,
      dann eine Micro SD Verlängerung,
      HDMI, LAN und Klinkenstecker Verlängerung damit halt alles ans Gehäuse geht.

      Stromkabel geht ganz normal raus aus dem Gehäuse gelegt, weil ich mit der Verlängerung leider zu wenig Saft hatte.
      Dann ist noch damit ich die SNES Controller Ports vorne benutzen kann, ein SNES to USB Adapter per USB halt an den Pi angeschlossen. Die Pins vom Adapter dann entsprechend verlötet an die Controller Ports, falls das irgendwie wichtig ist.

      Nun zum Problem:

      immer wenn ich, während das System an ist, etwas in die USB Ports, in den Klinkenstecker oder in den LAN Stecker stecke, fährt der Raspberry Pi runter oder startet neu. Es reicht schon wenn ich nur mit einer Nadel den Port berühre. Ganz komisch, scheinbar gibt es einen kurzen Spannungspeak der die GPIO Pins entsprechend setzt? Kenn mich da nicht so gut aus.
      Habe für die Schalter/Taster nämlich nur die eine Zeile in der Recalbox Config Datei auskommentiert. Sieht dann jetzt so aus:

      System Variable

      You can configure your recalbox from here

      To set a variable, remove the first ; on the line

      ------------ A - System Options -----------

      Uncomment the system.power.switch you use

      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      system.power.switch=PIN356ONOFFRESET # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)^

      ##Ich weiß nicht wieso das mit dem PIN356ONOFFRESET mehrfach auftritt. Hab bei der originalen config nur eine Zeile auskommentiert, aber nachdem man die Schalter/Taster einmal benutzt hat, hat sich die config Datei von selbst so verändert

      fbcp FrameBuffer Copy Program

      For small TFT screen on GPIO and SPI

      See https://github.com/recalbox/recalbox-os/wiki/Utility---Use-of-fbcp-for-small-TFT-screen-(EN) for details

      Needed for Waveshare 3.2" 3.5" TFT screen, 2.8" Adafruit screen

      See https://github.com/recalbox/recalbox-os/wiki/TFT-Screen-SPI-Bus-(EN)

      for support and configuration details needed by /boot/config.txt

      system.fbcp.enabled=0

      Recalbox Manager (http manager)

      system.manager.enabled=1

      1 or 2, depending on the manager version you wish

      system.manager.version=2

      Recalbox security

      enforce security

      samba password required

      disable virtual gamepads

      system.security.enabled=0

      Recalbox API (REST)

      system.api.enabled=0

      Allow a specific resolution for ES only from the command : tvservice -m [MODE]

      Leave commented for the default usual behaviour

      ;system.es.videomode=CEA 4 HDMI

      EmulationStation

      menu style

      default -> default all options menu

      none -> no menu except the game search menu

      bartop -> less menu, only needed for bartops

      emulationstation.menu=default

      Select a system to show on boot (use rom directory name) (string)

      emulationstation.selectedsystem=snes

      Show the gamelist of the first or selected system on boot (0,1)

      emulationstation.bootongamelist=0

      Disable system view ES will boot and show ONLY the first or selected system (0,1)

      emulationstation.hidesystemview=0

      Pa**e Gamelists only. Show only games listed in gamelist.xml files (0,1)

      emulationstation.gamelistonly=0

      Force basicgameList view to be displayed, even if your game systems are scraped (0,1)

      emulationstation.forcebasicgamelistview=0

      Emulator special keys

      default -> default all special keys

      nomenu -> cannot popup the emulator menu

      none -> no special keys in emulators

      system.emulators.specialkeys=default

      Show or hide kodi in emulationstation (0,1)

      kodi.enabled=0

      Start kodi at launch (0,1)

      kodi.atstartup=0

      set x button shortcut (0,1)

      kodi.xbutton=0

      Kodi can wait for a network component before starting

      waithost is the ip or hostname that must answer to a ping to validate the availability

      waittime is the maximum time waited when kodi boots

      if waitmode is required, kodi will not start if the component is not available

      if waitmode is wish, kodi will start if the component is not available

      if waitmode is not set or has another value, kodi will start immediately

      ;kodi.network.waitmode=required
      ;kodi.network.waittime=10
      ;kodi.network.waithost=192.168.0.50

      ------------ B - Network ------------

      Set system hostname

      system.hostname=RECALBOX

      Activate wifi (0,1)

      wifi.enabled=1

      Wifi SSID (string)

      wifi.ssid=devolo-f4068d533748

      Wifi KEY (string)

      after rebooting the recalbox, the "new key" is replace by a hidden value "enc:xxxxx"

      you can edit the "enc:xxxxx" value to replace by a clear value, it will be updated again at the following reboot

      Escape your special chars (# ; $) with a backslash : $ => $

      wifi.key=enc:U2FsdGVkX19c3DqoRkhU9gyb5g0K7I0sE6ZX7AKeCQMwsm7Sb6gZXfzcYEVRvyLo

      secondary wifi (not configurable via the user interface)

      ;wifi2.ssid=new ssid
      ;wifi2.key=new key

      third wifi (not configurable via the user interface)

      ;wifi3.ssid=new ssid
      ;wifi3.key=new key

      Samba share

      system.samba.enabled=1

      Virtual Gamepads

      system.virtual-gamepads.enabled=1

      SSH

      system.ssh.enabled=1

      ------------ C - Audio ------------

      Set the audio device (auto, hdmi, jack)

      audio.device=hdmi

      Set system volume (0..100)

      audio.volume=97

      Enable or disable system sounds in ES (0,1)

      audio.bgmusic=1

      -------------- D - Controllers -----------------

      Enable support for standard bluetooth controllers

      controllers.bluetooth.enabled=1

      Please enable only one of these

      -------------- D1 - PS3 Controllers ------------

      ##Enable PS3 controllers support
      controllers.ps3.enabled=1

      Choose a driver between bluez, official and shanwan

      bluez -> bluez 5 + kernel drivers, support official and shanwan sisaxis

      official -> sixad drivers, support official and gasia sisaxis

      shanwan -> shanwan drivers, support official and shanwan sisaxis

      controllers.ps3.driver=bluez

      ------------ D2 - GPIO Controllers ------------

      GPIO Controllers

      enable controllers on GPIO with mk_arcarde_joystick_rpi (0,1)

      controllers.gpio.enabled=0

      mk_gpio arguments, map=1 for one controller, map=1,2 for 2 (map=1,map=1,2)

      controllers.gpio.args=map=1,2

      DB9 Controllers

      Enable DB9 drivers for atari, megadrive, amiga controllers (0,1)

      controllers.db9.enabled=0

      db9 arguments

      controllers.db9.args=map=1

      Gamecon controllers

      Enable gamecon controllers, for nes, snes psx (0,1)

      controllers.gamecon.enabled=0

      gamecon_args

      controllers.gamecon.args=map=1

      XGaming's XArcade Tankstik and other compatible devices

      controllers.xarcade.enabled=1

      ------------ F - Language and keyboard ------------

      Set the language of the system (fr_FR,en_US,en_GB,de_DE,pt_BR,es_ES,it_IT,eu_ES,tr_TR,zh_CN)

      system.language=de_DE

      set the keyboard layout (fr,en,de,us,es)

      ;system.kblayout=us

      Set you local time

      Select your timezone from : ls /usr/share/zoneinfo/ (string)

      ;system.timezone=Europe/Paris

      ------------ G - UPDATES ------------

      Automatically check for updates at start (0,1)

      updates.enabled=1

      Update type : default to stable

      updates.type=stable

      ------------ H - HERE IT IS - GLOBAL EMULATOR CONFIGURATION ------------

      The global value will be used for all emulators, except if the value

      is redefined in the emulator

      Set game resolution for emulators

      select your mode from the command : tvservice -m [MODE]

      CEA 5 HDMI : 1920x1080 @ 60Hz 16:9, clock:74MHz interlaced

      CEA 4 HDMI : 1280x720 @ 60Hz 16:9, clock:74MHz progressive

      use 'default' for using the default resolution

      (string)

      global.videomode=CEA 4 HDMI

      Shader set

      Automatically select shaders for all systems

      ## (none, retro, scanlines)
      global.shaderset=none

      Once enabled, your screen will be cropped, and you will have a pixel perfect image (0,1)

      global.integerscale=0

      Set gpslp shader for all emulators (prefer shadersets above). Absolute path (string)

      global.shaders=

      Set ratio for all emulators (auto,4/3,16/9,16/10,custom)

      global.ratio=4/3

      Set smooth for all emulators (0,1)

      global.smooth=0

      Set rewind for all emulators (0,1)

      global.rewind=1

      Set autosave/load savestate for all emulators (0,1)

      global.autosave=0

      Enable retroarchievements (0,1)

      Set your www.retroachievements.org username/password

      Escape your special chars (# ; $) with a backslash : $ => $

      global.retroachievements=0
      global.retroachievements.hardcore=0
      global.retroachievements.username=
      global.retroachievements.password=

      Set retroarch input driver (auto, udev, sdl2)

      If you don't have issues with your controllers, let auto

      global.inputdriver=auto

      If you do not want recalboxOS to generate the configuration for all emulators (string)

      ;global.configfile=/path/to/my/configfile.cfg

      ------------ I - EMULATORS CHOICES -----------

      You can override the global configuration here

      Here is the snes example

      ;snes.videomode=CEA 4 HDMI
      snes.core=snes9x_next
      ;snes.shaders=/recalbox/share/shaders/shaders_glsl/mysnesshader.gplsp
      ;snes.ratio=16/9
      ;snes.smooth=0
      ;snes.rewind=1
      ;snes.autosave=0
      snes.emulator=libretro
      ;snes.integerscale=0

      If you do not want recalboxOS to generate the configuration for the emulator :

      ;snes.configfile=/path/to/my/configfile.cfg

      Default cores for RPi3

      snes.core=snes9x_next
      gba.core=mgba
      mame.core=mame078
      nes.core=fceunext

      NeoGeo emulator

      You can use pifba or a libretro core (fba2x,libretro)

      neogeo.emulator=libretro

      If you set libretro as neogeo.emulator, the line below sets the retroarch core (fba,imame4all)

      neogeo.core=fba

      N64 emulator is configured to display a screen with a 640x480 resolution (native n64 resolution)

      So you must use one of these video modes (DMT 4 HDMI,CEA 1 HDMI).

      If your screen is not compatible with one of these video modes, please check the recalbox's wiki.

      n64.videomode=DMT 4 HDMI

      If you are using a CRT screen, please change the setting above with this one :

      n64.videomode=default

      Dreamcast emulator

      Like N64, such a CPU intensive emulator needs a small resolution

      Consider DMT 4 HDMI (640480) or DMT 9 HDMI (800600). If you have a black screen on dreamcast, try DMT 9 HDMI here

      dreamcast.videomode=DMT 4 HDMI

      Configurations generated by Recalbox

      system.es.menu=default
      controllers.xboxdrv.enabled=0
      controllers.xboxdrv.nbcontrols=2
      psx.emulator=default
      mastersystem.emulator=libretro
      mastersystem.core=picodrive
      n64.emulator=default
      n64.core=glupen64

      Beim bzw vor dem Hochfahren macht das keine Probleme. Kann man alles anschließen, funktioniert und nichts fährt runter.
      Es ist kein großes Problem, aber nervt halt doch etwas. An Klinkenstecker kommt nicht oft was dran, und wenn doch dann is es ein CRT TV, und der is eh vor dem Hochfahren dran. Genauso mit LAN.
      Das einzige Nervige ist halt das mit dem USB HUB, dass ich das auch nur vor dem Hochfahren verwenden kann. Das Seltsame ist, manchmal geht es trotzdem während alles gebootet ist. Aber oft halt nicht.

      Also umgehen kann ich das Problem schon, aber wäre echt cool wenn ich es komplett vermeiden könnte, vielleicht kann mir hier jemand helfen.

      Danke im Vorraus

      1 Reply Last reply Reply Quote 0
      • First post
        Last post

      Want to support us ?

      66
      Online

      99.6k
      Users

      28.1k
      Topics

      187.1k
      Posts

      Copyright © 2021 recalbox.com