The Raspberry Pi Arcade Project, Part 3: Get Raspbian

Now that you have your Raspberry Pi and assorted accessories, it’s time to get it up and running. The Raspberry Pi doesn’t have a hard drive… that’s what the SD card is for. The Raspberry Pi includes an ARM CPU, so in principle any operating system that has been ported to the ARM architecture should be able to run on it.

In practice… I’m already in over my head trying to explain CPU architectures. But you don’t need to know anything about that to get your Raspberry Pi running. Several “flavors” of Linux have been ported and modified specifically to work well with the Raspberry Pi but the gold standard is Raspbian, a variant of the popular Debian distro, and the preferred choice for starting out on the Raspberry Pi. If you really know what you’re doing and have very specific requirements, other OSes may be preferable over Raspbian, but if you just want to get your Raspberry Pi up and running with a stable, easy-to-use Linux, Raspbian is the way to go.

Get Raspbian

The first step in setting up Raspbian is to download it. This of course assumes you have another computer to download the disk image to. Any Windows, Mac or Linux PC should do. The key is having a PC with an SD card slot, because you’ll need to use it to get Raspbian onto the SD card.

If you don’t have a PC with an SD card slot, or you just don’t want to mess around with it, you can buy an SD card preloaded with Raspbian for not much more than the cost of the card itself. Note that the preloaded SD cards are probably only going to be 4 GB however, not the 16 GB card I recommended in Part 2 of this series.

Assuming you’re going to install Raspbian yourself, the first thing you need to do is download it. This download link includes a few other options for different OSes that will also work on the Raspberry Pi, so if you are inclined to ignore my advice, check them out!

Install Raspbian on Your SD Card

Once you have Raspbian downloaded, you’ll need to install it on your SD card. The process for doing this varies depending on whether you’re on Windows, or using a UNIX-based OS like Mac OS X or Linux. More detailed Windows instructions are available on the download page I linked to above. Being a die-hard Mac user, I am going to describe the Mac/Linux process, which I recommend doing at the command line.

1. Insert the SD card into your SD card slot.
This should be fairly self-explanatory. On most MacBook Pro’s the SD card slot is on the side near all of the other ports; on other Macs like my Mac mini, it’s in the back. Not all Macs have an SD card slot, e.g. the MacBook Air. If your computer doesn’t have an SD card reader, USB add-ons are available.

2. Open Terminal and become a superuser.
If you’ve never used Terminal before… well, to be honest, if you’ve never used Terminal before, this whole project is going to be a bit of a challenge. But solider on! Terminal is located in your /Applications/Utilities folder. It’s your way to access the command line on the Mac. You’re going to be doing some things that require root (“superuser”) access. The “safer” way to do this is to prepend any of those commands with sudo but I prefer not to mess around with that. Type sudo -s Enter to enter superuser mode. Note the command prompt will change from $ to #. Now you can do some real damage. Consider yourself warned. (And do not, under any circumstances, type rm -Rf / ever. For real.) Proceed at your own risk, or just prepend commands with sudo along the way if the system says you don’t have permission.

3. Identify your SD card in the filesystem.
In Terminal, type df Enter. You’ll get a list of all of the disks (“volumes”) on your Mac. You’re looking for the SD card. The name it displays in the Finder will be shown in the far right column, “Mounted on”. But you need to know what its name is in the “Filesystem”, the far left column. On my Mac mini it comes up as /dev/disk2s1. You don’t need to worry about the s1 part; that’s the partition. We just need the disk number, e.g. /dev/disk2. Make note of this for future reference. Now you need to unmount the volume so you’ll be able to write to it. Take a look at the disk name under “Mounted on” (starting with /Volumes/). Type umount -f [disk name] Enter, replacing [disk name] with exactly what was listed under “Mounted on.” Important: if there are any spaces, you’ll need to edit the name and put that portion, between slashes, in quotation marks. For example, if the name is /Volumes/My Awesome SD Card you’ll need to type umount -f /Volumes/"My Awesome SD Card" instead. And if this doesn’t work, check here for another tip on unmounting the volume.

4. Identify your Raspbian disk image.
Now you want to switch to the directory where your downloaded Raspbian disk image is. This is likely to be the Downloads folder in your home directory. If so, then in Terminal you’ll type cd ~/Downloads Enter. Then type ls -al Enter to see a list of the files in this directory. You’re looking for one with a .img file extension. In my case it’s 2013-02-09-wheezy-raspbian.img. If you don’t see that, but you see something similar with a .zip extension, you just need to unzip it. Type unzip [filename] Enter (using the real filename, of course) and then type ls -al Enter again, and you should see another file with the same name but ending in .img. That’s the one.

5. Write the image to the SD card.
Now that you know the name of your Raspbian disk image and the disk you’re writing to, you can run the dd command to copy the image over. This command includes a lot of different options for setting the block size, etc. The kinds of technical details about computers most of us haven’t thought about since the early days of MS-DOS, if ever. In my experience these settings don’t appear to matter here, however, as I was able to prepare my SD cards with only the basic parameters of if (input file) and of (output file). Here’s the command I would use in my exact situation. Adjust your if and of according to your results of steps 3 and 4 above.

dd if=2013-02-09-wheezy-raspbian.img of=/dev/disk2

Then hit Enter and… wait.

And wait.

And wait.

This is the command line. You will get no feedback that any progress has been made, or that anything is happening at all. So just leave Terminal open and go about your business. Some substantial amount of time later (in the realm of a half hour, in my experience), the process will have completed, and you’ll get your command prompt again. That’s how you know it’s done. Now, go back to the comfortable confines of the Finder and see if the SD card is showing up as a mounted volume. If it is, eject it. Now you can take out the SD card and insert it into your Raspberry Pi. You’re ready to power up!

Next time… powering up your Raspberry Pi with Raspbian for the first time.

Update (11/29/2022): This is mainly for my own future reference, but you can get a status update during the long wait by pressing Ctrl-T.

The Raspberry Pi Arcade Project, Part 1: Introduction

If you’re bothering to read this, I probably don’t need to explain either the Raspberry Pi or emulators (specifically, MAME and Stella), but for the sake of completeness, I will.

Raspberry Pi

The Raspberry Pi is a tiny, inexpensive Linux-based computer that, after years of anticipation, was finally released to the public last year. It’s designed to be versatile and to encourage creative, educational programming and electronics projects.

Emulation Software

Emulators are software programs designed to run on modern computers that emulate the physical hardware of older, simpler video game and computer systems. When combined with ROM files, the programs that ran on those old systems, it is possible to play near-perfect recreations of those classic games on modern equipment.

Of course, while the emulators themselves are (usually) perfectly legal, there is a (charcoal) gray area of legality regarding the distribution and even the possession of these ROM files. Legally, you should only possess ROM files for games you physically own. In the case of home video game consoles, that would be the original cartridges or disks. For arcade games, that would be the actual hardware cabinet with all of its electronic guts… or, at least, the ROM chip from said cabinet that contains the actual game program. (I do actually own an original Asteroids arcade cocktail table, and a very large collection of original game cartridges for the Atari 2600, 5200 and 7800; the Intellivision; the Nintendo Entertainment System [NES] and others. These will be the focus of my efforts with this project.)

There are numerous emulation programs, representing dozens of arcade and home video game systems, and most have been ported to a variety of different modern platforms, including Windows, Mac OS X and Linux. My interest primarily lies with the classic games of the late 1970s and early 1980s; specifically, arcade coin-op games which are emulated by the Multiple Arcade Machine Emulator (MAME) project, and the Atari 2600 which is emulated by the Stella project.

One of the dreams of many aficionados of early arcade games is to own a “MAME cabinet” — a real arcade game cabinet (or modern recreation thereof) with a modern PC and display inside, programmed to work with an arcade-style control panel, and loaded with emulation software.

The Project

I’ve wanted to build a MAME cabinet for years. The biggest hurdle for me has been a willingness to dedicate an expensive (or even semi-expensive) and significantly overpowered PC to use solely as the “brains” of such a cabinet.

I’ve also been interested in the Raspberry Pi ever since I first heard of it. The idea of a credit card-sized Linux computer that could be embedded in a creative electronics project sounded amazing! But possessing a woeful lack of knowledge of the circuit board-level details about electronics, and being equally woefully inept at either soldering or construction, I wasn’t sure what I could really do with it.

But then it hit me… I could build a MAME cabinet! What’s really great about attempting a project like this today is that you don’t really need to solder or build anything. The X-Arcade Tankstick is an (almost) plug-and-play, arcade-quality control panel, and the Xtension Arcade Cabinet is a prefabricated arcade-style cabinet designed to work perfectly with the Tankstick, the PC of your choice, and a 22-inch TV or LCD monitor to create a MAME cabinet that’s still a fun DIY project without requiring the same levels of skill that have previously made this kind of thing unapproachable for me.

The Road Map

I am already well underway with this project, but from the beginning it has been my intention to create a series of blog posts detailing the process, so others who, like me, have an intermediate-or-better level of knowledge of command line Linux; a rudimentary understanding of electronics — at least, which plugs go into which ports; and above all a deep and abiding love of classic ’80s video games, can make this kind of thing happen.

I owe a huge debt of gratitude to Shea Silverman, who is several steps ahead of me in working with and blogging about using the Raspberry Pi for emulation, but whose blog posts come with a tad steeper of a learning curve than what I am hoping to lay out for the readers of these posts. I’ll tell you what I think you need to know to make this stuff work, but for a more in-depth exploration of the details, please check out his blog.

Now then, here’s an outline of the posts I intend to include in this series. (I’ll update this page to make each a clickable link as the posts get published.)

Part 1: Introduction
Part 2: The Essential Gear
Part 3: Get Raspian
An Interlude
Part 4: Up and Running with Raspbian
Part 5: Emulator Set-up — Stella
Part 6: Emulator Set-up — MAME
Part 7: Configuring the X-Arcade Tankstick
Part 8: Polishing Your User Experience
Part 9: Preparing the Cabinet
Part 10: The Finished Product

Introducing my new album… a ROCK OPERA no less… 8-Bit Time Machine!

Anyone who’s following me on the social medias knows I’ve been working for the past couple of months on what is probably my most absurdly ambitious solo music project to date: a rock opera with a retro-geeky theme.

The album is finished. I’m still working on perfecting the masters before I release it for download and get CDs pressed, but you can now immerse yourself in the full 8-Bit Time Machine experience over on the new website I’ve set up for the album:

8bittimemachine.com

The website features a page for each of the album’s 11 tracks, where you can listen to the track while reading the lyrics and notes about the story. (Note: As the audio is in MP3 format, it will work in Firefox. Any other modern browser that supports HTML5 audio will play the tracks automatically.)

Stay tuned for more information about a final release date!

8-Bit Time Machine

P.S. Yes, there is a track (a rather musical one at that) consisting of nothing but sounds from Atari 2600 games.

P.P.S. Yes, there is also one track with full-on autotuned vocals. How do I rationalize this use of one of my most despised audio technologies? You’ll just have to listen to figure it out.

Rock opera update/teaser: a first listen!

Anyone who follows me on Twitter or Facebook probably knows by now that I’m working on a semi-top-secret (wha??) rock opera. Yes, it’s true!

I am not yet ready to reveal the full details of the project, but suffice to say it is in the late stages. It’s mostly down to recording vocals, which is sure to be the most time-consuming part of the process. I am shooting for a January-February 2013 release date at this point.

But it’s time for a first listen now! Of the 11 tracks on the album, 7 will have vocals. But I’ve made one of the instrumental tracks available in a rough mix form now on Alonetone. You can check it out here! (Or, if your browser is adequately HTML5-itized, you can play it below.)

All of the sounds on this track come from Atari 2600 video games. Specifically, they come from actual Atari and Activision games that were available in the early 1980s. I sampled these sounds out of the commercial emulators for these games that are available for the iPhone, created a software instrument from the samples (using this technique), and played them on my keyboard to produce the music you hear. The sounds are minimally processed… other than some EQ and reverb, they sound exactly like they did in the original games (especially Super Breakout, which provides most of the “melodies” you hear).

Happy 30th birthday, PC era

I may be a hardcore Apple fanatic now (and, well, for about the last 20 years), but back in the ’80s, I lived in the “IBM-compatible” world, as it was called back then, in the days before Microsoft Windows.

IBM-compatible, of course, meant a computer with the same basic architecture, and capable of running the same software, as the (literally) definitive Personal Computer — PC — IBM introduced on this date in 1981. I have so many vivid memories of the ’80s IBM PC experience that I’m at a loss where even to begin to discuss them. So many games. Such terrible graphics.

I never actually owned the IBM PC, the model 5150 (not to be confused with this), myself, but my uncle did. It was always a treat in the early ’80s when we’d visit him and he’d let me go into the spare bedroom where he kept his PC. He was the first person I knew who owned a computer. It was dazzlingly futuristic, and I eventually learned some rudimentary command line skills — just enough MS-DOS to get myself into BASIC, where I loved to write stupid, pointless little programs.

Eventually, in 1987, I got my own PC-compatible computer, the Tandy 1000 EX that I’ve mentioned here before. The Tandy 1000 was an odd beast. It boasted a better graphics card than the average PC, allowing it to display a whopping 16 colors instead of the usual 4, but in almost every other way it was already hopelessly outdated at the time of its release. It was never able to run even version 1.0 of Windows, so we got Tandy’s feeble semi-GUI, DeskMate, instead. But I still thought it was cool.

It all began with the IBM 5150 PC, though. Without that, Apple might have become the world’s largest (technology) company 25 years earlier. But in the end it all worked out OK. The iPhone 4 I carry around in my pocket now is (approximately) a kazillion times more powerful than the 13-pound metal box IBM gave us 30 years ago today.

Still, I have fond memories of so many games I played on that old Tandy 1000 back in the late ’80s. Here’s a list of some of my favorites.

I brought my Tandy 1000 EX to college with me in the fall of 1992, but the campus computer labs were dominated by Macs (except for a couple of the high-tech labs in the physics building that were full of NeXT cubes), and it wasn’t long before I was a convert. I bought my first Mac — an LC 475 — at the college computer store in the spring of 1994 and I haven’t looked back. Except when I have. That Tandy 1000 EX is long gone but my love of those old games I played in junior high and high school lives on.