Autofire on the axis

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 277 replies, has 69 voices, and was last updated by Profile photo of janmilpol janmilpol 12 months ago.

Viewing 35 posts - 71 through 105 (of 278 total)
  • Author
    Posts
  • #93639
    Profile photo of TorVaga
    TorVaga
    Participant

    This might be a stupid question, but I gotta ask. In the retroarch.cfg file, there are alot of lines with # in front of all lines. Around line 400 in my file there is the “setup” for joypad, but is this where i should enter my “new” lines?
    Or am I supposed to enter both player 1 and player 2 at the very end of the document without the # in front?
    I’m quite a noob when it comes to altering lines like that, and I don’t really know what those # does to a line. I recon now that they might not effect the behavior of the Pi/ emulator when they got this # at first? Sorry for asking the obvious, but that’s how I learn. Thanks for trying to help, I appreciate it alot! =)

    #93645
    Profile photo of feederchain
    feederchain
    Participant

    The # is used to comment out the line. Which means it will be ignored. So any line that you want to use you would remove the # from the start. So for example when it comes to the button mappings. You find those lines. Remove the # and change the assigned button at the end of the line. Copy and paste lines for joystick 1. Place them below. Changing these new lines to represent joystick 2.

    It doesn’t really matter too much where the lines are located in the file. You just need to know that the later lines override anything before it if you have duplicates. You would probably be pretty safe copying and pasting other’s input lines from earlier.

    #93663
    Profile photo of illcoolz
    illcoolz
    Participant

    Thank you so much TorVaga for the reply and thanks a lot feederchain for the amazing work you have done. The controls now work perfectly in game!

    The only issue I still have, is that I can not seem to register the buttons to control Emulation Station :/ It gets stuck passed button B, the other buttons don’t register.

    Any ideas what I can do?

    #93669
    Profile photo of TorVaga
    TorVaga
    Participant

    I recommend you try testing the joystick/ buttons with jstest if you haven’t done already. To see that they register to the Pi. Exit Emulationstation and type sudo jstest /dev/input/js0 and js1 if you got the 2 player controllers. Then you can test if the buttons work. To exit out of the testing, you press Ctrl + C. If they register correctly there, I’m not sure why they wont register in Emulationstation I’m afraid.

    #93674
    Profile photo of illcoolz
    illcoolz
    Participant

    I recommend you try testing the joystick/ buttons with jstest if you haven’t done already. To see that they register to the Pi. Exit Emulationstation and type sudo jstest /dev/input/js0 and js1 if you got the 2 player controllers. Then you can test if the buttons work. To exit out of the testing, you press Ctrl + C. If they register correctly there, I’m not sure why they wont register in Emulationstation I’m afraid.

    Thanks for the reply. All buttons work when I try them on Jstest. Not sure whats the deal with ES.

    Thanks for your reply either way, and I hope someone else can assist me.

    #93675
    Profile photo of TorVaga
    TorVaga
    Participant

    Then I understand the concept of what I should do, but I can’t seem to get the right mappings.
    Should the mapping of the buttons be the same as the output of the jstest?
    When I haven’t altered the retroarch.cfg Player 1 works as it should.
    When I alter the file, and try this, nothing works (neither joysticks or buttons)

    #input_device = “Xin-Mo Xin-Mo Dual Arcade”
    #input_driver = “udev”
    
    #input_player1_joypad_index= “0”
    #input_player1_b_btn = “4”
    #input_player1_select_btn = “2”
    #input_player1_start_btn = “5"
    #input_player1_up_axis = “+0"
    #input_player1_down_axis = “-0"
    #input_player1_left_axis = “-1"
    #input_player1_right_axis = “+1"
    #input_player1_a_btn = “3”
    #input_player1_l_btn = “0”
    #input_player1_r_btn = “1”
    
    #input_enable_hotkey_btn = “2”
    #input_exit_emulator_btn = “5”
    
    #input_player2_joypad_index = “1”
    #input_player2_b_btn = “4”
    #input_player2_select_btn = “2”
    #input_player2_start_btn = “5”
    #input_player2_up_axis = “+0"
    #input_player2_down_axis = “-0"
    #input_player2_left_axis = “-1"
    #input_player2_right_axis = “+1"
    #input_player2_a_btn = “3”
    #input_player2_l_btn = “0”
    #input_player2_r_btn = “1”
    

    The Xin-Mo….cfg file (from the configuration I did in Retroarch of player 1) gives me this:`input_device = Xin-Mo Xin-Mo Dual Arcade
    input_driver = udev

    input_player1_joypad_index = 0
    input_player1_b_btn = 4
    input_player1_select_btn = 2
    input_player1_start_btn = 5
    input_player1_up_axis = +0
    input_player1_down_axis = -0
    input_player1_left_axis = -1
    input_player1_right_axis = +1
    input_player1_a_btn = 3
    input_player1_l_btn = 0
    input_player1_r_btn = 1
    `
    I’m a question mark at this point. Sorry for troubling you guys!

    #93676
    Profile photo of TorVaga
    TorVaga
    Participant

    I guess I would have tried a fresh install of the image to see if you can have a corrupt file or something. What img of Retropie do you use btw?

    #93678
    Profile photo of feederchain
    feederchain
    Participant

    Is the first set of mappings exactly as seen in the cfg file? As in, are the #’s there? They shouldn’t be. You have to remove those.

    So both sets should probably look the same as what you pasted as working except

    input_player2_joypad_index = 1

    You can use jstest to figure out which button is which to map to the button in retroarch. But if you say that the uncommented button map works for player 1. Player 2’s should match.

    #93686
    Profile photo of TorVaga
    TorVaga
    Participant

    Sorry, I noticed that the #’s where there, but they weren’t when I tried the setup. Regarding the jstest I have the same number on the buttons on both players, except p1 @ js0 and p2 @ js1. And the same axis on the joysticks.
    I’ll have another go at it tomorrow and look at that code you pointed out now.

    Is the first set of mappings exactly as seen in the cfg file? As in, are the #’s there? They shouldn’t be. You have to remove those.

    So both sets should probably look the same as what you pasted as working except

    input_player2_joypad_index = 1

    You can use jstest to figure out which button is which to map to the button in retroarch. But if you say that the uncommented button map works for player 1. Player 2’s should match.

    #93723
    Profile photo of TorVaga
    TorVaga
    Participant

    Yay. Finaly got it! (Atleast ingame in emulators)

    
    input_player1_joypad_index = 0
    input_player1_b_btn = 4
    input_player1_y_btn = 0
    input_player1_select_btn = 2
    input_player1_start_btn = 5
    input_player1_up_axis = +0
    input_player1_down_axis = -0
    input_player1_left_axis = -1
    input_player1_right_axis = +1
    input_player1_a_btn = 3
    input_player1_enable_hotkey_btn = 2
    input_player1_exit_emulator_btn = 5
    
    input_player2_joypad_index = 1
    input_player2_b_btn = 4
    input_player2_y_btn = 0
    input_player2_select_btn = 2
    input_player2_start_btn = 5
    input_player2_up_axis = +1
    input_player2_down_axis = -1
    input_player2_left_axis = -0
    input_player2_right_axis = +0
    input_player2_a_btn = 3
    input_player2_enable_hotkey_btn = 2
    input_player2_exit_emulator_btn = 5
    

    I had to swap player_2 axis +0/-0 and +1/-1. And I removed all the “quotes”
    Out in Emulationstation my player 2 joystick register up and down as left and right. Can this just be the wiring?
    Last question regarding the buttons: Anyone got a clue how to map the “Select 1 player” and “Select 2 player” buttons?
    Edit:
    It was just my wiring on the one controller I was sure I had wired correct =) So now all of my controls work as the should. Thanks again for all the guiding Feederchain!

    • This reply was modified 1 year, 11 months ago by Profile photo of TorVaga TorVaga.
    #93776
    Profile photo of feederchain
    feederchain
    Participant

    If you only had to swap the axis on one of the controllers that would sound like a wiring issue. Especially if it works correctly in in the emulators and not ES. That sounds like setup is correct in one and not the other.

    As for your other buttons. I don’t know know why they wouldn’t map as the others. If you see them in jstest, you should be able to map them to a retroarch input.

    #94014
    Profile photo of TorVaga
    TorVaga
    Participant

    As for the other buttons, I mean what I should “call” them. To get them assigned to selecting 1player and 2player inside emulators.

    If you only had to swap the axis on one of the controllers that would sound like a wiring issue. Especially if it works correctly in in the emulators and not ES. That sounds like setup is correct in one and not the other.

    As for your other buttons. I don’t know know why they wouldn’t map as the others. If you see them in jstest, you should be able to map them to a retroarch input.

    #94051
    Profile photo of feederchain
    feederchain
    Participant

    I thought they were assigned to the start or select buttons. I haven’t tried to use mame yet though so I can’t say with any certainty.

    #96207
    Profile photo of ekdor
    ekdor
    Participant

    Will give this Kernal a shot. I’ll also try justest. I used evtest earlier, is that the same thing? How to you tell what model Xin-Mo you have. Mine has no markings on it and it wasn’t identified as a Xin-Mo in the evtest detection. Was listed as something like USB Controller Adaptor…

    #96212
    Profile photo of ekdor
    ekdor
    Participant

    The latest kernel “custom_kernel_1.20150317-1.tar.gz” I could find here on downloaded 132k

    Sorry my fault.

    • This reply was modified 1 year, 11 months ago by Profile photo of ekdor ekdor.
    #96215
    Profile photo of ekdor
    ekdor
    Participant

    @ feederchain Once again you are a hero. You fixed that damn mess of a USB interface! Indebted to you mate!

    #96636
    Profile photo of irmanezirevic
    irmanezirevic
    Participant

    Hi guys, could you help me here:
    http://blog.petrockblock.com/forums/topic/help-with-usb-controllers/#post-96632

    I have used your topic here with success and the player 1 controllers are working. And also have js0 and js1 when running dev/input.

    But i just can’t seem to get player two to work 🙁

    #96773
    Profile photo of podge8676
    podge8676
    Participant

    hey feederchain great post but im a total noob i copied ur kernel to my pi but when i type in the first command it gives me an error no such file or directory thanks in advance
    regds podge

    #96774
    Profile photo of ekdor
    ekdor
    Participant

    Not sure if it’s the same message. But I had an issue with the zip file. So I expanded it and copied the directory to the /home/pi/ directory and used these commands.

    cd custom_kernel_1.20150317-1
    sudo ./install.sh

    by default the terminal is in /home/pi which is represented by the tilde symbol ~ so you only have to cd into the directory you copied into the pi directory. Check the directory name matches the command. Rename it to make easier if you need to.

    Hope that helps.

    – Amendment – Also note that there are two version of the kernel posted in this thread. The second more up-to-date one is on page two of this thread and matches the name in the command above.

    • This reply was modified 1 year, 10 months ago by Profile photo of ekdor ekdor. Reason: added info
    #96776
    Profile photo of podge8676
    podge8676
    Participant

    hey ekdor
    cheers for reply got it sorted my problem i had the kernel in another folder in retropie so i just moved it to retro pie and then went through feederchains instructions also where the (tar xf) was i was putting in tar -xf but its working great now thanks feederchain

    #96778
    Profile photo of ekdor
    ekdor
    Participant

    Great to hear!

    #96792
    Profile photo of feederchain
    feederchain
    Participant

    Sorry I haven’t been able to jump on these as fast as in the past. It’s been a couple exhausting days. But it looks like others have me covered!! Thanks everyone!

    #96808
    Profile photo of irmanezirevic
    irmanezirevic
    Participant

    Can anyone help me with this one PLEASE:
    http://blog.petrockblock.com/forums/topic/help-with-usb-controllers/#post-96632

    Have hit rock butom, and have no idea how to move on…

    #97368
    Profile photo of kevinm
    kevinm
    Participant

    Just posting to give thanks to feederchain for this fix.

    I was having issue with the RPi recognizing 22 buttons but only 2 axes, so both joysticks controlled the same player. This fixed that by splitting the controls so that RPi sees the Xin Mo as to separate joypads: #1 – 2 axes and 10 buttons, and #2 – 2 axes and 12 buttons.

    #97870
    Profile photo of gooz74
    gooz74
    Participant

    Hello,

    thanks to the patch I can now see the joystick with 4 axes instead of 2 but still I can’t manage to get the second player to play in FBA games.
    I mapped the buttons in fba2x.cfg as they appear in jstest.
    I can’t see what I did wrong

    [Joystick]
    # Get codes from “jstest /dev/input/js0”
    # from package “joystick”
    A_1=0
    B_1=1
    X_1=2
    Y_1=3
    L_1=4
    R_1=5
    START_1=7
    SELECT_1=6
    #Joystick axis
    JA_LR=1
    JA_UD=0
    #player 2 button configuration
    A_2=10
    B_2=11
    X_2=12
    Y_2=13
    L_2=14
    R_2=15
    START_2=17
    SELECT_2=16
    #Joystick axis
    JA_LR_2=3
    JA_UD_2=2

    #98153
    Profile photo of chillimonster
    chillimonster
    Participant

    Just done the patch on a machine a friend has built,

    Without the patch it sees the Xin-Mo Dual as two inputs, but with the autofire bug. After the patch the autofire is sorted, but only one set of controls works.

    Any ideas?

    #98155
    Profile photo of ekdor
    ekdor
    Participant

    Did you download the second patched kernel? There is an updated one on page two of this thread.

    #98157
    Profile photo of chillimonster
    chillimonster
    Participant

    DOH!

    Missed that one.

    Will give it go now.

    Thanks

    #98159
    Profile photo of ekdor
    ekdor
    Participant

    Hope it helps

    #100045
    Profile photo of hijinksensue
    hijinksensue
    Participant

    I applied Feederchain’s 2nd updated custom kernel patch and it totally fixed all the problems I was having with my Xin-Mo (actually THT THT) usb 2 player set up.

    I used it for about 2 weeks, then turned off my Retropie arcade for a week while I was on vacation. When I got home, the custom kernel had reverted to the original and the 2 player controls behaved like one giant player one controller again.

    I reapplied the patched kernel and everything is fine again. Does this make any sense at all? Is there anyway that powering down the RasPi for a week could undo this kernel patch? Did I not use significant enough privileges when I applied it? Any help would be appreciated.

    #100046
    Profile photo of feederchain
    feederchain
    Participant

    No that doesn’t really make any sense. Did you run an apt-get update or anything? I know that if a new kernel shows up it will most likely overwrite this one. I haven’t run an update since I installed, and have had my PI on and off since. Possibly even there being a two week stretch without it on. But can’t say for sure.

    Definitely odd if you didn’t update, because I don’t think there is an auto update.

    #100047
    Profile photo of hijinksensue
    hijinksensue
    Participant

    Thanks for the reply. I don’t remember doing an apt-get update before shutting it off, but it’s entirely possible that I did. I’m going to turn it off and kill the power to the power strip tonight and see how it behaves tomorrow.

    2 questions:

    1) Should I NOT being running apt-get update any more? Will that kill the patched kernel?

    2) Is there any chance of getting this patched kernel built into the main release of Retropie?

    #100048
    Profile photo of feederchain
    feederchain
    Participant

    It’s usually ok to update. The issue is when a new kernel is released. Since I got my PI to where I wanted it, I didn’t really have a need to compile the changes in to the latest kernel.

    I will try and take the time in the next day or so to recompile a new kernel and post it here.

    As for getting this code patched in… I don’t really have an answer for that. I’m not associated to the project at all. I assume someone that is would have to evaluate the changes and decide.

    The directional pad issue was because of non-compliant hardware so that might be a stretch to get it in. The second “rapid fire” issue did turn up because of a fix to something. Do recall what it was off the top of my head.

    #100109
    Profile photo of feederchain
    feederchain
    Participant

    OK, so it looks like an apt-get update does update the kernel and mess with this. My custom kernel above is 3.18.7. I did a new compile and it’s now 3.18.9.

    https://www.dropbox.com/s/l96mgbsc2r8b7wf/custom_kernel_1.20150619-1.tar.gz?dl=0

    I did notice something interesting though. Before I tried my new kernel, I noticed that the “auto-fire” issue appears to have disappeared from the vanilla kernel. So there might only be the issue with directional pad left. Which may not get fixed because of non-compliance. I’ll have to try to see if one of the patches can be removed.

    Anyway, the above should be the latest and work for you.

    #100117
    Profile photo of ekdor
    ekdor
    Participant

    Thanks for that!

Viewing 35 posts - 71 through 105 (of 278 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar