Author Topic: AM on Pi  (Read 19587 times)

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: AM on Pi
« Reply #15 on: July 26, 2015, 08:30:29 AM »
Slippy-

Here you go, I am actually posting this from my pi2. This config is for retroarch which is a lot more complicated than for a standalone  emulator. For a standalone emulator it will look something like the bottom example. Don't forget to use ./ when launching binary like in the examples. Also, for retorarch you need to create the configs for each libretrocore first. When I get the time I'm going to do a guide for it.

# Generated by Attract-Mode 1.5.1
#
executable           /opt/retropie/emulators/retroarch/bin/./retroarch
args                 -L /opt/retropie/libretrocores/lr-pocketsnes/libretro.so --config /home/pi/.config/retroarch/libretro.cfg "[romfilename]"
rompath              /home/pi/RetroPie/roms/snes
romext               .smc;.sfc;.srm;.zip
system               Super Nintendo (SNES)
info_source          thegamesdb.net
artwork    flyer           $HOME/.snes9x/boxart
artwork    marquee         
artwork    snap            /media/My Passport/media/snes/video
artwork    wheel           /home/pi/media/snes/Wheel
 

Example for standalone snes9x

# Generated by Attract-Mode 1.5.1
#
executable           /opt/retropie/emulators/snes9x/ ./snes9x
args                     "[romfilename]"
rompath              /home/pi/RetroPie/roms/snes
romext               .smc;.sfc;.srm;.zip
system               Super Nintendo (SNES)
info_source          thegamesdb.net
artwork    flyer           $HOME/.snes9x/boxart
artwork    marquee         
artwork    snap            /media/My Passport/media/snes/video
artwork    wheel           /home/pi/media/snes/Wheel
 
« Last Edit: July 26, 2015, 08:34:53 AM by omegaman »

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #16 on: July 26, 2015, 06:46:58 PM »
I think part of my problem is that I've ALWAYS hated it when applications have bits of themselves all over the place.  I want my app guts in a single location, damnit!

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #17 on: July 26, 2015, 07:56:53 PM »
Well now - this is new.  Got emulators working thanks to that config file, thank you!

But I'm getting a sounds issue.  AM starts up and there was a background hiss in the audio...  there should be silence.  The hiss stayed there even when running games.  I found some advice to put:

disable_audio_dither=1

into config.txt...  Well, that kinda fixed it.  At points where there should be no sound, there is no silence, no hiss.  But when there IS sounds, the background hiss is there, underneath the sound.  To the internet!!!

Oh yeah - I am seeing this behavior on 3 different Pis.  I've got a Model B and two Model B+, all show the same behavior.

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: AM on Pi
« Reply #18 on: July 26, 2015, 08:22:36 PM »
Yeah, I get the same hissing sound on my pi2 through the 3.5 jack.

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: AM on Pi
« Reply #19 on: July 26, 2015, 08:37:09 PM »
Straight from the raspbian forums about the issue using the audio jack. The second option kind of explains why there is hissing, cheap design. 

1. Add disable_audio_dither=1 to /boot/config.txt
2. Use an amplifier. The output is not meant to drive headphones directly.
3. Pick up a $7 USB audio adapter.
4. Pick up a $15 HDMI sound extractor.
 

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #20 on: July 26, 2015, 09:38:41 PM »
Quote
1. Add disable_audio_dither=1 to /boot/config.txt
Tried this - it only partially works.  Not acceptable.


Quote
2. Use an amplifier. The output is not meant to drive headphones directly.
Tried three separate sets of powered speakers.  Didn't make the slightest difference.


Quote
3. Pick up a $7 USB audio adapter.
Well, looks like I'll give this a try.  Off to Fry's Electronics!  Tomorrow, that is.

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #21 on: July 27, 2015, 01:48:00 PM »
Picked up a USB Sound Dongle, in theory it works with the Pi from what I've read.  Running into a problem though.  I'm following the instructions on this site:

http://computers.tutsplus.com/articles/using-a-usb-audio-device-with-a-raspberry-pi--mac-55876

and everything is there right up to step 6.  When I run "amixer" for the second time there are NO changes at all.  So it seems doing the previous steps didn't actually do anything.

I've also tried the instructions here:

http://plugable.com/2014/11/06/how-to-switch-to-usb-audio-on-raspberry-pi

With no luck, once again, the Pi is seeing the USB card, but not playing anything from it.  The gizmo works, I tested on my windows machine.  So it boils down to I can't get the Pi to shift the sound from the normal audio jack to the USB.
« Last Edit: July 27, 2015, 01:54:05 PM by slippyblade »

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #22 on: July 28, 2015, 01:03:09 AM »
I just can't win...  After arguing with the USB sound dongle I got curious and shoved a clean Raspbian onto a new card and tested.  Sound was fine through the normal jack.  So it looks like the extreme hissing I was getting was due to the Diet-Pi distro...

So I decided to try compiling AM on Raspbian following the instructions here:

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-(Rasbian-Wheezy)

Ran into a bit of a snafu with compiling SFML but that was fixed by "apt-get install libxrandr-dev" to install proper library.  But then when I got to actually run make on AM, it borked.

Code: [Select]
In file included from /usr/include/c++/4.6/backward/hash_map:61:0,
                 from extlibs/gameswf/base/container.h:75,
                 from extlibs/gameswf/base/tu_file.h:18,
                 from src/swf.cpp:26:
/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. [-Wcpp]
In file included from src/swf.cpp:33:0:
extlibs/gameswf/gameswf/gameswf_freetype.h:19:22: fatal error: ft2build.h: No such file or directory
compilation terminated.
Makefile:312: recipe for target 'obj/swf.o' failed
make: *** [obj/swf.o] Error 1

No clue what that means other than it didn't work...

So, is there a binary of AM available anywhere or is compiling the only way to get it?

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: AM on Pi
« Reply #23 on: July 28, 2015, 09:06:20 AM »
slippy-

I am running raspbian "wheezy" myself. After, trial and error I ended up following the same wiki you did with great success. I also had the same libxrandr dependency issue. So, Raygun probably needs to update his wiki.  But, I didn't get the compile error you're getting, so this is interesting.

FYI, for comparison I have the rpi2.  Here are the steps outside of the wiki that I performed if your interested.

raspi-config expand filesystem
raspi-config memory-split 192
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libav-tools "not needed if ffmpeg installed" I think...
sudo apt-get install ffmpeg "if you want video"
retropie for already compiled emulators, here https://github.com/RetroPie/RetroPie-Setup

If this doesn't work I'll upload my compiled AM.

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #24 on: July 28, 2015, 01:51:19 PM »
I'm to the point where I'm half tempted to do a damn voodoo dance around my workbench and bleed a chicken on the Pi.  NOTHING is working.  The Diet-Pi distro is giving me nasty audio hissing and refuses to accept a USB dongle, Raspbian doesn't have the hiss, but refuses to compile AM.  I mean, for crying out loud here...  It's a direct DL, clean install, with copy/paste instructions and it doesn't work! 

I'm THIS close to losing my mind over this.

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: AM on Pi
« Reply #25 on: July 28, 2015, 05:20:15 PM »
Slippy-

That visual is too much for me to stomach. ;P  So, here is my compiled am with supporting files.  To keep with the same file structure, place in the following:

Place the am.zip which is the attract binary in this location /usr/local/bin/
Place the Attract.zip supporting files and folders in this location /usr/local/share/attract

Once you run attract it should create attract.cfg and folders for emulators, romlist, layouts, in your /home/pi/.attract folder which is hidden. This is where you custom layouts will go etc. 

Let me know how it goes.

[attachment deleted by admin]

slippyblade

  • Full Member
  • ***
  • Posts: 42
    • View Profile
Re: AM on Pi
« Reply #26 on: July 28, 2015, 07:46:08 PM »
Ok, that seems to have worked so far.  AM is running.  Getting RetroArch now...