Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: slippyblade on July 07, 2015, 01:35:06 PM

Title: AM on Pi
Post by: slippyblade on July 07, 2015, 01:35:06 PM
I've got the AM image installed on a Pi model B and it is working great.  My trouble is I'm not entirely sure what to do from here.  I've got my layouts, romlists, and emulators all setup on my windows machine.  I chose only emulators that have linux variants so I should be able to get them on the Pi, I just have no idea how to go about that.

Any advice?
Title: Re: AM on Pi
Post by: omegaman on July 07, 2015, 03:51:17 PM
Slippyblade-

I'm using the wheezy image, but the process should be the same. In your "/home/pi/" folder there should be an .attract folder created where you will put your layouts, romlist etc... note: You might need to change your file-manger to view hidden folders to see everything.

Then just create a media folder or whatever you want to call it in your home directory " /home/pi/media/". I use media for example. Here you will put the snap, marquee, wheel, and flyer folders. So, for example my /home/pi/media/snes/ will have these media folders. You can also put the roms folder here or make a separate rom folder with something list this '/home/pi/roms/snes. Whatever suits you taste.

If you installed the retropie script for emulators - you will find a retropie folder in your home directory to place your roms and bios.

The last step is to have your am emulator configs point to these folders.

Hope this helps.
         
Title: Re: AM on Pi
Post by: slippyblade on July 07, 2015, 04:39:00 PM
I DL'd the Diet-Pi distro that is available through this board.  It loads and runs fine, the the default disply is a rotated vertical one.  Got that swapped to a horizontal display that I can read.  The problem comes when I exit AM; I am getting a black screen with a mouse cursor.  If I mouse to the bottom' there is a toolbar that pops up.  I just figured out how to exit from what I'm assuming is a borked windows manager before I left for work.

Not using RetroPi at all.

I'll screw around some more when I get home.
Title: Re: AM on Pi
Post by: omegaman on July 07, 2015, 07:09:33 PM
Well, if you exit out of am you will see a black desktop. Because, AM is launched from the LXDE X11 desktop environment. Sort of the same way an app is launched in windows startup. If you exit out of am and want to load it again you can find the binary here /usr/local/bin/attract or just logout of the desktop and run startx at the cmd line.

Once you have everything setup. You can configure attract to shutdown linux when exiting.
Title: Re: AM on Pi
Post by: nitrogen_widget on July 08, 2015, 11:09:25 AM
Hey Slippy,
I set the tool bar to be hidden along with hiding the icons so you didn't see them when AM launched a rom.
It's just like a windows 7 auto-hidden tool bar.

In the home directory is a retropi setup script.
I don't have my RPI in front of me so it may be in a sub folder.
Choose BINARY install otherwise you'll be compiling emulators forever & a day. :)

To re-run AM just trigger the tool bar by going to the bottom of the screen & hit the "start" button & choose the "run command" and simply type "attract" and hit enter.
To copy roms just have your RPI hooked up to your network & browse the network neighborhood from windows.

the retropie script should create folders for you as it installs emulators.
If not make your own.

The emulators will end up in ./user/local/opt I think.
I know /opt is the folder the executables end up in but the linux directory structure can be confusing.

Honestly, LXDE is very similiar to windows 7 or XP in terms of funtionality and it's almost as intuitive.
I hope I helped.
Not having the rpi in front of me = going by memory & I havn't been in the guts of mine for a month.
Title: Re: AM on Pi
Post by: slippyblade on July 08, 2015, 11:49:56 AM
Awesome, thanks for the clarification Nitrogen!  That makes a lot more sense.  I was a Mala fan for a long time, but am switching over to AM.  The flexibility and feature set are just so nice, and the cross platform is just gravy.
Title: Re: AM on Pi
Post by: omegaman on July 08, 2015, 03:47:02 PM
The retropie emulators are installed @ /opt/retropie/emulators. The old school unix directory. Before you choose binary , I would select the update retropie script first under the retropie.setup. And, nitro is right. Selecting the binary is the best option unless you want to wait for hours on end.  Made that mistake once, LOL..
Title: Re: AM on Pi
Post by: slippyblade on July 24, 2015, 04:30:15 AM
Ok, got things sorted, got emulators installed and am slowly starting to make heads and tails of this.

New problem.  My artwork isn't coming into the layout.  I added a media folder to the shares and then create an nes/carts and nes/snap within.  Copied the art over just fine.  Setup the paths in AM just like on the windows machine - different paths of course.  Partially working.  I have cartridge images tagged in AM as Marquee and screenshots tagged as snap.  The carts are showing in the marquee spot where they should, but the snaps aren't showing.  On windows I'd be able to look at the terminal window that pops, but I can't seem to window AM on the Pi to check the terminal window.

Here's the emulator config - I no that I don't have the exe path set, I'm trying to get the other parts working first.

Code: [Select]
# Generated by Attract-Mode 1.5.2
#
args                 "[romfilename]"
rompath              ~/RetroPie/roms/nes
romext               .zip
artwork    marquee            /home/media/nes/carts
artwork    snap            /home/media/nes/snap
Title: Re: AM on Pi
Post by: omegaman on July 24, 2015, 04:55:40 AM
Slippyblade-

GJ, looks like you're almost to the finish line. First thing, does your romlist match what is in the snap folder " needs to match exactly" ? That is the first thing to check off. Next, are your snaps images or videos. If they are videos, did you install ffmpeg? Just for a sanity check.   
Title: Re: AM on Pi
Post by: slippyblade on July 24, 2015, 08:14:17 PM
GJ, looks like you're almost to the finish line. First thing, does your romlist match what is in the snap folder " needs to match exactly" ? That is the first thing to check off. Next, are your snaps images or videos. If they are videos, did you install ffmpeg? Just for a sanity check.

Snaps are straight PNG files.  Yes, filenames in the snap/cart/rom folder all match.  I am using the exact same setup on the windows machine which works fine.  The only thing I've really changed is the paths.  Does AM write a log file?  On the windows setup I was able to troubleshoot several issues by watching the console window - I can't get to it on the Pi though.  :(
Title: Re: AM on Pi
Post by: omegaman on July 24, 2015, 09:17:21 PM
Slippy-

Run ./attract from terminal. Once you exit AM there should be a dialog generated with any errors that you might have. Also, make sure your home folder is correct. On raspbian "wheezy" the home folder is actually /home/pi/ based on the user login name pi.  So, your home folder should actually be /home/username/ then your media folder.
Title: Re: AM on Pi
Post by: slippyblade on July 24, 2015, 09:29:27 PM
the home folder is actually /home/pi/ based on the user login name pi.  So, your home folder should actually be /home/username/ then your media folder.

It's an absolute path to the directory.  The snap and carts directory are parallel directories, that's where my confusion is coming in.  I'll try the terminal run method and see how that works.
Title: Re: AM on Pi
Post by: slippyblade on July 24, 2015, 09:57:25 PM
Ok, looks like it's not AM's fault at all, or mine for that matter.  It's the Pi's fault.  It simply doesn't like the image format.  If I open each image ON the pi and then do nothing more than re-save it, the image works.  If I convert the images stored on my windows machine to JPEG and then copy them over, they work then as well.  Apparently the PI just doesn't like the particular flavor of PNG I saved em in.
Title: Re: AM on Pi
Post by: slippyblade on July 25, 2015, 09:40:16 AM
Yep - very weird.  Copying over the rest of my images and it is hit and miss on which batches work and which don't.  Sometimes simply re-saving works, sometimes changing format does, layouts graphics are now the big issue.
Title: Re: AM on Pi
Post by: slippyblade on July 25, 2015, 10:29:31 PM
Hey Omega, or anybody who has this working...

Would you mind posting one of your emulator configs?  I can't seem to get the paths setup in a way that works.  I can get the damn thing running from the command line, but it seems to bork when I use the same thing from within AM.
Title: Re: AM on Pi
Post by: omegaman 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
 
Title: Re: AM on Pi
Post by: slippyblade 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!
Title: Re: AM on Pi
Post by: slippyblade 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.
Title: Re: AM on Pi
Post by: omegaman on July 26, 2015, 08:22:36 PM
Yeah, I get the same hissing sound on my pi2 through the 3.5 jack.
Title: Re: AM on Pi
Post by: omegaman 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.
 
Title: Re: AM on Pi
Post by: slippyblade 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.
Title: Re: AM on Pi
Post by: slippyblade 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.
Title: Re: AM on Pi
Post by: slippyblade 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?
Title: Re: AM on Pi
Post by: omegaman 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.
Title: Re: AM on Pi
Post by: slippyblade 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.
Title: Re: AM on Pi
Post by: omegaman 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]
Title: Re: AM on Pi
Post by: slippyblade on July 28, 2015, 07:46:08 PM
Ok, that seems to have worked so far.  AM is running.  Getting RetroArch now...