Recalbox Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • recalbox.com
    • Gitlab repository
    • Documentation
    • Discord
    1. Home
    2. boergim
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 9
    • Best 1
    • Controversial 0
    • Groups 0

    boergim

    @boergim

    1
    Reputation
    404
    Profile views
    9
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    boergim Unfollow Follow

    Best posts made by boergim

    • RE: USB XinMo und GPIO Controller

      @Substring thank you.

      @all This is my working Script:

      import RPi.GPIO as GPIO
      import time
      import socket
      # addressing information of target
      IPADDR = "127.0.0.1"
      PORTNUM = 55355
      # enter the data content of the UDP packet
      # initialize a socket, think of it as a cable
      # SOCK_DGRAM specifies that this is UDP
      try:
          s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      except socket.error:
          print 'Failed to create socket'
          sys.exit()
      
      GPIO.setmode(GPIO.BCM)
      GPIO.setup(2, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(6, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(9, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(11, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      
      def exitEmulator(channel):
          s.sendto("QUIT", (IPADDR, PORTNUM))
      
      def resetEmulator(channel):
          s.sendto("RESET", (IPADDR, PORTNUM))
      
      def loadState(channel):
          s.sendto("LOAD_STATE", (IPADDR, PORTNUM))
      
      def saveState(channel):
          s.sendto("SAVE_STATE", (IPADDR, PORTNUM))
      
      def stateSlotPlus(channel):
          s.sendto("STATE_SLOT_PLUS", (IPADDR, PORTNUM))
      
      def stateSlotMinus(channel):
          s.sendto("STATE_SLOT_MINUS", (IPADDR, PORTNUM))
      
      def pauseEmulator(channel):
          s.sendto("PAUSE_TOGGLE", (IPADDR, PORTNUM))
      
      def takeScreenshot(channel):
          s.sendto("SCREENSHOT", (IPADDR, PORTNUM))
      
      def muteEmulator(channel):
          s.sendto("MUTE", (IPADDR, PORTNUM))
      
      def fastForward(channel):
          s.sendto("FAST_FORWARD", (IPADDR, PORTNUM))
      
      def fastForwardHold(channel):
          s.sendto("FAST_FORWARD_HOLD", (IPADDR, PORTNUM))
      
      GPIO.add_event_detect(2, GPIO.FALLING, callback=exitEmulator, bouncetime=500)
      GPIO.add_event_detect(3, GPIO.FALLING, callback=resetEmulator, bouncetime=500)
      
      GPIO.add_event_detect(4, GPIO.FALLING, callback=loadState, bouncetime=500)
      GPIO.add_event_detect(5, GPIO.FALLING, callback=saveState, bouncetime=500)
      GPIO.add_event_detect(6, GPIO.FALLING, callback=stateSlotPlus, bouncetime=500)
      GPIO.add_event_detect(7, GPIO.FALLING, callback=stateSlotMinus, bouncetime=500)
      
      GPIO.add_event_detect(8, GPIO.FALLING, callback=takeScreenshot, bouncetime=500)
      GPIO.add_event_detect(9, GPIO.FALLING, callback=muteEmulator, bouncetime=500)
      GPIO.add_event_detect(10, GPIO.FALLING, callback=fastForward, bouncetime=500)
      GPIO.add_event_detect(11, GPIO.FALLING, callback=fastForwardHold, bouncetime=500)
      
      while True:
          time.sleep(10)
      
      posted in Controller/GPIO/USB
      boergim
      boergim

    Latest posts made by boergim

    • RE: USB XinMo und GPIO Controller

      @Substring thank you.

      @all This is my working Script:

      import RPi.GPIO as GPIO
      import time
      import socket
      # addressing information of target
      IPADDR = "127.0.0.1"
      PORTNUM = 55355
      # enter the data content of the UDP packet
      # initialize a socket, think of it as a cable
      # SOCK_DGRAM specifies that this is UDP
      try:
          s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
      except socket.error:
          print 'Failed to create socket'
          sys.exit()
      
      GPIO.setmode(GPIO.BCM)
      GPIO.setup(2, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(3, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(4, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(5, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(6, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(7, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(8, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(9, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      GPIO.setup(11, GPIO.IN, pull_up_down=GPIO.PUD_UP)
      
      def exitEmulator(channel):
          s.sendto("QUIT", (IPADDR, PORTNUM))
      
      def resetEmulator(channel):
          s.sendto("RESET", (IPADDR, PORTNUM))
      
      def loadState(channel):
          s.sendto("LOAD_STATE", (IPADDR, PORTNUM))
      
      def saveState(channel):
          s.sendto("SAVE_STATE", (IPADDR, PORTNUM))
      
      def stateSlotPlus(channel):
          s.sendto("STATE_SLOT_PLUS", (IPADDR, PORTNUM))
      
      def stateSlotMinus(channel):
          s.sendto("STATE_SLOT_MINUS", (IPADDR, PORTNUM))
      
      def pauseEmulator(channel):
          s.sendto("PAUSE_TOGGLE", (IPADDR, PORTNUM))
      
      def takeScreenshot(channel):
          s.sendto("SCREENSHOT", (IPADDR, PORTNUM))
      
      def muteEmulator(channel):
          s.sendto("MUTE", (IPADDR, PORTNUM))
      
      def fastForward(channel):
          s.sendto("FAST_FORWARD", (IPADDR, PORTNUM))
      
      def fastForwardHold(channel):
          s.sendto("FAST_FORWARD_HOLD", (IPADDR, PORTNUM))
      
      GPIO.add_event_detect(2, GPIO.FALLING, callback=exitEmulator, bouncetime=500)
      GPIO.add_event_detect(3, GPIO.FALLING, callback=resetEmulator, bouncetime=500)
      
      GPIO.add_event_detect(4, GPIO.FALLING, callback=loadState, bouncetime=500)
      GPIO.add_event_detect(5, GPIO.FALLING, callback=saveState, bouncetime=500)
      GPIO.add_event_detect(6, GPIO.FALLING, callback=stateSlotPlus, bouncetime=500)
      GPIO.add_event_detect(7, GPIO.FALLING, callback=stateSlotMinus, bouncetime=500)
      
      GPIO.add_event_detect(8, GPIO.FALLING, callback=takeScreenshot, bouncetime=500)
      GPIO.add_event_detect(9, GPIO.FALLING, callback=muteEmulator, bouncetime=500)
      GPIO.add_event_detect(10, GPIO.FALLING, callback=fastForward, bouncetime=500)
      GPIO.add_event_detect(11, GPIO.FALLING, callback=fastForwardHold, bouncetime=500)
      
      while True:
          time.sleep(10)
      
      posted in Controller/GPIO/USB
      boergim
      boergim
    • RE: USB XinMo und GPIO Controller

      @Substring i have found something, but it is in German
      [http://recalbox-wiki-rtfd.readthedocs.io/en/4.0/DE/Emulator-Interaktionen-mit-GPIO-(DE)/](link url)

      posted in Controller/GPIO/USB
      boergim
      boergim
    • RE: USB XinMo und GPIO Controller

      @Substring Exit a Game is no problem but what is with Reload, Save, Lade Screenshot and so on. I what to have all Shortcut functions on a Keyboard.

      Hotkey + Y → Save State
      Hotkey + X → Load State
      Hotkey + Up → Select Save Slot -1
      Hotkey + Down → Select Save Slot +1

      Hotkey + Start → End Game and Quit To Main Menu
      Hotkey + A → Reset Game
      Hotkey + B → Retroarch Menu
      Hotkey + L1 → Screenshot

      Hotkey + Right → Speedup game
      Hotkey + Left → Rewind (if activated in options)

      Hotkey + R2 → Next shader preset
      Hotkey + L2 → Previous shader preset

      I down't know how to script this.

      posted in Controller/GPIO/USB
      boergim
      boergim
    • RE: USB XinMo und GPIO Controller

      hello everybody,
      i have the following Problem.

      I want to build a Hotkey Keyboard, to Exit the game with one button.
      Also restart, save, load and anything else.

      I have made a circuit with Diodes, to prevent that all Buttons are pressed. (So the theory).
      alt text

      The Problem from this circuit is, if you push to many Buttons on the same time, that the hotkey is also pressed.

      Now my Question:

      Can i use the GPIO Pints from the PI for this?
      How do's the GPIO Controller works?
      Can i use the CPIO Controller at the same time as the XinMo?

      Thank you for your answer
      BörgiM

      posted in Controller/GPIO/USB
      boergim
      boergim
    • USB XinMo und GPIO Controller

      Hi zusammen,

      ich hab folgendes Problem.

      Und zwar will ich eine Hotkey Tastatur bauen, damit man nur einen Button zum beenden von den Spielen drücken muss und keine Tastenkombination.

      Dazu haben ich eine Schaltung mit Dioden gebaut damit nicht immer alle Tasten gedrückt werden (so die Theorie).
      alt Schaltung Hotkey Tastatur

      Problem bei dieser Lösung an dem XinMo Controller ist, dass wenn man wild am zocken ist dennoch die Hotkey Taste gedrückt wird.

      Nun zu meinem Fragen.

      Werden die GPIO Pins die für den Controller verwendet werden auch auf Masse kurzgeschlossen so wie bei den XinMo Controller?
      Kann ich den XinMo und den GPIO Controller gleichzeitig verwenden ohne das Mapping immer umzustellen?
      Kann ich zu not mit zwei XinMo arbeiten?
      Oder kann ich die Hotkey Funktionen komplett auf einen GPIO Pin legen sodass meine Schaltung überflüssig wird?

      Gruß und danke schon mal.
      BörgiM

      posted in Controller/GPIO/USB
      boergim
      boergim
    • RE: Recalbox Menü immer nur in 640x480

      @Substring
      I have found the Problem.
      The Problem was the Auto-generated Settings: vom Noobs.

      posted in Recalbox
      boergim
      boergim
    • RE: Recalbox Menü immer nur in 640x480

      @Substring
      I'm too stupid.

      Thats my config.txt in this moment and the resolution is 640x480:

      # uncomment if you get no picture on HDMI for a default "safe" mode
      #hdmi_safe=1
      
      disable_overscan=1
      
      # uncomment to force a specific HDMI mode (this will force VGA)
      hdmi_group=2
      hdmi_mode=51
      
      # comment to get jack audio
      #hdmi_drive=2
      
      config_hdmi_boost=4
      
      # force hdmi while the tv can take time before sending the signal on the hdmi output
      #hdmi_force_hotplug=1
      
      # uncomment for composite PAL
      #sdtv_mode=2
      
      # uncomment for lirc-rpi
      #dtoverlay=lirc-rpi
      
      # if you plug your tv at the same time as your rpi and that the rpi switches from the hdmi or give a low resolution because tv had no enough time to initialize it
      boot_delay=3
      
      # uncomment if you don't want the rainbow at startup
      disable_splash=1
      
      # Overclock
      gpu_mem_256=128
      gpu_mem_512=256
      gpu_mem_1024=512
      
      avoid_safe_mode=1
      
      kernel=zImage
      
      # NOOBS Auto-generated Settings:
      hdmi_force_hotplug=1
      hdmi_force_hotplug=1
      hdmi_ignore_edid=0xa5000080
      config_hdmi_boost=4
      hdmi_group=2
      hdmi_mode=4
      disable_overscan=0
      overscan_left=24
      overscan_right=24
      overscan_top=24
      overscan_bottom=24
      
      posted in Recalbox
      boergim
      boergim
    • RE: Recalbox Menü immer nur in 640x480

      @Substring Hi,
      I have uncommanded the config hdmi_safe=1 but the resolution is still the same.

      posted in Recalbox
      boergim
      boergim
    • Recalbox Menü immer nur in 640x480

      Moin zusammen,

      Das Recalbox Menü ist bei mir immer in der Auflösung 640x480.
      Spiele werden aber immer in der richtigen Auflösung gestartet.

      Der Monitor unterstützt eine max Auflösung von 1600x1200.

      Hier meine Configs.
      config.txt:

      # uncomment if you get no picture on HDMI for a default "safe" mode
      hdmi_safe=1
      
      disable_overscan=1
      
      # uncomment to force a specific HDMI mode (this will force VGA)
      hdmi_group=2
      hdmi_mode=51
      
      # comment to get jack audio
      #hdmi_drive=1
      
      config_hdmi_boost=4
      
      # force hdmi while the tv can take time before sending the signal on the hdmi output
      #hdmi_force_hotplug=1
      
      # uncomment for composite PAL
      #sdtv_mode=2
      
      # uncomment for lirc-rpi
      #dtoverlay=lirc-rpi
      
      # if you plug your tv at the same time as your rpi and that the rpi switches from the hdmi or give a low resolution because tv had no enough time to initialize it
      boot_delay=3
      
      # uncomment if you don't want the rainbow at startup
      disable_splash=1
      
      # Overclock
      gpu_mem_256=128
      gpu_mem_512=256
      gpu_mem_1024=512
      
      avoid_safe_mode=1
      
      kernel=zImage
      
      # NOOBS Auto-generated Settings:
      hdmi_force_hotplug=1
      hdmi_force_hotplug=1
      hdmi_ignore_edid=0xa5000080
      config_hdmi_boost=4
      hdmi_group=2
      hdmi_mode=4
      disable_overscan=0
      overscan_left=24
      overscan_right=24
      overscan_top=24
      overscan_bottom=24
      

      recalbox.conf:

      # 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=ATX_RASPI_R2_6      # http://lowpowerlab.com/atxraspi/#installation
      ;system.power.switch=MAUSBERRY           # http://mausberry-circuits.myshopify.com/pages/setup
      ;system.power.switch=REMOTEPIBOARD_2003  # http://www.msldigital.com/pages/support-for-remotepi-board-2013
      ;system.power.switch=REMOTEPIBOARD_2005  # http://www.msldigital.com/pages/support-for-remotepi-board-plus-2015
      ;system.power.switch=PIN56ONOFF          # https://github.com/recalbox/recalbox-os/wiki/Add-a-start-stop-button-to-your-recalbox-(EN)
      ;system.power.switch=PIN56PUSH           # 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)
      
      ## Recalbox Manager (http manager)
      system.manager.enabled=1
      
      ## Recalbox API (REST)
      system.api.enabled=0
      
      ## EmulationStation menu style
      ## default -> default all options menu
      ## none -> no menu except the game search menu
      ## bartop -> less menu, only needed for bartops
      system.es.menu=default
      
      ## 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=1
      
      ## 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=****
      ## Wifi KEY (string)
      ## Escape your special chars (# ; $) with a backslash : $ => \$
      wifi.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=jack
      ## Set system volume (0..100)
      audio.volume=100
      ## 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 an driver between official, shanwan and gasia if you have dualshock clones (official,shanwan,gasia)
      controllers.ps3.driver=official
      
      
      # ------------ D2 - XBOX Controllers ------------ #
      ## Xbox controllers are already supported, but xboxdrv can solve some compatibility issues
      ## Enable xboxdrv driver, disable this if you enabled ps3 controllers (0,1)
      controllers.xboxdrv.enabled=0
      ## Set the amount of controllers to use with xboxdrv (0..4)
      controllers.xboxdrv.nbcontrols=2
      
      
      # ------------ D3 - 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=0
      # default : stable ; set to beta to get the next version currently being tested. set to unstable at your own risk to get the development version.
      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=DMT 51 HDMI
      
      ## Shader set
      ## Automatically select shaders for all systems
      ## (none, retro, scanlines)
      global.shaderset=retro
      
      ## Once enabled, your screen will be cropped, and you will have a pixel perfect image (0,1)
      global.integerscale=1
      
      ## 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=1
      
      ## 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.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=DMT 51 HDMI
      snes.core=snes9x_next
      ;snes.shaders=/recalbox/share/shaders/shaders_glsl/mysnesshader.gplsp
      ;snes.ratio=4/3
      ;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=default
      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
      
      ## Configurations generated by Recalbox
      mame.emulator=libretro
      fba_libretro.emulator=default
      mastersystem.emulator=default
      mastersystem.ratio=4/3
      megadrive.emulator=libretro
      megadrive.core=genesisplusgx
      

      Ich hab schon einiges ausprobiert und leider keine Lösung gefunden, hoffe Ihr könnt mir helfen.

      Danke schonmal ;).

      gruß BoergiM

      posted in Recalbox
      boergim
      boergim