Bugs in 8 beta 9
  • Hello,
    At first congratulation for your great work with piplay.
    I have 2 problems with the new beta 9:
    - The joystick doesn't work in mame4all. I look up in the code and I think the is no transformation file for this emulator.
    - The wifi configuration doesn't have sudo permissions to overwrite the wifi config files and It doesn't work. I have solved it executing the script as sudo.
  • mame4all is an exception to the controller setup utility. it has it's own built-in controller setup. When you run a game, you need to press 'tab', then you can set up controls.
  • I haven't done extensive testing but I think the genesis controller setup doesn't completely work. The start button got mapped right but when I try to press the B or C button it doesn't work. Maybe it's just me.
  • My son and I are just starting to setup a reto gaming machine with our B+ pi. piplay is pretty awesome, so kudos to all the hard work you've done. I just started hacking today, so I apologize if some of these are know/covered elsewhere.

    - I also ran into the wifi bug and also solved it by running the script with sudo like nachito83. I suspect having the launcher run it with sudo would be an easy fix.
    - Using a mouse in launchmenu.py can crash it randomly. My fix was to just disconnect the mouse.
    - I'm having some trouble using a wired xbox 360 controller. Running toggle_xbox_controller.sh allows me to use the controller in launchmenu.py, but it does not setup the emulators. If I hit "Tab" and configure "nes" (fceux) manually I get the following behaviors:
    1. No matter what button I pick for A or B it seems to always set
    SDL.Input.GamePad.0A = 0
    SDL.Input.GamePad.0B = 1
    SDL.Input.GamePad.0TurboA = 0
    SDL.Input.GamePad.0TurboB = 0

    This seems to have the effect of always making the NES "B" button a "turbo B" button.
    2. Attempting to set *EXIT_PROGRAM to any joystick button results in a scenario where I can't escape fceux back to piplay's launchmenu.py. If I press ESC (the default keymap 27) on the keyboard when I get to that step I can still use the keyboard to escape.
    3. The D-PAD buttons don't work if I attempt to configure them from inside launchmenu.py. Instead I can only configure the left analog stick. However, I can get them to be recognized if I run controller_setup/configure.py if I exit to the shell and have console access (didn't work via SSH since I didn't have X-Fowarding or $DISPLAY set).

    If there are some docs that you could point me at that would be awesome. Also if you've just fixed a bunch of bugs and I should pull the code from github I'm cool with that too.
  • -The wifi bug will get fixed in the next update. I'm not sure why it used to work but now it doesn't.
    -I fixed the error with the mouse (although right now the mouse isn't 100% usable, it doesn't work in popup menus yet)
    -I'll have to look into the xbox 360 controller setup. I think that I have a spare one sitting around somewhere.

    Some of the emulators only support keyboard keys for functions like 'esc'. we plan on going through the emulators and trying to somewhat standardize them relatively soon.

    I'll take a look into what the difference is between controller_setup/configure.py and what is in piplay. I have the feeling that it has to do with the pygame JOYHATMOTION

    Thanks for the thorough list, I'll let you know what I come up with. Shea is at PyCon until monday, so it's just me for the weekend.
  • @candyman - I did some testing. I don't think that your xbox controller is getting activated. With the normal 'toggle controller', it add a line to your .profile that looks like this:
    sudo xboxdrv --silent --config /home/pi/pimame/config/xboxdrv_mapping.cfg --dbus session &
    I had to add an extra flag to get mine to connect properly
    sudo xboxdrv --detach-kernel-driver --silent --config /home/pi/pimame/config/xboxdrv_mapping.cfg --dbus session &

    When mine wasn't connected properly, I got the exact same output that you posted earlier. Once I connected correctly and restarted my system, it mapped correctly (although I think some buttons in /home/pi/pimame/config/xboxdrv_mapping.cfg need to be re-configured)
  • @mholgatem adding --detach-kernel-driver activated the controller. Thanks! Now I just have to fix all the buttons in xboxdrv_mapping.cfg since as you noted they're not quite right.
  • I too have the xbox 360 wireless controller and the --detach-kernel-driver config definitely helps to initialize the controller. However, as you mention, the buttons don't seem quite right with the default xboxdrv_mapping.cfg file. Were either of you able to get it to behave correctly and, if so, would you mind posting your modified xboxdrv_mapping.cfg file? Once you had that file sorted out, were you able to use the piplay controller configuration tool to get the controllers to work correctly for SNES/NES/etc?
  • so I don't really use the xbox controller that much (so this hasn't been extensively tested):
    [xboxdrv]
    silent=true
    deadzone=6000
    dpad-as-button=true
    trigger-as-button=true

    [ui-axismap]
    x2=REL_X:10
    y2=REL_Y:-10
    x1=KEY_A:KEY_D
    y1=KEY_W:KEY_S

    [ui-buttonmap]
    a=KEY_SPACE
    b=KEY_J
    x=KEY_K
    y=KEY_L

    [ui-buttonmap]
    lb=KEY_E
    rb=KEY_I

    [ui-buttonmap]
    lt=KEY_X
    rt=KEY_T

    [ui-buttonmap]
    dl=KEY_LEFT
    dr=KEY_RIGHT
    du=KEY_UP
    dd=KEY_DOWN

    [ui-buttonmap]
    back=KEY_ESC
    start=KEY_ENTER
    guide=KEY_TAB

    # EOF #

    I set the bumpers and triggers to E,X,I,T and 'start' to 'ENTER' so that you can get back into piplay from the command line with just the xbox controller.
  • You, my friend, are a gentleman and a scholar! This works a treat! With this configuration file in place, after a reboot, now when I run the piplay controller configuration (using the TAB key) I can play NES and SNES games without issue. Thanks again!
  • yep. Glad it's working for you!
  • So now I'm trying to go for broke and have two xbox 360 wireless controllers working in all my emulators. I did so by changing the initialization in .profile to look like this:

    sudo xboxdrv --detach-kernel-driver --silent --wid 0 --config /home/pi/pimame/config/xboxdrv_mapping.cfg --dbus session &
    sleep 1
    sudo xboxdrv --detach-kernel-driver --silent --wid 1 --config /home/pi/pimame/config/xboxdrv_mapping2.cfg --dbus session &

    and that seems to initialize both controllers and their LEDs are correct. So, then I went through the PiPlay controller configuration menu for NES. It seemed to go smoothly and, sure enough, I can play Contra with 2-players and both controllers do what they should.

    Oh, I should mention that my xboxdrv_mapping2.cfg looks like this:

    [xboxdrv]

    led = 3
    extra-devices = false
    extra-events = false
    deadzone = 6000
    dpad-as-button = true
    trigger-as-button = true
    device-name = "Microsoft Xbox 360 Wireless Controller (PC)"

    [ui-buttonmap]

    a=KEY_A
    b=KEY_S
    x=KEY_E
    y=KEY_W

    lb = KEY_K
    rb = KEY_L

    back = KEY_ESC
    start = KEY_Y

    dl = KEY_D
    dr = KEY_G
    du = KEY_R
    dd = KEY_F

    lt=KEY_5
    rt=BTN_LEFT

    [ui-axismap]

    x2=KEY_T:KEY_Y
    x1=KEY_D:KEY_G
    y1=KEY_R:KEY_F


    Anyway, embolded by my success I ran the PiPlay controller configuration for SNES and I have hit a snag. When I start a 2-player SNES game, the controller doesn't seem to do anything at all. I don't suppose anyone who is using two xbox 360 wireless controllers in NES/SNES/Advmame/etc can suggest an xboxdrv_mapping.cfg for the second controller that might be a better fit?
  • Ahh.. the second controller is having issues in PISNES because the version in PiPlay doesn't let you have two keyboard players and the Xbox 360 controller looks like a keyboard. Looks like @mholgatem has already solved this in the source, though. Following his advice in this thread got me a version that has both controllers working. Huzzah! http://piplay.org/forum/discussion/514/pisnes-second-player-controls-question/p1 Now I just have some minor controller weirdness but I'm sure I can sort that out. I think one of the controllers has nearly dead batteries and so I'm getting inconsistent results.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!