Author Topic: RPI 1&2 Attractmode image  (Read 26077 times)

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 298
    • View Profile
RPI 1&2 Attractmode image
« on: May 28, 2015, 07:11:26 PM »
Hi all,
Here is an image I put together for the RPI with diet-pi,attract mode 1.5.2, & since diet-pi came with the retro-pi script I put samba shares for roms & artwork plus mame4all, advmame .96 & 1.2

https://drive.google.com/file/d/0B55xxfI-_rofR2hhcmh1YTNxdDg/view?usp=sharing

This should run on all B models of RPI both 1&2.
I have the config set for GPU memory based on model.

Also, I installed a gpio joystick driver to run at boot.
it has a shutdown option.
    Here is the pin-out diagram for the GPIO.
    I can confirm the shutdown works.
    https://github.com/ian57/Raspicade-Retrogame-2Player-BPlus/wiki

    here is the guide.
    https://github.com/ian57/Raspicade-Retrogame-2Player-BPlus

This guy did an awesome job with his driver!

    I had to adjust the code a little to make it stop calling for Root access since the dietpi distro is allready running at root.
    I didn't test the joystick stuff yet.

    attract mode starts at boot also.
    i've got it set for vertical using Omegaman's awesome layout which surprisingly runs rather well on a RPI 1 with 256mb.
advmame-roms and advmame-art along with mame4all-roms & mame4all-art are the folders.

    Those are the only two emulators installed.

 desktop icons are gone, toolbar is hidden so you won't see it when mame launches.

I forgot to put raspi-config on there for easy expansion of the card but you can find that yourself easy enough or use gparted.

it will be on the next one.

only thing, i'm using a hdmi to vga adaptor for a 1280x1024 lcd panel so you may need to adjust the config file for your display type.

I've been hit & miss with advmame but mame4all works great.


akafox

  • Hero Member
  • *****
  • Posts: 757
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #1 on: May 28, 2015, 08:10:15 PM »
Awesome work man! I've not loaded it myself yet but I know it was a lot of screaming hair pulling and drinking lol setting up mine with emulationstation was a PITA! *claps and cheers*
People want life easy..then complain about it

dbals

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #2 on: May 28, 2015, 08:29:39 PM »

No scp client?

I also have to fix the config file for my monitor,  I have a hdmi to dvi.  Get an error that my Dell cannot display the digital signal- I see plenty of threads about this issue.

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 298
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #3 on: May 29, 2015, 03:44:55 AM »
I had to check because I didn't think about it. :)
There is SSH.

for everyone's reference:

using putty I connect to "dietpi"
user id: root
password: raspberry

the commands "cd .."  should get you to the root directory.
"cd boot"  to get to the boot partition
"nano config.txt" to get to the config file.

here is the list of options for the config file for reference.
https://www.raspberrypi.org/documentation/configuration/config-txt.md

my image uses
hdmi_group =2   (dmt)
hdmi_mode=35   (1280x1024)

so you'll want to change those settings to match your own monitor.


raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 361
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #4 on: May 30, 2015, 10:17:19 PM »
Great work nitrogen!  I think I'll pin this one... why not hey?

verion

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 738
    • View Profile
    • new projects
Re: RPI 1&2 Attractmode image
« Reply #5 on: May 31, 2015, 03:27:18 AM »
The GPIO driver is great thing - no more 50$ chip to attach joystick. Great stuff.
I like the solutions that really makes RPi a 35$ computer and not a 35$ computer + 100$ worth of attachments.
Not that I'm cheap - it just so in line with the RPi ideology.

---

Speaking of joystick - can you add a driver for PS3 wired joystick?
That's what I'm using, but maybe a driver for XBOX360 wired gamepad would be great addition for someone else.

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 298
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #6 on: May 31, 2015, 05:42:02 AM »
For the most part this image is an easy way to have Attract Mode on the RPI for people that don't want to compile.

But, the retro-pi script is installed on the image so I believe you can use that to install the ps3 drivers.
I can promise retro-pi will do a much better job of integrating the drivers than i could. :)

nitrogen_widget

  • Sr. Member
  • ****
  • Posts: 298
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #7 on: May 31, 2015, 09:42:10 AM »
IF anyone is interested,
I found the source for libretro mame 2003 (.78) on github.
Its the version you find on android.
it just compiled for me on the RPI2 (had to do it twice though) retroarch recognizes it as a core & I can run roms.
One of the ROMS (frogger) that someone told me was rough on advmame looked to run good for me.

i'll set it up as an emulator for AM and add it to my next image update.
not sure when that will be out though.

akafox

  • Hero Member
  • *****
  • Posts: 757
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #8 on: July 14, 2015, 11:17:53 AM »
Yeah as soon as I can get me a clean card to run this on i'll try it. I am curious about the retro cores though. I was able to pull out a lot more on it when i used retroarch on my WII. I only have a RPI B+ (bought it a week before the PI 2 came out (doh!) there was something I didn't like using retroarch though...can't remember from the top of my head.... As for the rasp pi 2 I understand it can handle mame 1.34 (same as my WII). Again good work man.
People want life easy..then complain about it

juergen

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: RPI 1&2 Attractmode image - mame4all "illegal instruction"?
« Reply #9 on: October 24, 2015, 04:34:46 AM »
My first post to the forum here. I was very happy to find AttractMode: Had been trying to build a small Raspberry-based Mame cabinet last year, dedicated to vertical games. Mame4all works nicely, but would only show the "correct" vertical scanlines if I let mame4all handle the display rotation, rather than set it globally via the system config. But then I could not find any front end that handled display rotation nicely... AttractMode to the rescue!

I now have your image installed (thanks so much for that!), and a few games for Mame4all. Attractmode has found the ROMs and scraped artwork for many of them. But I can't start the emulator!
  • No matter which game I select, the display just shows "Ready Player 1" for half a second, then switches back to AttractMode.
  • When I start mame4all manually from the command line (after leaving AttractMode and X), I get an "Illegal instruction" error message, without any further details.
I am out of my depth here. Any idea what could be wrong? I am using an older Raspberry B, and the unmodified image from the link above. (Only changed the display settings to match my 1024*768 screen.) Many thanks for any helpful hints!

battlecat

  • Full Member
  • ***
  • Posts: 50
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #10 on: October 29, 2015, 12:56:35 PM »
I'm a total noob when it comes to this stuff but I would love to be able to buy a $35 RP and get it working as a fully functioning emulator without having to invest in a ton of extras.

Is this really possible and if so are there any high quality well written tuts on it?

Thanks,
BC

juergen

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #11 on: October 29, 2015, 01:55:52 PM »
Hmm, this thread is quieter than I had expected. I can now partially answer my own question above:

The image posted by the OP is apparently NOT suited for the Raspberry Pi 1. As reported above, I have consistently received "illegal instruction" errors when trying to start the emulators. Obtained a Pi 2 now, and the emulators work well with the identical image. Hence, while the DietPi OS and the Attract Mode front end work under both, Pi 1 and Pi 2, the emulators do NOT.

battlecat -- I would not try this as a total newbie. You will need to dig in various config files (e.g. the image here does not set Mame4all to rotate the image to vertical orientation), i.e. will need to work with the Linux command line. Also, while there is a lot of information around, I have not found one complete and coherent guide. The "Cupcade" from Adafruit is a notable exception: A palm-sized mini-cabinet built around the Raspberry Pi. Complete kits and good documentation are available; but you are limited to the very small screen they have designed this for.
« Last Edit: October 29, 2015, 02:03:52 PM by juergen »

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #12 on: November 22, 2015, 05:00:04 PM »
Wanted to do my own build for my RPI1 and having a bit of trouble.. I installed:

apt-get install g++ git libsfml-dev libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libopenal-dev vflib3-dev libjpeg-dev

I tried to build and get to media/movie and this error pops up:
Code: [Select]
root@DietPi:~/attract# make -j3
g++ -c -o obj/media.o src/media.cpp  -Wl,--export-dynamic -DDATA_PATH=\"/usr/local/share/attract/\" -O2 -DNDEBUG -I/opt/vc/include -L/opt/vc/lib -Iextlibs/audio/include -I/usr/local/include -I/usr/include/freetype2 -I/usr/include/AL  -Iextlibs/expat -Iextlibs/squirrel/include -Iextlibs/sqrat/include -Iextlibs/gameswf  -DFE_RPI -DUSE_LIBARCHIVE -DUSE_SWRESAMPLE
ar rc obj/libaudio.a obj/audiolib/ALCheck.o obj/audiolib/AudioDevice.o obj/audiolib/Listener.o obj/audiolib/SoundSource.o obj/audiolib/SoundStream.o
src/media.cpp: In member function ‘void FeVideoImp::preload()’:
src/media.cpp:447:31: error: ‘PIX_FMT_RGBA’ was not declared in this scope
     avpicture_alloc( my_pict, PIX_FMT_RGBA,
                               ^
src/media.cpp: In member function ‘void FeVideoImp::video_thread()’:
src/media.cpp:513:28: error: ‘PIX_FMT_RGBA’ was not declared in this scope
  avpicture_alloc( my_pict, PIX_FMT_RGBA,
                            ^
Makefile:349: recipe for target 'obj/media.o' failed
make: *** [obj/media.o] Error 1

From what I can tell, this would be part of libavutil-dev, which is installed. I then tried to build with NO_MOVIE and get this:

Code: [Select]
root@DietPi:~/attract# make -j 3 NO_MOVIE=1
g++ -o attract obj/fe_base.o obj/fe_util.o obj/fe_util_sq.o obj/fe_info.o obj/fe_input.o obj/fe_romlist.o obj/fe_xml.o obj/fe_settings.o obj/fe_build.o obj/fe_config.o obj/fe_presentable.o obj/fe_present.o obj/sprite.o obj/fe_image.o obj/fe_sound.o obj/fe_shader.o obj/fe_overlay.o obj/fe_window.o obj/tp.o obj/fe_text.o obj/fe_listbox.o obj/fe_vm.o obj/zip.o obj/main.o obj/fe_net.o obj/swf.o obj/libexpat.a obj/libsquirrel.a obj/libsqstdlib.a obj/libgameswf.a  -Wl,--export-dynamic -DDATA_PATH=\"/usr/local/share/attract/\" -O2 -DNDEBUG -I/opt/vc/include -L/opt/vc/lib -I/usr/include/freetype2  -Iextlibs/expat -Iextlibs/squirrel/include -Iextlibs/sqrat/include -Iextlibs/gameswf  -DFE_RPI -DUSE_LIBARCHIVE -DNO_MOVIE -lsfml-graphics -lsfml-window -lsfml-network -lsfml-system -ljpeg -lz -ldl -lGLESv1_CM -lsfml-audio -lfreetype -larchive
/usr/bin/ld: warning: libjpeg.so.8, needed by /usr/lib/gcc/arm-linux-gnueabihf/4.9/../../../arm-linux-gnueabihf/libsfml-graphics.so, may conflict with libjpeg.so.62
/usr/bin/ld: obj/libgameswf.a(gameswf_sound_handler_openal.o): undefined reference to symbol 'alSourceStop'
//usr/lib/arm-linux-gnueabihf/libopenal.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Makefile:355: recipe for target 'attract' failed

libopenal-dev is also installed.

Can anyone point me in the right direction to fix one or both of these errors?

raygun

  • Administrator
  • Sr. Member
  • *****
  • Posts: 361
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #13 on: November 22, 2015, 09:48:16 PM »
Hi liquid8d,

I think you'll need to use the branch of sfml I've posted on github to get hardware acceleration on the pi.  So uninstall libsfml-dev and build sfml yourself first... instructions here:

https://github.com/mickelson/attract/wiki/Compiling-on-the-Raspberry-Pi-%28Raspbian-Wheezy%29

I'm not sure why you're getting either of those errors, what OS are you using?  Is it raspbian wheezy?

You could try a clean build without swf as well to see if that fixes it:

make clean
make NO_MOVIE=1 NO_SWF=1 -j 3

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: RPI 1&2 Attractmode image
« Reply #14 on: November 23, 2015, 02:28:46 PM »
I just got the dietpi image for myself so its Debian, with whatever customizations they include. It's acting like it is missing references for libavutil and openal. I didn't see those compile steps so I'll give that a shot and see how it goes... thanks :)