Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Need HELP - My first Pi3 build using an iPac2  (Read 420 times)

0 Members and 1 Guest are viewing this topic.

ssdesigner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:October 24, 2020, 11:09:39 pm
  • I'm a llama!
Need HELP - My first Pi3 build using an iPac2
« on: October 09, 2020, 06:32:23 pm »
Look familiar?



So I'm learning this as I go. I was successful in mapping buttons to my ipac2 as far as them being correct in winiPac. That looks something like this:



Also added a safe shutdown button via the GPIO pins and a little code....but I just tried to edit the retroarch.cnf file and it went nuts. Loading a game would bring up the splash screen image and then a completely different game would start. I should have backed up the image before messing with the cfg file.....re-flashing original image now. :/

There are SO many blogs, websites, etc etc telling me how easy it should be to map the iPac2 and then just fire up retropie and go. I'm not finding that to be the case. I plug in the iPac and it doesn't prompt me to do anything with controls. Is that because I have a normal keyboard plugged in as well?
« Last Edit: October 09, 2020, 07:03:48 pm by ssdesigner »

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2659
  • Last login:October 26, 2020, 07:20:48 pm
  • Back from the dead.
Re: Need HELP - My first Pi3 build using an iPac2
« Reply #1 on: October 11, 2020, 11:21:22 pm »
Are you using a RetroPie image downloaded from here? If so EmulationStation should start automatically at boot. If RetroPie is installed, but EmulationStation is not automatically booting, run emulationstation at the command prompt. Then you'll use EmulationStation to handle the rest of the control configuration. 

From the EmulationStation docs:

Quote
When you first start EmulationStation, you will be prompted to configure an input device. The process is thus:
  • Hold a button on the device you want to configure. This includes the keyboard.
  • Press the buttons as they appear in the list. Some inputs can be skipped by holding any button down for a few seconds (e.g. page up/page down).
  • You can review your mappings by pressing up and down, making any changes by pressing A.
  • Choose "SAVE" to save this device and close the input configuration screen.

It doesn't matter that you have a keyboard plugged in as well as the iPac. That is normal.

The blogs all assume that you have installed RetroPie, and that EmulationStation is automatically launching at boot. If that's not the case, then you'll have to launch it yourself and then make your configurations. You shouldn't *need* to edit any configuration by hand just to manage the basics. There *are* lots of things that I end up tweaking manually, but little of it has to do with actually running emulators.

If you're not running a RetroPie image and have some other kind of setup, let me know.
« Last Edit: October 11, 2020, 11:25:48 pm by mahuti »
Formerly known for the (apparently now defunct) arcadeartlibrary

ssdesigner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:October 24, 2020, 11:09:39 pm
  • I'm a llama!
Re: Need HELP - My first Pi3 build using an iPac2
« Reply #2 on: October 12, 2020, 05:55:48 am »
Thanks Mahuti!

I'm running an official image, and I did the sudo updates to it as well. I changed a lot of the button mapping in WiniPac, and then edited the config file before plugging the joystick/button controller setup into the Pi. It never gave me the prompt to set up as new, but I'm guessing that's because it just assumed it was the keyboard I had plugged in from before? Now that I'm typing this I wonder if I should SSH in and erase all previous controllers?

Anyways, the config edits took just fine. However I didn't have buttons named as "a" or "b" after I remapped everything, and so the main retropie screen functions didn't work. So, I went back and made sure I had some of those basic buttons called out and, for the most part, I have the basics all up and running. SNES recognized both 1 and 2 player joysticks and they worked. MAME let me add 2 player coins but the joystick and buttons for player 2 didn't respond. So, more tweaking needed there.

The two things that I need help on are these:

1) I am lost when it comes to what I should be doing to make sure load state/save state work with my setup. I don't even know if they are still programmed but I messed them up when I remapped? Where would I look for these?

2) I have 6 buttons along the front panel of my cab. I wanted to make quick work (and make it easier for visitors coming over that I didn't want to explain shortcuts to) of at least two functions in retroarch. Here is that front panel. Right now, the pause button works pretty flawlessly because of this line of code: input_pause_toggle_btn = "p"

But the escape button doesn't do anything. I wanted it to basically act as a "back out" or "quit out of emulator" button. I added these lines of code but they didn't change anything:

input_enable_hotkey = "escape"
input_exit_emulator = "escape"


mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2659
  • Last login:October 26, 2020, 07:20:48 pm
  • Back from the dead.
Re: Need HELP - My first Pi3 build using an iPac2
« Reply #3 on: October 14, 2020, 11:57:31 pm »
1. You shouldn't need the WinIPAC utility at all to set up a Raspberry Pi. You can remap whatever you need using RetroArch's RGUI. I have never had much luck doing any manual edits to RetroArch's inputs... it always ends up in tears. These days, if I can't find an option for it in RGUI, I'll make the change manually, but I keep a change log so I can get back to where I was before I screwed stuff up.

To access RGUI:
Quote
Entering the menu

    By default on PC, the F1 button will enter the menu.
    To exit the menu, use F1 or Resume Game.
    To start immediately in RGUI without any game or core loaded, use the --menu command line option. As a special case, if no arguments are received, it is treated the same as running retroarch --menu.

Menu toggle button can be mapped to joypad as well, see option input_menu_toggle option in retroarch.cfg.

There's some kind of ctrl + somethingsomething hotkey that I can never remember to enter RGUI too. If F1 doesn't work for you, you can try searching a bit.

To configure input in RGUI: https://docs.libretro.com/guides/rgui/#configuring-input

2. Regarding the single button to exit issue. Ugh. This is one thing that I freaking loathe about RetroArch. RA is obnoxiously built around a PlayStation style controller rather than a panel with dedicated controls. Why can't they just add "single_button_to_exit_button=escape"?  :censored: So stupid... anyway...

Quote
I added these lines of code but they didn't change anything:

input_enable_hotkey = "escape"
input_exit_emulator = "escape"

Did you add those to every single emulator's cfg file that you intend to use? For whatever idiotic reason, this kind of thing has to be added to every emulator's config file, rather than in the main retroarch config file. In my case i disabled hotkeys set it to "nul" (null with one L)  and just have whatever I need assigned to a dedicated key.



Formerly known for the (apparently now defunct) arcadeartlibrary

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2659
  • Last login:October 26, 2020, 07:20:48 pm
  • Back from the dead.
Regarding Control Configuration of Exit Keys in RetroArch
« Reply #4 on: October 15, 2020, 05:34:55 pm »
With regard to exiting RetroArch.

For one of my own machines, I had to go through this process again of setting up a cabinet to work with Retroarch. It took me a bit to figure it out myself again, and like always it was pretty annoying. A lot of the articles and forum posts on control setups are oriented around new setups, rather than existing setups. Going through my own system pretty thoroughly, this is what i observed.

Configurations for controls are handled from most specific to least. So... game configurations are loaded first > then controller > then emulator > then retroarch. These all have to be cleared out of existing junk.

RetroArch does not offer a sweeping ONE EXIT KEY TO RULE THEM ALL. To create a single exit key, you will have to remove or change every single configuration that already exists with regard to hot keys and exit keys.

You can't just put the behavior for exiting in RetroArch's main configuration file (at the time of this writing) it has to go in each emulator as well.

This is the process I used to set up the exit key for my cab.

Configure keyboard hotkey behaviour for RetroArch. By setting it to use NO hotkey, it will remove hotkey default and set the "escape" key to automatically launch RGUI menu. Because "escape" is the normally the default emulator exit key, you will likely need to remap the exit key to something besides "escape" uless you've already done so. In my case, I use the "space" key.
 
1. sudo sh ~/RetroPie-Setup/retropie_setup.sh
2. Open Configuration/Tools -> RetroArch
3. Configure Hotkey behavior
4. Set it to no hotkey
5. Edit the following files: `/opt/retropie/configs/all/retroarch.cfg`, `/opt/retropie/configs/EACH_OF_YOUR_CONFIGURED_EMULATORs/retroarch.cfg`, `/opt/retropie/configs/all/retroarch-joypads/YOUR_CONFIGURED_JOYPADS.cfg` and change any occurrence of `inpux_exit_emulator`, `input_exit_emulator_btn` to use a new escape key. I use `inpux_exit_emulator="space"`. Make sure to remove any variation of `input_exit_emulator`, `input_exit_emulator_btn`, `input_enable_hotkey`, `input_enable_hotkey_btn`. There may be options (like input_enable_hotkey_axis) make sure to remove all of them except those that you've added.

MAKE SURE YOU ALSO MAKE THIS CHANGE HERE IN THE ARCADE FOLDER: `/opt/retropie/configs/arcade/retroarch.cfg`

If you removed the hotkey, but have ever configured any hotkey+ buttons in your gamepads, make sure you remove the configured buttons from the gamepad-specific cfg files or things will go haywire.

7. if using picade x-hat, map your new escape key to be the "esc" key in the boot/config: I use dtparam=escape=57  #(thats the space key)

By the way, for future reference, if you want to change the key command for launching RGUI menu, it's this configuration option: input_menu_toggle = "tilde" (or whatever)
« Last Edit: October 15, 2020, 06:46:05 pm by mahuti »
Formerly known for the (apparently now defunct) arcadeartlibrary

ssdesigner

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 33
  • Last login:October 24, 2020, 11:09:39 pm
  • I'm a llama!
Re: Need HELP - My first Pi3 build using an iPac2
« Reply #5 on: October 18, 2020, 07:10:39 am »
Thanks again, Mahuti!

I ended up scrapping the image build I was trying to use and started over completely. Within 5 minutes I was up and running and, what do you know, I was prompted with the option of creating a hotkey. Why in the flying &^%@! did Retroarch never ask me about this before? I must have setup a keyboard/joysticks 10 times over the last several days and not once did it even ask about a hotkey. So frustrating.

So now everything seems to be good to go for the most part. Still not getting load/save states to work though. The default for these is hoykey+right shoulder and hotkey+left shoulder. Pressing these combos does nothing, so more work to go.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2659
  • Last login:October 26, 2020, 07:20:48 pm
  • Back from the dead.
Re: Need HELP - My first Pi3 build using an iPac2
« Reply #6 on: October 18, 2020, 05:10:15 pm »
Good luck with that. I never use them so can't be of any help there.  :dunno

Glad you got most of it sorted.
Formerly known for the (apparently now defunct) arcadeartlibrary