Other Projects

[HowTo-V4.5] DIY Arcade Kiosk - RetroArch (0.37b5 iMAME4all, SNES) on ArchLinux

91 54547
I have a few questions; I intend to build a MAME machine as you've demonstrated above - beautiful work, by the way! - and have spent countless hours trying this-MAME-Pi-image and that-image, multiple painfully long compiling sessions, and nothing has worked right except running MAME on Android (which I'd rather not do for a cabinet as I can't figure out how to boot straight into the emulator) and your image.

Your image is the only one that's worked on my Banana Pi as far as actually emulating games goes, except I have a few issues. Firstly, I don't have sound on HDMI nor through the jack... ALSAMixer says it's using the jack port but no sound comes through (I tried the one audio file snippet on the system through whatever media player and I tried 1942 I believe in MAME) either way. I tried a fix online for the sound where you were supposed to change something in /boot/config.txt but the file doesn't exist, even when showing hidden files, nor was there any kind of text editor to edit it with if it was there (did Arch Linux come without a text editor)?

Also, the keyboard layout is Italian (I assume as Google came up as the Italian version?) and I'm in America; I have no idea for the life of me how to change that to my locale. Do you know?

I'd like to note I'm running the image on the very top of the thread, not sure if you've made any updates in replies further down or anything that I need?


Gaveroid replied at Sun Jan 18, 2015 02:52
I have a few questions; I intend to build a MAME machine as you've demonstrated above - beautiful wo ...

To change the keyboard layout, check the scripts folder in /home/bananapi
There should be one script that sets the layout with 'setxkbmap it' change this to 'setxkbmap us' (or remove it entirely)

Don't have the Pi here to check the script used, but it should be obvious which one to edit.

Gaveroid replied at Sun Jan 18, 2015 02:52
I have a few questions; I intend to build a MAME machine as you've demonstrated above - beautiful wo ...

It's possible I've forced the keyboard layout on boot.
Check the content of this file:
  1. /etc/xdg/lxsession/LXDE/autostart
Copy the Code
Maybe there you'll find:
  1. @setxkbmap it
Copy the Code
Delete it or set it from 'it' to 'us'.

About the audio it's strange, because it works on me without problems. I'll look at home some settings.

Let me know!


xefil replied at Thu Jan 22, 2015 07:14
It's possible I've forced the keyboard layout on boot.
Check the content of this file:Mayb ...

Sorry about the long time to reply, got caught up in some stuff and strayed from my project.

I'll try reinstalling the image and take a look; I'm using the standard, original Banana Pi with HDMI video and audio, just making that clear.

As for the keyboard, I'll try that... thanks!


Alrighty... reflashed the image. Audio now works but it's using the sunxi-codec I believe (not HDMI audio as I wanted, but I'm gonna go with an old-school CRT and speakers in my cabinet). Now I've just gotta change the keyboard layout.

I feel stupid now....


Edited by Gaveroid at Mon Jan 26, 2015 22:51

Okay; I tried changing the keyboard layout and ran into a bunch of issues. Number one, there's no text editor on there, so I had to (attempt to) use VI in the terminal, of which I couldn't save and quit because the required keys weren't on the layout (or at least didn't show in Florence).

I had to transfer it to my PC (through Google Drive as my USB stick wouldn't auto-mount and I briefly attempted to mount it through terminal which wouldn't work) and edit it there. :/

When I removed the line, the GUI no longer loaded. A quick look at the file told me that the last line, although existant, was empty therefore causing the whole file to be disregarded. I reflashed from my backup made just before I did that change, and fixed the autostart without any empty lines. That fixed it.

Next thing I did was get RetroArch to launch at boot. The command that the desktop shortcut executes is...
bash /home/bananapi/scripts/retroarch_start.sh

...which loads the startup script (sh). I added a @ to the beginning and put it onto the last line of the autostart file so RetroArch launches on boot.
@bash /home/bananapi/scripts/retroarch_start.sh

Another issue; RetroArch's audio is funky. I forget how, but messing around in the audio settings helped the skipping. Furthermore, although most games run at a playable framerate, is there any way at all (other than with overclocking) to improve the quality of graphics, maybe add some filters, etc., to make it look and run better?

Now with RetroArch launching on boot, all I have to do is build my cabinet and put some more games on there.

However, (and I could make a seperate thread for this if you guys would rather do that) I'd like to add a bit more to it. For example, I'd like to make it so the desktop environment is unseen between the transition from frontend to emulator, but so that I can exit RetroArch and still get to the desktop for maintenance easily. A possible fix is another idea I made; what's a good, highly customizeable media center? I'd like to run a media center app in the background for playing music. I say highly customizeable so I can hide all parts of it I don't want to see and add a RetroArch shortcut smack dab in the main menu. This way, I can listen to music while playing games, etc., all from a nice GUI (compatible with controllers). If I wanted, I could even take this image and put it on another BPi connected to a TV, say. Not full-on media center, but you get my point. Might be just a far-fetched fantasy for my abilities (and attention span, LOL) but I wonder if any of you guys have implemented a similar system possibly in your cabinets and have an idea. I can handle the launching from startup, but any ideas for a program? I have no coding knowledge (other than some slight HTML) so making a program is out of the question.


EDIT: Upon resizing the partion (using THIS tutorial: https://raspberry-hosting.com/en ... inux-root-partition ), I reboot only to find my programs menu at the bottom left empty. Everything else seems functional; I can open programs from the terminal, and RetroArch loads at startup as usual. Why is this happening, second time it's happened after resizing?


I installed EmulationStation using your instructions but when i start it, it crashes:
  1. [bananapi@lemaker ~]$ emulationstation
  2. Creating config directory "/home/bananapi/.emulationstation"
  3. libGL error: MESA-LOADER: malformed or no PCI ID
  4. libGL error: dlopen /usr/lib/xorg/modules/dri/mali_drm_dri.so failed (/usr/lib/xorg/modules/dri/mali_drm_dri.so: cannot open shared object file: No such file or directory)
  5. libGL error: unable to load driver: mali_drm_dri.so
  6. libGL error: driver pointer missing
  7. libGL error: failed to load driver: mali_drm
  8. terminate called after throwing an instance of 'std::logic_error'
  9.   what():  basic_string::_S_construct null not valid
  10. Aborted (core dumped)
  11. [bananapi@lemaker ~]$
Copy the Code
Part of the error message is also displayed when i open chromium via console (it does start tho)
I believe it is some sort of mali driver error.

What did you do to fix it?


Edited by Felix3008 at Thu Feb 5, 2015 16:08

Nevermind, i got EmulationStation to work (under x11). The issue was that EmulationStation defaults to desktop OpenGL if it is enabled in SDL2. So i had to recompile SDL2 without OpenGL Support:

(The script is untested but should give an idea of what i did to get it working

  1. #Remove the old SDL2 while ignoring dependencies
  2. sudo pacman -Rdd sdl2
  3. #download and extract the SDL2 source
  4. wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz
  5. tar zxvf SDL2-2.0.3.tar.gz
  6. #Make the build enviroment
  7. mkdir SDL2-2.0.3/build
  8. cd SDL2-2.0.3/build
  9. #Rename the GLES2 directory to avoid conflict between GLES and GLES2
  10. sudo mv /usr/include/GLES2 /usr/include/GLES2disabled
  11. #Configure, make, install
  12. ../configure --enable-video-opengl=no
  13. make -j4
  14. sudo make install
  15. #The install processs installs SDL2 to the wrong directory
  16. #So we need to manually link it to the correct place
  17. cd /usr/lib
  18. sudo ln -s -f /usr/local/lib/libSDL2-2.0.so.0.2.1 libSDL2-2.0.so.0
  19. #Cleanup
  20. sudo mv /usr/include/GLES2disabled /usr/include/GLES2
Copy the Code
I am currently trying to get the fbdev driver (Link) to work, but i'm having some trouble building it.
When i'm finished i am going to build some more libretro cores and upload an updated image (only with your permission, of course).


Sure Felix. Feel free to share your work. My is only a start point. In these days I was not able to update the image.
In fbdev it works much better and smoother. There are some issues with regaining the focus when terminating a game. It's up to switching between fbdev and back to x11.
@Gaveroid: the audio works almost well on my b-pi. strange. I'll double check it. About your Desktop Env I'll test some solutions as well. I'll let you know.



Nice work guys. I have one question though. Is it possible to get hardware accelleration without x11 or is this the Framebuffer method? As far as I know framebuffer is exactly for that.

You have to log in before you can reply Login | Sign Up

Points Rules