Jump to content
LaunchBox Community Forums

lfan

Members
  • Posts

    110
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by lfan

  1. 2 hours ago, JoeViking245 said:

    Thanks for clarifying what doesn't work.

    Tested with the Back button (7) and that worked as well for me.  But if in MAME, Coin 1 is set to "5 or Joy 1 Back" the script won't work to limit it to 5 credits.  Setting it without 'Joy 1 Back' did work to limit it.

    1. If you used the keyboard to enter credits then start the game, will either Xinput controllers work to play the game (move, shoot, run, jump...)?
      • If not, make sure the controller is ON before starting MAME. 
        • Since you were able to set 'Joy 1 Back', I assume they do work in-game
        • But even then, when you had it at "Coin 1 - 5 or Joy 1 Back", if it didn't accept a coin, then there's likely a controller [type] issue.
    2. Did you add to the top of the script "SetKeyDelay, 125, 50 " (without quotes)?
      • Without this line at the top, the script won't work.
        • But again, when you had it at "Coin 1 - 5 or Joy 1 Back", regardless of the script, it should still accept a coin using the Back button.

    Beyond that, I'm at a loss as to why it doesn't accept the Coin input for either of your Xinput controllers.

     

    Only one xinput controller (XBOX360) connected before stating a MAME game.
    SetKeyDelay, 125, 50 on the top of the script.

    - "Coin 1 - 5 or Joy 1 Back": I can insert credits (unlimited) (keyboard/joystick) and play (keyboard/joystick).
    - "Coin 1 - 5": I can insert credits (unlimited) (keyboard only) and play (keyboard/joystick).

    The most important for me is that the script is working for Arcade Joystick. You helped me alot. Thank you very much.

    • Game On 1
  2. 9 hours ago, JoeViking245 said:

    Still curious... What exactly isn't working for you?  Can you add ANY credits? Can you add 5?  Does it add a 6th one if you attempt to do so?

    Regardless, that might be your problem.  It's highly recommended to use stand-alone MAME for... well, MAME.  I've heard that controllers can have issues when using the RA core.  I've never personally tested it because I don't (and more-than-likely won't) use RA and its MAME core.

    Nothing personal, but no.  Maybe someone else can chime in and test it via RA.

    Test Result:

    dinput Arcade Joystick (Select Button, 1Joy9)
    dinput RetroFlag Controller (Select Button, 1Joy7)

    MAME (stand-alone): Works!*
    * Standard settings.
    MAME (RA): Works!*
    * Had to change in MAME "Coin 1 - 5 or Joy 1 SELECT" to "Coin 1 - 5".

    xinput Microsoft Xbox 360 Wireless Controller (Back Button, 1Joy7)
    xinput RetroFlag Controller (Back Button, 1Joy7)

    MAME (stand-alone): Doesn't Work*
    * Even changing in MAME "Coin 1 - 5 or Joy 1 Back" to "Coin 1 - 5".
    MAME (RA): Doesn't Work*
    * Even changing in MAME "Coin 1 - 5 or Joy 1 SELECT" to "Coin 1 - 5".

    Something related to dinput and xinput?

  3. 51 minutes ago, JoeViking245 said:

    Yes.  Added the script to the Running Script section of my MAME emulator.  Using a wireless Xbox 360 controller.  Launched "1942".  Once loaded, pressed "Start" on the controller (my 'button 8').  Pressed it 5 times with a slight pause between each press (for the Sleep, 750).  Got to 5 credits.  Pressed Start again... nothing. No more credits.

    What exactly isn't working for you?  Can you add ANY credits? Can you add 5?  Does it add a 6th one if you attempt to do so?

    Could you test the script with Launchbox + MAME core (RetroArch)? Keyboard scripts work with MAME core.

  4. 33 minutes ago, JoeViking245 said:

    I [actually just now] tested the script as you have it.  It's pressing 5 twice.  Then when coin1 = 5, is still presses five, but only once.  

    Instead of messing with the joy buttons, just have it do what it is we want it to do.

    SetKeyDelay, 125, 50 
    1joy8::
    {
       if (coin1 = 5)        ; Max 5 coins
          Return
    
       coin1++
       Send, 5
       Sleep 750
    }

     

    Unfortunately, it still doesn't work. Have you tested with any joystick?

  5. 8 minutes ago, skizzosjt said:

    This works for me, which is exact same syntax. I just don't have dinput controllers to test with. I don't see why it wouldn't work with a controller button?

    5::
    {
       if (coin1 = 5)        ; Max 5 coins
          Return
    
       coin1++
       5::5
       Sleep 750
    }

     

    For keybord it works perfectly. The mystery is with joystick.

  6. 13 minutes ago, JoeViking245 said:

    Ah ya. You can't assign a joy output.  You can only read its input.

    In MAME, revert your Coin 1 to Kbd 5.  Then this might work.

    1Joy8::
    {
       if (coin1 = 5)        ; Max 5 coins
          Return
    
       coin1++
       1Joy8::5
       Sleep 750
    }

     

    There is no error, but the script does not limit to 5 coins... 😩

  7. 5 minutes ago, JoeViking245 said:

    I thought you were just wanting to configure it MAME.  JOYCODE_1_SELECT is MAME lingo. 

    Did it work to replace the number with 8?  Though I doubt it's a literal "8".  May try 1Joy8   Which is player-1 joystick, button 8.

    1Joy8::
    {
       if (coin1 = 5)        ; Max 5 coins
          Return
    
       coin1++
       1Joy8::1Joy8
       Sleep 750
    }

     

    Error at line 10.

    Line Text: 1Joy8
    Error: This line does not contain a recognized action.

    The program will exit.

  8. 38 minutes ago, JoeViking245 said:

    When assigning the inputs in MAME, you should be able to just highlight Coin 1, press enter (it'll wait for your 'input') then press the button on the controller to select it.

    Joy 1 SELECT on MAME screen. JOYCODE_1_SELECT in MAME file.

    In the code, I tried to replace the number 5 to JOYCODE_1_SELECT but it didn't work. It seems that the code only accepts numbers.

  9. On 1/15/2022 at 3:01 PM, JoeViking245 said:

    "Q" seems like an odd key assigned to inserting a coin. But who am I to knock it?

    MAME's default coin inputs for players one thru four are keys 5, 6, 7 and 8, respectively.

    image.png.9d11eaaca6b573a385df5b617d458616.png

    Here's coin 1 and 2 (per MAME keyboard assignments) to get you started.  Study it carefully and YOU can add coin 3 & 4 (or change it back to "Q" and whatever ;)).

    global coin1 := 0
    global coin2 := 0
    
    ; Player one coin input = "5"
    5::
    {
       if (coin1 = 5)        ; Max 5 coins
          Return
    
       coin1++
       5::5
       Sleep 750
    }
    
    ; Player 2 coin input = "6"
    6::
    {
       if (coin2 = 5)
          Return
    
       coin2++
       6::6
       Sleep 750
    }

    Copy this into the Running [AutoHotkey] Script section of your MAME emulator and limit those little hoodlum's allowance (at least until they learn they can exit, then restart the game with 5 more quarters. lol).

    JoeViking245, how configure the joystick's "select" button for coin?

  10. I have my MAME roms in two folders, because I have specific config in RetroArch: Horizontal and Vertical.

    With the method Import > ROM File, the LaunchBox don't import all games. Same problem as the previous version.

    With the method Import > MAME Arcade Full Set, the LaunchBox import much more games, even games that I don't have.

    The LaunchBox accept only folder contain the full set?? What is the solution?

    Thanks!

  11. 13 minutes ago, Kondorito said:

    Do you mind sharing the names of the missing ones (I would like to check them on my end to see if they were imported or missed as well)? What happens when you try drag and dropping one of the not imported zip files individually into LB?

    When I imported MAME I had a decreased number of games in LB compared to my folder containing the zips, but it was because a lot of games got combined into the same one. If you are testing with your MAME list and dont mind messing with it, try selecting all the games from the list, right click, and expand; see if that reaches to the same number as your zip files. 

    Olá, @Kondorito!

    Eu não sei o nome dos jogos que não foram importados. Poderia ser mostrada uma lista com o que não foi importado.

    Usei o front-end Emu Loader (muito bom!) para filtrar minhas roms (split) e copiá-las para as pastas horizontal e vertical. Só há roms que funcionam e originais (não-clones). Quando as importo para o Launchbox, desmarco todas as opções de filtro e deixo marcada a opção de importar tudo, mas, mesmo assim, não funciona.

    Minhas roms são 0.198.

    Obrigado!

×
×
  • Create New...