rpix86 - Main PageWhat is rpix86?
rpix86 is a PC emulator for the Raspberry Pi computer. Its purpose is to allow you to run old DOS games on your RPi. It is based on the DSx86 PC emulator for Nintendo DS game console. I began porting DSx86 to Raspberry Pi in February 2013. See my blog for information about the current status of rpix86.
What hardware it emulates?
The current status of the emulation is as follows:
- CPU: 80486 processor, including the protected mode features (for running DOS4GW games) but without virtual memory support. The emulation runs at a speed of around 20MHz 80486 (which equals a 40MHz 80386) machine.
- Memory: 640KB of low memory, 4MB of EMS memory and 16MB of XMS memory.
- Super-VGA graphics, with a maximum resolution of 640x480 with 256 colors.
- SoundBlaster 2.0 (including AdLib-compatible FM sounds) sound card.
- US keyboard.
- Two-button mouse.
- Joystick (since version 0.04)
- Roland MPU-401 MIDI interface (since version 0.04)
- COM1 serial port (since version 0.06)
Contact me
If you have any comments or questions about rpix86, feel free to send me email. To avoid spam I don't have a mailto link in here, instead I give you this hint: My email address is simply my first name at my domain name. Domain name meaning "patrickaalto.com".
Donate!
If you feel like showing your appreciation for my work on rpix86, feel free to donate some small sum to me. Or feel free not to donate anything, as I am not working on rpix86 to make money, it is just my hobby project. Also, any amount you donate will NOT have any effect on how many improvements I do to rpix86, how fast I release new versions, or anything like that. Rather the opposite, any money you donate I will probably spend on new Blu-Ray movies or things like that, and watching them will take time away from my coding rpix86! Just so you know.. :-)
video by Spritetm
Article documenting this: http://spritesmods.com/?art=rpi_arcade&f=yt I made a miniature arcade cabinet based on a Raspberry Pi. It has a GPIO-driven 2.4" LCD, a custom-made PSU to power it from LiIon batteries, 3W of stereo speakers and buttons/joystick.
Node.JS News Everything you should know on NodeJSMade by yet another geek : itwarsNode.js Debian package for ARMv5 NodeJS-news.com is a self hosted platform on Seagate DockStar … I’ll be pleased to have somebody compiling and providing a Debian .deb for node.js armel! Anyway I’ll do it by myself. Purpose of the Debian NodeJS ARMv5t package Debian package for node.js v0.8.14 armel for ARMv5t kirkwood. This kind of ARM processor take place in Seagate Dockstar, PlugComputer, … Setup the Node.js armel package Copy .deb file on your device, and : dpkg -i nodejs_0.8.14~squeeze_armel.deb How I built kirkwood Debian node.js package? I’ve unpacked Chris Lea .deb files for node.js and npm packages, replaced node binary and then rebuild the package. You can download nodejs debian package for ARMv5 on GitHub. Feel free to comments and retweet ! November 05, 2012About Nodejs News Node.js News try to publish informations, news, blogs posts, ... You are looking to start with node.js, keep in touch with, read about. I write posts on Javascript and Node.JS, you write articles, we can make the buZZ with NodeJS ! About the Author Name: Vincent Rabah LinkedIn: Profile Technical Manager Flexible Computing, Orange PaaS/IaaS Cloud Computing Platform. Social / Sharing Let's share this site on social networks f + t L Y dz Thank's to follow us on Twitter! T Thank's to follow us on RSS! FeedBurner
Related posts Last posts
Connect things to your Raspberry Pi An add-on board for the Raspberry Pi, making it convenient to attach peripherals. Pi Crust Features Really compact - sits inside the surface area of the Raspberry Pi and adds less than 2mm to the height. If you have a case for your Raspberry Pi, this board may well fit inside it.
We finally have the Raspberry Pi WebIDE in a place where we think it's solid enough for an alpha release. First, a disclaimer: this release will likely have bugs, and minor issues, so we recommend that only experienced linux/python users install it for the time being. It is certainly our intention to get this solid and ready for all users, and we will let everyone know when we think it is at that point.The Raspberry Pi WebIDE is by far the easiest way to run code on your Raspberry Pi. Just connect your Pi to your local network, and log on to the WebIDE in your web browser to edit Python, Ruby, JavaScript, or anything and easily send it over to your Pi. The WebiDE includes a terminal, so you can easily send various commands to your Pi right from the browser. Also, your code will be versioned in a local git repository, and pushed remotely out to bitbucket so you can access it from anywhere, and any time.
video by briandelacruz1
Shoop! is the first raspberry pi-powered photo souvenir printer that receives photo-uploads via Wi-Fi from any smart phone. A pre-designed template will then be applied to the uploaded photos and will automatically be printed like any event photo-booth does. Templates can be customized to fit any party, event, tourist destination or establishment.
video by Jeremy Blythe
http://jeremyblythe.blogspot.co.uk/2012/09/raspberry-pi-distance-measuring-sensor.html - Measure distances from the Sharp GP2Y0A02YK0F sensor using an MCP3008 ADC and hardware SPI.
So after your brain hurts a bit and you're tired of learning computer science on the Raspberry Pi, you might want to relax with a bit of nostalgia and exercise your thumbs with some retro gaming. Want to revisit your childhood memories of Pong? Ping away. Maybe your kids have been hounding you for a video game console but you don't have the $300 to spring for a PS3. The Pi can help you with this and help teach your kids something, to boot. After some slight software configurations and a hardware purchase or two, you can relive the days of the almighty Atari 2600. Catch us after the break and we'll show you how to get your Pi to play all your totally legal cartridge backups.
Getting your Raspberry Pi to play Pong is actually quite simple. Through a quick set of commands and a few configuration steps, you'll be vaulted back in time and playing Atari on your tube. With that said, let's get to blastin' Asteroids!
What you need to get started, hardware-wise
You'll obviously need a few things to get your Atari 2600 nostalgia rockin' and rollin' so here's a list of hardware items to have:
- A fully configured Raspberry Pi Model B Board with the latest Raspbian image installed. The Pi should be connected to a monitor or television. You can follow the setup guide here if you have issues with this.
- An available USB port on your Pi if you plan to use a USB gamepad. Usually, this means you'll need a USB hub. (Note: you can also use a keyboard.)
Lastly, as a reference point, here's what we used to get our own setup up and running:
- Raspberry Pi Model B with the latest Raspbian image.
- Logitech K260 wireless keyboard and mouse combo (read: it only uses one USB port, since the two share a dongle).
- 40-inch Samsung TV.
- An old Logitech Precision USB gamepad we had lying around.
- Bose surround sound speakers.
So, once you've rounded up your gear and have your Pi set up like so, let's get it configured. Also, while you're doing this, we recommend adding the song "2600 Refugee" by the Super 8 Bit Brothers to your playlist for some inspiration.
Let's get started.
Emulators and ROMs
Essentially, since the Raspberry Pi is a fully functional Linux computer, what you're doing here is installing a piece of software called Stella. Through a bit of genius reverse engineering, Stella emulates an Atari 2600 video game console.
That's great, but what about the games?
Well, you're obviously not going to rig up a cable from your Raspberry Pi to an Atari cartridge through a bit of MacGyvering and then just start playing. So you can put that Swiss Army Knife down, because here we're going to use ROMs -- software backups of your physical Atari cartridges.
That's awesome, so how do I get them?
Well, the politically correct answer is that video game ROMs are completely illegal in the US, along with most other parts of the world. However, we aren't your parents and can't stop you from using Google. Piracy is bad, mmkay?
There's also a bit of a grey area it seems if you already own the physical copy of the game and are making a personal backup. Consult your attorney regarding that. Hey, we aren't lawyers!
With that said, let's get to chompin' ghosts, Pac-Man.
Setting up the Atari 2600 Emulator
What we're going to do first is set up the Atari 2600 emulator Stella. In short, it's a top-notch emulator that runs reliably on the Pi. Audio, video and USB gamepads work smoothly -- always a major plus, we say.
We're going to assume you've already got your Raspberry Pi up and running and have the LXDE Desktop Environment up and running like so:
Open up an LXTerminal by double clicking the LXTerminal icon on your desktop and issue the following command on your keyboard:
sudo apt-get install stella
When prompted with the "Y/N" prompt, just hit Enter.
And that's it! Stella is installed. Now let's get it configured. First, you'll need to have your ROMs, err legal backups, handy in a folder on your system. Again, how you get those ROMs there is entirely up to you.
Execute Stella by typing "Stella" in your already open LXTerminal.
On the initial run of Stella, you'll be asked to set up the location of your ROM directory as we previously mentioned. Go ahead and navigate to where your Atari 2600 ROMs are by using the mouse or the arrow keys on your keyboard.
Once you've configured where your ROMs are located, you'll want to customize your controllers for playing games. First, click "Options" down at the bottom.
Then, click on "Input Settings" and the "Devices & Ports" tab.
Uncheck "Grab mouse in emulation mode" and "Use mouse as a controller" if you plan on using a gamepad.
Now, click the "Emul. Events" tab. Time to map the joystick buttons. Start by clicking the P0 Joystick Up item, click "Map" and then press the button to represent "up" on your joystick. Be sure to do that for the rest of your buttons.
Once you're happy with your settings, click "OK."
Now it's time to have some fun. Select one of the ROMs from your list and double click on it. In our case, we'll be launching Pole Position.
If all goes well, your game will load and you'll be off to the races.
These graphics are amazing -- just think how far we've come since Checkers!
You can hit Escape at any time to go back to your ROM list and choose another game. And that's a wrap, folks. You now have hours of Atari fun ahead of you.
Atari is great, what about other systems?
Though we'd love to bask in 8-bit NES nostalgia as well, the Raspberry Pi doesn't yet have an emulator that packs the full punch yet. We've tried fceultra and mednafen, two popular NES emulators, and they each deliver horrible sound quality. Also, the OpenGL support for these two apps needs some tweaking. Hopefully down the road someone will get to porting the code so that it runs a bit better on the Raspberry Pi. For now, though, we hope you like Atari.
Post navigation ← Previous Next →This entry was posted in programming, raspberrypi and tagged advancemame, ARM, MAME, pi, raspberry, raspberry pi, raspberrypi by SSilver2k2. Bookmark the permalink.Hello everyone from raspberrypi.org! Thanks for visiting, more updated tutorials and binaries are available by clicking the menu item Raspberry Pi Gaming!
So I’ve spent even more time playing around with my MAME compile and my Raspberry Pi. I have a new set of downloads, once is a set of binaries so you don’t even need to do a make install.
- Unzip MAME directory.
- chmod 777 /dev/fb0
- Put your roms into mame/share/advance/roms/
- run mame/bin/advmame
- The first time it’s run it will generate a set of folders and files into ~/.advance
- edit your ~/.advance/advmame.rc to include the proper display configuration
- For HDMI try:
- device_video_clock 5 – 50 / 15.62 / 50 ; 5 – 50 / 15.73 / 60
- For NTSC TVs try:
- device_video_clock 5 – 50 / 15.73 / 60
- run mame/bin/advmame <gamename>
- cd into mame/bin/ then ./advmame gamename
- ENJOY!!!
Download AdvanceMAME Raspberry Pi Binaries
As an aside, I overclocked my Pi to 900Mhz, and Street Fighter 2 is slow, but playable
edit: fixed an error in the path. Also added a different way to run advmame (the way I run it). Just cd into the bin directory then ./advmame gamename.
After getting MAME going on my Raspberry Pi so that I could play old arcade games. I wanted to hook up a proper joystick. Back in the 80′s I had the excellent and ubiquitous Competition Pro 5000. As mine (foolishly) got sold with my Amiga stuff I got one on eBay, and it came in the original box:
The first step was to get it hooked up to the RPi general purpose input output (GPIO). I used a breadboard with my homebrew Pi Cobbler at one end and a similar connector at the other hooked up to an old PC serial card cable that has the right (male) DB9 connector for the joystick plug (female). It was then just a matter of adding some pull up resistors (10K) and some patch cables:
Since I was originally planning to use gpio-keys I used the joystick pinout to hook up to the RPi thus:
- Up -> 11 (GPIO 17)
- Down -> 13 (GPIO 22)
- Left -> 15 (GPIO 23)
- Right -> 16 (GPIO 24)
- n/c
- Fire -> 7 (GPIO 4)
- n/c
- GND
- n/c
Blind alley
Having already seen gpio-keys I thought I’d be using that, but when it came to the crunch I didn’t know where to start – I probably need a package of RPi kernel source. On reflection I probably really wanted gpio-mouse anyway.
After some digging around the Raspberry Pi Forums I found a comment about using Python to generate keystrokes. This got me headed in the direction of Python uinput, which is a module that can create keypresses.
sudo modprobe uinput git clone https://github.com/tuomasjjrasanen/python-uinput cd python-uinput sudo python setup.py install --prefix=/usr/localSmelling victory I knocked together some code that turns GPIO into keypresses. Sadly it seems that AdvMAME derives it’s input in such a way that completely ignores uinput for keyboard. Back to the drawing board.
The right(ish) approach
Digging around the examples for Python-uinput I found one for joystick, so I had a go at creating a GPIO connected variant:
""" rpi-gpio-jstk.py by Chris Swan 9 Aug 2012 GPIO Joystick driver for Raspberry Pi for use with 80s 5 switch joysticks based on python-uinput/examples/joystick.py by tuomasjjrasanen https://github.com/tuomasjjrasanen/python-uinput/blob/master/examples/joystick.py requires uinput kernel module (sudo modprobe uinput) requires python-uinput (git clone https://github.com/tuomasjjrasanen/python-uinput) requires (from http://pypi.python.org/pypi/RPi.GPIO/0.3.1a) for detailed usage see http://blog.thestateofme.com/2012/08/10/raspberry-pi-gpio-joystick/ """ import uinput import time import RPi.GPIO as GPIO GPIO.setmode(GPIO.BOARD) # Up, Down, left, right, fire GPIO.setup(11, GPIO.IN) GPIO.setup(13, GPIO.IN) GPIO.setup(15, GPIO.IN) GPIO.setup(16, GPIO.IN) GPIO.setup(7, GPIO.IN) events = (uinput.BTN_JOYSTICK, uinput.ABS_X + (0, 255, 0, 0), uinput.ABS_Y + (0, 255, 0, 0)) device = uinput.Device(events) # Bools to keep track of movement fire = False up = False down = False left = False right = False # Center joystick # syn=False to emit an "atomic" (128, 128) event. device.emit(uinput.ABS_X, 128, syn=False) device.emit(uinput.ABS_Y, 128) while True: if (not fire) and (not GPIO.input(7)): # Fire button pressed fire = True device.emit(uinput.BTN_JOYSTICK, 1) if fire and GPIO.input(7): # Fire button released fire = False device.emit(uinput.BTN_JOYSTICK, 0) if (not up) and (not GPIO.input(11)): # Up button pressed up = True device.emit(uinput.ABS_Y, 0) # Zero Y if up and GPIO.input(11): # Up button released up = False device.emit(uinput.ABS_Y, 128) # Center Y if (not down) and (not GPIO.input(13)): # Down button pressed down = True device.emit(uinput.ABS_Y, 255) # Max Y if down and GPIO.input(13): # Down button released down = False device.emit(uinput.ABS_Y, 128) # Center Y if (not left) and (not GPIO.input(15)): # Left button pressed left = True device.emit(uinput.ABS_X, 0) # Zero X if left and GPIO.input(15): # Left button released left = False device.emit(uinput.ABS_X, 128) # Center X if (not right) and (not GPIO.input(16)):# Right button pressed right = True device.emit(uinput.ABS_X, 255) # Max X if right and GPIO.input(16): # Right button released right = False device.emit(uinput.ABS_X, 128) # Center X time.sleep(.02) # Poll every 20ms (otherwise CPU load gets too high)With that saved as rpi-gpio-jstk.py it was a simple case of running:
sudo python rpi-gpio-jstk.py &I tested using advj, and it showed input. When I fired up AdvMAME the joystick worked – horray – time for some gaming:)
Conclusion
I now have a working classic joystick for my classic games, and it seems to perform fine. I’m not entirely happy with the Python based approach, particularly as it uses polling, but I’ve seen nastier hacks. I’d still like to get a proper kernel module working, more so if it can use interrupts rather polling. I should probably also investigate using internal pullups so that I can simplify the wiring for when I make a more permanent (dual?) joystick adaptor.
Updates
19 Aug 2012 – I changed the code (available on GitHub) to use internal pullups. Since this now means that there are no components involved (just wires between the joystick and GPIO) I’m going to see if I can make an adaptor that just uses one side of the GPIO header (as all I need is GND and 5 inputs). This will involve changing some pins. More to follow when my DB9 PCB connectors arrive from China.
Like this:
Be the first to like this.
This is our first distro, Occidentalis v0.1. Rubus occidentalis is the black raspberry. It is derived from Raspbian Wheezy July 15We have made a few key changes to make it more hardware-hacker friendly!
Please keep in mind, we are not full time linux distro maintainers - we will try to fix any bugs we find but this distro is not for beginners or people who are new to linux!
How to Install!
Click below to download the ZIP file:
- Adafruit Raspberry Pi Educational Distro - Occidentalis v0.1 !700 Megs! (August 2, 2012)
MD5 of the img itself (not the zip): 34b5d3d511fcce0b82186816119d9881
MD5 of the zip: cc3559cb6e7cb5f33b0e46118e16b748
SHA of the img: e95dbb306bee8a9f77b486c729c7869923b7ee43
SHA of the zip: 72eb71d316b8765d5594878b8662f2118dc4320a
and decompress it. Note that it is 4 GB large! You will need a 4GB card or larger. We suggest using our 4GB SD card which works greatYou will also need a SD or MicroSD card writer to burn the image on. We suggest using our speedy MicroSD card writer that works with any OS.
Then follow the directions here, except use the downloaded and uncompressed Occidentalis image instead of Wheezy
I2C Support I2C support is on SDA and SCL pins. To test, connect any I2C device to power, ground, SDA and SCL. Then run i2cdetect -y 0 (as root) to detect which addresses are on the busFor more ideas, check out this post (by the most awesome cboot) and others on the Raspberry Pi forums
We do not have any I2C tutorials for the RPi at this time
SPI Support SPI support is on the CLK/MOSI/MISO/CS0/CS1 pins. To test, connect your logic analyser/scope to the pins and run echo "testtext" > /dev/spidev0.0 to send some dummy data to the SPI port. You can simply read/write the /dev/spidev files to read/write from SPIWe do not have any hardware SPI tutorials for the RPi at this time (we do have a 'bitbanging' software SPI tutorial here)
One Wire Support One wire is most commonly used for DS18B20 temp sensors. The Pi does not have 'hardware' 1-wire support but it can bitbang it with some success. Connect a DS18B20 with VCC to 3V, ground to ground and Data to GPIO #4. Then connect a 4.7K resistor from Data to VCC.Then run as root: modprobe w1-gpio and then modprobe w1-therm to attach the temperature submodule. Then you can run cat /sys/bus/w1/devices/28-*/w1_slave to read the temperature data from the bus
The first line has the CRC, if its "NO" then the data is corrupted. If you get a good CRC check, the second line has t=temperature in 1/100 of a degree Centigrade. For example, below, the temperature is 24.5°C
Since 1-wire is bitbanged, its flakier than SPI or I2C. We do not have any 1-wire tutorials for the RPi at this time
WiFi support We wanted to get our WiFI modules working, so we applied the RTL8192cu-based patches to the kernel. Please note that you almost certianly need a powered USB hub to run a wifi dongle.
You will have to edit /etc/network/interfaces with your SSID and password but after that, it should 'just work' - check iwconfig and iwscan if you're having problemsWe do not have any WiFi tutorials for the RPi at this time
Before plugging in the wifi adapter for the first time, please delete wlan0 from /etc/udev/rules.d/70-persistent-net.rules as we did not do this before taking the distro image. Otherwise, edit /etc/network/interfaces to refer to wlan1 instead of wlan0
Bonjour Support
Bonjour is what Apple uses to make it easier to find new devices on a LAN. Instead of having to look up the IP address, there's a local name. This distro uses raspberrypi.local by default. All Apple machines have Bonjour servers. If you have ever installed iTunes, it comes with it. Other Windows users can get it from here - its called the print server but its what you wantTest by trying to ping raspberrypi.local when the Pi is booted and connected to Ethernet (or WiFi once you have configured WiFi)
Overview Created by Mikey Sklar The combination of connecting a Raspberry Pi to COSM makes creating a internet of things much easier than it has been in the past. The Pi with it's easy access to ethernet / WiFi and COSM's drop dead simple usability will graph all sensor data you send to it. This tutorial explains how to connect a analog temperature sensor to the Pi and use a small python script to upload that data for storage and graphing on COSM. To follow this tutorial you will need
Adafruit <3 Raspberry Pi - especially how easy it is to hack circuits using the electronics breakout pins! But sadly, the latest official distro "July 15 Raspbian Wheezy" did not have many of the delicious hackables built in. That's why we decided to roll our own distribution.Our distro is based on "Wheezy" but comes with hardware SPI, I2C, one wire, and WiFi support for our wifi adapters. It also has some things to make overall hacking easier such sshd on startup (with key generation on first boot) and Bonjour (so you can simply ssh raspberrypi.local from any computer on the local network)
Like any tweaked distro, this distribution is not designed for beginners! We designed this specifically for what we think hardware hackers want, and may not suit your needs. Please check out raspberrypi.org/downloads for official distributions.
As of 3PM British Summer Time, libCEC issues have been resolved. If you already installed Raspbmc please reboot your system to download the updated firmware. The issue was caused by Raspberry Pi firmware. Hi everyone, RC4 is here.
Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware. An operating system is the set of basic programs and utilities that make your Raspberry Pi run. However, Raspbian provides more than a pure OS: it comes with over 35,000 packages, pre-compiled software bundled in a nice format for easy installation on your Raspberry Pi.
How to get advmame on the rasberry pi.
I found a tip about using advmame instead of xmame and decided it was worth a try.
advmame has an awesome configure script that takes all the work out of editing makefiles.
It also runs a lot faster.
First you will need to have some sort of rasberry pi simulator I went with this method.
RPi on Virtual BoxAs before
Use the following command to ensure your running on the arm kernaluname -a
here is my output.
Linux rasberry-pi 3.0.4 #2 mon oct 17 17:39:42 ict 2011 armv61 GNU/Linux
If you dont have X set up install it by using the commandapt-get install lxde xorg python geany
Now we need to install some dependencies to build advmame. You may not need all of these. I put them together from a lot of tinkering.
apt-get install build-essential libgtk2.0-dev libgnome2-dev libsdl1.2-dev
apt-get install libxv-dev libxv1
Download the advmame source. I tried 106.1 without success.
wget http://sourceforge.net/settings/mirror_choices?projectname=advancemame&filename=advancemame/0.106.0/advancemame-0.106.0.tar.gz
extract the archive.
tar -zxvf advancemame-0.106.0.tar.gz
cd advancemame-0.106.0
Now we configure and compile.
./configure
make
make install
Pretty easy huh. Thanks to advmame team for all there work.
You already might have heard of the Raspberry Pi. It is a credit-card sized PC from the Raspberry Pi Foundation and is going into mass production and distribution these days. There is a huge demand for “the Pi” and the first orders are limited to one per person. A few weeks ago I got my Pi delivered and started working on what I would describe as “universal console”. In this post I describe my initial thoughts about this project and present an adapter that allows you to use SNES controllers as input devices for the Raspberry Pi.
Being part of the 80ies generation I belong to the group of people that grew up with a whole bunch of 8- and 16-bit video consoles. Nowadays, you can find emulators for all kinds of these consoles and some time ago I got the idea that it would be nice to have a tiny PC that could just be switched on to play this or that good old game. When I read about the Raspberry I finally decided to start this project.
There are several things that have to be done for this:
- Decide for a stable working Linux distribution that provides access to the video and sound hardware.
- Make the emulator(s) work.
- Build a launch menu that allows for selecting the console and or the video game.
- Build a hardware controller interface that allows you to connect real video game controllers.
- Build a case that contains the Raspberry and the connector(s) for the controller(s).
I know that you are now saying “Each of these five points is a project on its own.” and I agree! Let’s have a brief look at each of these points now:
The distribution The decision for a “good” distribution is tricky and I am not sure which of the available ones is best suited. Since the Debian distro will be the official distribution of the Raspberry, I think that this might be the best choice. But, currently, even the Debian distro provides an ALSA module only in alpha stage. This produces horrible audio outputs and leads us to the second point:
The emulators There is already work going on for tht point and ToadKing is doing fantastic work here. He is adapting the RetroArch emulator to the Raspberry currently and provides a public Github repository. There is also a thread about this work in the official forum. This is a central piece of this “universal console” and I really hope that the Raspberry port of RetroArch and of the emulator cores will be further developed.
The launch menu Maybe there already exists a launcher that can be compiled on the Raspberry. If you know such a thing, please tell me! Otherwise, I thought of a rudimentary (Python?) script that could be used for the beginning.
The controller interface I think that an authentic retro-gaming device needs authentic input hardware. The Raspberry comes with two USB ports and one possibility would be to use some remakes of, for example, SNES controllers with USB connectors. In order to use original controllers, however, one needs to come up with an interface for these controllers. This is where the second part of this post comes into play: I built an adapter board that allows you to connect two SNES connectors to the GPIO pins of the Raspberry. This wiki article gives some more details about the GPIO pins of the Rasperry. A short C program reads the states of the two controllers and passes all button presses to a virtual keyboard that is implemented with the help of the uinput module. In the following, I explain some more details of this adapter, show some pictures of it, and, at the end, also a video demo.
Let us first talk about the hardware part. The idea of designing a PCB that could be used for connecting SNES controllers to a microcontroller or PC came up when I read about a project, in which an NES controller was connected to an iPad. In previous posts, I wrote about the first prototype, the SNES-adapter PCB, and a case for the adapter. For the connection to the Raspberry I used the following parts:
- 1x SNES-adapter PCB
- 2x SNES connectors
- 2x Shrouded Pin Header, 2×3 pins
- 2x Ribbon Crimp Connector, 2×3 pins
- Ribbon Cable – 6 wire
- 1x Ribbon Crimp Connector, 2×13 pins
- Ribbon Cable – 26 wire
The SNES-adapter board really does nothing but to provide a clean wiring for the connectors. You could also connect a SNES connector with the 26-wire ribbon cable directly. Besides the cleaner look, the nice thing of the adapter board is that it provides the possibility to connect two controllers without the need for manually splitting the 5V line. If you are interested in the adapter board, send me a mail, I would be happy to share this! To get the SNES connectors I ordered two SNES extension cables and just used the female connectors of them. The SNES and ribbon crimp connectors are wired as following:
You can also see some resistors in the picture – these are actually for LEDs and a button and are not used here. A more detailed description for the assembly is given here. This is a diagram of the pinout of the adapter board:
The GPIO pinout of the Raspberry and of the corresponding 26-wire ribbon cable are shown here:
The connection between the GPIOs and the adapter board is as following:
- GND to P6
- VCC to P2
- DATA 2 to P15
- LATCH to P16
- CLOCK to P18
- DATA 1 to P22
Having finished the hardware part I started with the software implementation. I decided for a C program to have the possibility to keep the CPU load as low as possible. Basically, the program has to do two things: First, it has to read the state of each button. A very good source for information about the NES/SNES controllers is also the documentation of the Uzebox. Second, it has to pass button events to a virtual keyboard. The uinput kernel module can handle the input subsystem from within the user space. I stumbled across a very informative article about the uinput kernel module. It is a two-parts article with part 1 here and part 2 here. The uinput module has to be manually loaded with this command:
To access the GPIO pins from within a C program you need to download and install the Broadcom BCM 2835 library. These commands download and install this library:
I called the program SNESDev and created a Github repository for it. You can find it at https://github.com/petrockblog/SNESDev-RPi. Here is a demo of everything working together for a quick game of a famous kart game:
This leads us to the end of this post. So far, I did not speak about a case yet. Having some experience with other laser-cut cases I already started to design a case for the Raspberry that also contains ports for two SNES connectors. When this is finished I will write about it in another post. UPDATE: You can now find a shell script in my Github repository that automatically installs all needed packages for RetroArch and various emulator cores, as well as SNESDev.
Certainly, I left out some information that you would be interested in. So, if you have any questions, comments, or questions, just send me a mail or write some comments below – I would be happy about any contributions!
Some obligatory legal stuff: The Raspberry Pi is a trademark of the Raspberry Pi foundation.
I’m a proud owner of Raspberry Pi, and I hope to have much time to spend doing software / hardware stuff with it.
However this post is about my will to see RaspberryPi as mediacenter: mounting my network shares and streaming DVB-T channels. I live in Portugal, so DVB-T channels are encoded in H264/AAC.
I’ve bought this DVB-T USB device on ebay because it’s cheap (no intended advertisement).
Connecting it to RaspberryPi and doing lsusb:
$ lsusb
Bus 001 Device 004: ID 048d:9135 Integrated Technology Express, Inc. Zolid Mini DVB-T StickThis device is Version 2, so according to LinuxTV Wiki to be support you would need to use at least Kernel 3.4 (no alarm here!) .
Let’s go build OpenELEC with PVR support and kernel support for most DVB-T USB devices (mostly taken from here).
Update #1: Steps 1 to 8 performed on my laptop using Ubuntu 12.04 on VMWare Player.
1) First you need to have some packages installed (I used Ubuntu 12.04)
$ sudo apt-get install g++ git nasm flex bison gawk gperf autoconf automake m4 cvs libtool \
byacc texinfo gettext zlib1g-dev libncurses5-dev git-core build-essential xsltproc libexpat1-dev zip \
autopoint xfonts-utils libxml-parser-perl2) Cloning OpenELEC project
$ git clone git://github.com/OpenELEC/OpenELEC.tv.git
We need Stefan Saraev OpenELEC media_build support so let’s create a temporary directory:
$ mkdir temp
$ cd temp
$ git clone https://github.com/stefansaraev/OpenELEC.tv.git
$ cd OpenELEC.tv3) Pull that commit that really interest us!
$ git cherry-pick 3f6b9aa
$ cp -R packages/linux-drivers/media_build/ ../../OpenELEC.tv/packages/linux-drivers/
$ cp tools/mkpkg/mkpkg_media_build ../../OpenELEC.tv/tools/mkpkg/
$ cd ../..
$ rm -rf temp4) Editing RaspberryPi project options (use your favorite text editor, i used nano)
$ cd OpenELEC.tv
$ nano projects/RPi/optionsSearch for ADDITIONAL_DRIVERS and replace this line:
ADDITIONAL_DRIVERS=”$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver”
with this:
ADDITIONAL_DRIVERS=”$ADDITIONAL_DRIVERS media_build”5) Fix media_build compile error
(Use your favorite text editor, once again)$ nano packages/linux-drivers/media_build/build
Add:
LDFLAGS=”"Before:
make VER=$VER SRCDIR=$(kernel_path) -C linux/ download6) Compile time! It will take a while, go grab a coffee, watch some tv or read a book!
$ PROJECT=RPi ARCH=arm PVR=yes make release
Update #2: Add -j # to the above command (# is number of cores of your CPU or VM CPU), to speed up compiling time. (Thanks to azbest_hu!)7) Format sdcard and create system
Extract OpenELEC_PVR-RPi.arm-devel-*.tar.bz2 and execute (my sdcard is mounted on /dev/sdb . check yours!):
$ ./create_sdcard /dev/sdb
$ umount /dev/sdb1 && umount /dev/sdb28) Create Tvheadend add-on
We’ve built XBMC for Raspberry Pi with PVR enabled and media support now it’s time to build TVheadend add-on which will render DVB-T channels.
(on OpenELEC.tv)
$ PROJECT=RPi ARCH=arm PVR=yes ./script/create_addon hts-tvheadendWhen it’s finished you’ll have on target directory addons/2.1/RPi/arm/service.multimedia.hts-tvheadend . Copy this directory to OpenELEC Download network share.
9) Install Tvheadend add-on
On XBMC go to Add-on -> Install from zip file -> Home folder -> Download and select service.multimedia.hts-frontend-X.X.X.zip .
When done, reboot!
10) Configure Tvheadend
After Raspberry Pi rebooted go to your PC browser and enter http://rpi-ip:9981
Go to Configuration -> TV Adapters . Select your DVB-T USB Device and go to Multiplexes.
Click on “Add mux(es) manually…” and add your DVB-T frequency (mine’s 754000KHZ). Leave all the rest on Auto. Click on Save changes.
Go to Services and introduce manually channel’s name and click on Save Changes.You now have configured your channels!
Check at Channels tab.11) Add Tvheadend to Videos
To add your channels to XBMC go to Videos -> Files -> Add videos -> Browse -> Zeroconf -> Tvheadend . Add them to Favorites if you want to.
12) Watch TV!
Easy huh? :]
_____________________________________________
P.S.: I wouldn’t done this without Stefan Saraev help, thank you!Like this:
Be the first to like this.
You can view the draft version of THE MAGPI ISSUE 5 - SEP 2012 by visiting this ISSUU page.
Welcome to the Android Pi WikiEdit
A wiki about running Android on the Raspberry Pi
General infoEdit
In this Wiki you will find information about Android on the Raspberry Pi board.
IRC Channel: #razdroid at irc.freenode.org
Forum thread: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=73&t=8780 A video showing the first Android 4.o build: Android 4.0
A video showing the first usable, but slow build of Android 2.3 (CM7.2): Android 2.3
Want to compile yourself? Take a look at this page: CM7_Compilation
As for the compilation of the kernel, look here: Kernel_Compilation
A video showing a graphics accelerated version of Android 4.0: Broadcom Demo
Current statusEdit
CyanogenMOD 9 (based on Android 4.0): Boots, unusable
- Framebuffer issues: possibly due to the lack of double buffering and/or page flipping in the bcm2708 framebuffer driver
- Proper libEGL library not present: libraries *are* available, but those are linked against glibc instead of android's bionic libc (issue filed here)
CyanogenMOD 7.2 (based on Android 2.3): Boots, very slow, barely usable.
- Same problem with the hardware acceleration libraries.
Official Android 4.0.3 (built by Broadcom): Boots, very fast with hardware acceleration, lacks AudioFlinger support.
DownloadsEdit
CyanogenMOD 9 image Needs an SD card of at least 2GB. Extract and image to your SD card just like the Debian image.
CyanogenMOD 7.2 image Same instructions apply.
CyanogenMOD 7.2 image (with Ethernet Menu) Same instructions apply.
You may want to change hdmi_group and hdmi_mode in config.txt (or just remove the lines)
ScreenshotsEdit
video by aonsquared
I've managed to make the Raspberry Pi work as a speech recognition module to control a robotic arm with a USB interface. This is related to my previous video (http://youtu.be/32nIxJZvqtI), and as usual I've posted instructions on how to get it working on my website: http://www.aonsquared.co.uk/raspi_voice_control
video by teamxbmc
Team XBMC member Keith walks us through the Raspberry Pi device, demonstrates XBMC functionality in this proof of concept port, and plays some 1080p videos. Thanks Dom from RaspberryPi.org for the dev unit. Thanks Edgar (gimli) and Scott (Davilla) from XBMC for all your work on Raspberry Pi.