Showing posts with label emulation. Show all posts
Showing posts with label emulation. Show all posts

Friday, May 1, 2015

7th Egham Raspberry Jam - 26th April 2015

What a great Sunday afternoon of Raspberry Pi activity.

40+ people turned up on the day with an ever greater proportion of parents with their kids with a real buzz on the day.

The most popular tables were the ones where a boy and girl were showing other kids how to program in Scratch.  I had a lovely experience at the end of the event where a father and his daughter came of to say they were leaving and the daughter was beaming as she had just written her first program in Scratch.  It was amazing to see the excitement on her face and the please she was experiencing from leaning a new skill.

For those interested in the latest in desktop environments +Martin Wimpress was there showing how fantastic Ubuntu Mate run on the Raspberry Pi 2 with desktop effects enabled. We had a great chat about RPi.GPIO support and what it would take to have it baked into the next build.
Martin also solved one of my questions. When navigating menus in Mate on the Pi2 sometimes they would stick and not respond.  I thought this was an I/O issue but it looks like it is down to OpenOffice have massive icons SVGs so on first opening a menu the Raspberry Pi has to render the icons for display. This happens once when you go to the menu for the first time. For return visits the icons are already renders so the menu is nice and fast.
I'm trying to decide if I will uninstall OpenOffice as Abiword and Gnumeric give me everything I need and then for graphics I use GIMP and Inkscape.
Martin had a build of Ubuntu Mate that used F2FS (http://en.wikipedia.org/wiki/F2FS) This is a file system specifically designed for flash memory and is suppose to improve the life of SD cards as well as improve performance.  I haven't had a chance to test yet but another win for optimisation.

As a side note GIMP and Inkscape are definitely usable on the Pi2.  I have previously used both on hardware of similar performance for commercial website development.  It's not going to match your i5/i7 with 16GB RAM and the latest graphics card, but it is definitely usable.

A second side note not from the Jam. I had my Ubuntu Mate Pi2 set up at home and needed to print.
It found my wifi network printer and installed all the correct drivers without me having to do anything special.  I love that Graphics acceleration just work, wifi (with the right dongle) just works and printing just works. There are the 3 points that I usually have concerns about on Linux and with the Raspberry Pi they just work.

Back to the Jam details.
Among the many items on display were:

Music playing Octopus (see flickr link at the bottom for pictures)
Portable games console,
Robot arm controlled by Scratch,
Crumble board (http://redfernelectronics.co.uk/crumble/) A great little interface board programmed using an block based interface like scratch.
Minecraft fun
Robot with robotic arm and webcam all controlled using PWM to vary speed from an Android table.
Sonic Pi coding +Sonic Pi
Scratch Development
CNC machine controlled by Raspberry Pi by +Stephen Cornes
EEG Brainwave reading using Mindflex, Arduino and Raspberry Pi
7 Segment of Pi board for development
Pitrol - build it yourself controller for the Raspberry Pi

At the end of the event I got the TwitterCam running and it did take pictures and tweeted them
The pictures can be see at the @EghamJam feed

Here is a link to some pictures from the event if you want to get a flavour for what happens at the Egham Jam.

https://www.flickr.com/photos/tictactoepony/sets/72157649918333124/

What a great day and thank you to everyone who came and brought their projects and enthusiasm to share.


We also had some Motorola LapDock troubleshooting going on as well.  These things turn your Raspberry Pi into a laptop


EEG Brainwave reader with Ubuntu Mate Visualisation



Looking forward to the next Egham Jam.


Saturday, September 20, 2014

Setting up RetroPie on Raspberry Pi with USB gamepad

Every since it started I've watch the development with RetroPie a Raspberry Pi image that includes a number of console/computer emulators optimised for the Raspberry Pi.

I'm not a major gamer but sometimes a bit of nostalgia is worthwhile so I decided to install RetroPie

A few things to note. RetroPie is built on Raspbian, so the foundation is solid.
You can even use raspi-config to expand the SD partitions and set overclocking and GPU memory split.

The easiest way to use RetroPie is to download the pre-made image from the website http://blog.petrockblock.com/retropie/

Use your tool of choice to burn the SD card.  I did it on Windows 7 so I used Win32DiskImager

Once install in the Pi and all cables attached I added power.
Up comes the lovel RetroPie splash screen and it boots straight into Emulation Station which is a great front end giving access to the emulators where roms are available.
Splash Screen

On first boot Emulation Station prompts you to configure your controller/gamepad to operate the menus in Emulation Station. This confused me a little as I thought it was asking to configure the gamepad for the games.

But once I got a few roms on it became clear the this setup was only for Emulation Station and for that it worked perfectly.


I quit Emulation Station and ran raspi-config to expand the partition, split the memory 256MB/256MB as I read the PSX emulator may need it and also to do some minor over clocking (it can't hurt to have a bit more speed)

Then to get RetroPie setup correctly.

From the home directory do:

cd RetroPie-Setup
sudo ./retropie_setup.sh

This brings up the RetroPie configuration menu.
I selected Option 1 to do the Binaries-based INSTALLATION.
RetroPie comes with the bare minimum to get going in the image so you have to do this to get the other emulators.
As expected this can take a bit of time. 
Main Menu for retropie_setup

Once this finished I then selected option 3. SETUP (only if you already have run one of the installations above)

This is where you get the extra options to customize RetroPie.
If you are building a cabinet or want that genuine old school feeling of using original controllers there are a number of tools in the SETUP menu to make it a lot easier.  I was not interested so the only thing I enabled here is 310 SAMBA ROM Shares.
This enables SAMBA shares so you can drag and drop files from your computer to the Raspberry Pi making it much easier to get ROMs into RetroPie

SETUP menu 
At this stage RetroPie has all the emulators installed and the menus works but there are no ROMs and the games (once ROMs are copied across) will only work with the keyboard.

I mentioned I enabled SAMBA above so I could copy ROMs across. In the end I didn't use this. I used WinSCP which allows you to login to the Pi and drag and drop files from your computer onto the Pi in a nice GUI tool 

You have to copy the ROMs to the relevant folders for the different emulators.
Really simple. Reminded me of the olf Windows 3.11 FileManager with 2 panes to drag and drop between.

Last item was to get the gamepad working with the games and not just the Emulation Station menu.
This took a bit of hunting online as I have a feeling the method may have changed in the last update of RetroPie to v2.3.

In the end the method I found that work for me with my gamepad was from a reply on the following webpage.  http://blog.petrockblock.com/forums/topic/how-to-configure-a-controller-on-retropie/ from user flipbug

sudo chown pi /opt/retropie/configs/all/retroarch.cfg

cd /opt/retropie/emulators/RetroArch/installdir/bin

sudo ./retroarch-joyconfig -j 0 >> /opt/retropie/configs/all/retroarch.cfg

The first command gives the user pi the right to change the retroarch.cfg file.
The second goes to the directory where the retroarch-joyconfig command is located
The final command rund retroarch-config and outputs its results to retroarch.cfg 

I found the tool to be a bit sensitive when dealing with the analog sticks so ended up having to do it a few times.

In case my configuration matches some elses here is the configuration I use.

input_player1_joypad_index = "0"
input_player1_b_btn = "2"
input_player1_y_btn = "0"
input_player1_select_btn = "8"
input_player1_start_btn = "9"
input_player1_up_btn = "h0up"
input_player1_down_btn = "h0down"
input_player1_left_btn = "h0left"
input_player1_right_btn = "h0right"
input_player1_a_btn = "3"
input_player1_x_btn = "1"
input_player1_l_btn = "4"
input_player1_r_btn = "6"
input_player1_l2_btn = "5"
input_player1_r2_btn = "7"
input_player1_l3_btn = "10"
input_player1_r3_btn = "11"
#input_player1_r3_axis = "+3"
input_player1_l_x_plus_axis = "+0"
input_player1_l_x_minus_axis = "-0"
input_player1_l_y_plus_axis = "+1"
input_player1_l_y_minus_axis = "-1"
input_player1_r_x_plus_axis = "+3"
input_player1_r_x_minus_axis = "-3"
input_player1_r_y_plus_axis = "+2"
input_player1_r_y_minus_axis = "-2"

It was a bit of a trial and error session getting RetroPie working but in the end I have a fantastic emulator system set up on a model B+ that looks well and performs brilliantly.  I am really impressed at how well it runs PSX games as from a raw CPU power I always though the PSX and the Raspberry Pi would be quite similar.

Now all I have to do is actually be better at the games to fully enjoy them.