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

Light, pollution, memory

Light pollution

I remember the first time I ever observed light pollution. I didn’t know what it was, and I’m not sure it even had a name back then.

It was 1993. I was in college, and I was home for Easter. In fact it was early Easter morning. My uncle was staying with us, in my room, which was in the process of becoming the guest room. He always stayed in my room when he stayed with us. Eventually I would stay in that room, as a guest room, not my room, once I was no longer a resident of the house, but a guest.

At the time, though, I was not yet a guest, though no longer quite a resident. Nonetheless, he was visiting, so he got my room and I was relegated to the couch in the family room. The family room, which had been added on in 1987, when I was 13, had two skylights. One was directly above the couch, so when I was lying on the couch I could look directly up at the sky.

When I was growing up, cities, at least the small town in which I grew up (which I always thought of as a city, despite its modest population of 26,210 — which was no longer the population, but had been the population in the 1970 census, and the city could not yet bring itself to acknowledge the loss of over 10% of its population in the subsequent decades, so it still appeared on the signs as you drove into town) had not yet switched over to sodium-based street lights. However this particular small town/city had made the switch in the brief time since I had gone off to college at an even smaller town — one small enough that even I could make no pretense as to its being a “city.”

I awoke in the middle of the night. Technically, the early morning, Easter morning. It was overcast, and as I now know well, in a city illuminated by sodium streetlights on an overcast night, it is never truly dark, never truly nighttime. Instead, the best you get is an eerie orange twilight, which is what I observed for the first time in my life, that early Easter morning in 1993, 20 years ago.

It was perhaps 2 AM, and as I awoke, then arose, and walked to the kitchen to get a better view, I beheld the city aglow in an unnatural orange luminescence, and… well… it freaked the shit out of me. I had never seen anything like it, and I didn’t understand what could be causing it. Being Easter morning, and being highly impressionable, especially to my own half-lucid, half-dreamlike fantasies, I was sure Armageddon, or… something… was nigh.

Of course, it was not. And eventually I made the connection between the reference to sodium lights I’d heard on Sting’s The Soul Cages album with the eerie orange light, which has since become commonplace in my mostly urban adult life, where I am usually far too busy or distracted or just simply tired to bother to look up into the sky at night and think the kinds of existential, philosophical, cosmic, spiritual, infinite thoughts I used to dwell on so much between the ages of 5 and 22.

But tonight, for a brief moment, I lingered at my back door in south Minneapolis, with a glass of scotch in one hand and my iPhone in the other. On that late night/early Easter morning 20 years ago, I’m not sure which of the two would have seemed more out-of-place in my hands. Surely both would be just as out-of-place as apocalyptic paranoia in my 2013 brain. But still, the connection to that moment half a lifetime ago was there, and I was transported back to a place where I can stare into the sky at night, silently, and wonder.

Classic albums I belatedly “discovered” in 2012

I have, with some friends and acquaintances, cultivated the notion that I’m some kind of walking encyclopedia of music, especially that of the 1970s. But in reality there is so much music out there that I’ve never heard or just never really given a chance, even things by bands I really like. For instance, this year I finally heard Pink Floyd’s Obscured by Clouds for the first time. It was the album they recorded just prior to their legendary breakthrough Dark Side of the Moon, and it’s been on heavy rotation in the studio for the past few months.

That got me thinking: every year I compile my list of the top 5 new albums of the year, but I never reflect on the “new to me” music that I’ve only just gotten into this year. I’m not going to bother with a review of every album, but here’s a list of all of the new music I added to my library in 2012 that wasn’t released in 2012. Some of it is from the past couple of years; some of it is older than I am.

For extra fun, the list is presented in the order I added these albums to my iTunes library. I also bought a few greatest hits albums but I’m leaving them out, along with — of course — new remastered versions of albums I already owned.

  • Weather Report: Black Market (1976)
  • Antonio Carlos Jobim: Tide (1970)
  • Washed Out: Within and Without (2011)
  • Boards of Canada: Music Has the Right to Children (1998)
  • Washed Out: Life of Leisure (2010)
  • Hüsker Dü: Zen Arcade (1984)
  • Sufjan Stevens: Illinoise (2005)
  • Boards of Canada: Hi Scores (1996)
  • Boards of Canada: Trans Canada Highway (2006)
  • Billy Joel: 52nd Street (1978)
  • The Alan Parsons Project: I Robot (1977)
  • The Darcys: The Darcys (2011)
  • The Beach Boys: Concert (1964)
  • The Beach Boys: Summer Days (And Summer Nights!!) (1965)
  • The Beach Boys: Today (1965)
  • The Beach Boys: Live in London (1968)
  • Van Halen: Women and Children First (1980)
  • Bob Dylan: Nashville Skyline (1969)
  • Trombone Shorty: Backatown (2010)
  • Boz Scaggs: Silk Degrees (1976)
  • Def Leppard: Pyromania (1983)
  • Gong: Flying Teapot – Radio Gnome Invisible, Pt. 1 (1973)
  • The Sea and Cake: Car Alarm (2008)
  • The Mothers of Invention: Freak Out! (1966)
  • Frank Zappa: Hot Rats (1969)
  • Pink Floyd: Obscured by Clouds (1972)
  • Com Truise: Fairlight (2011)
  • Com Truise: Galactic Melt (2011)
  • Röyksopp: Senior (2010)
  • Röyksopp: Junior (2009)
  • Tame Impala: InnerSpeaker (2010)
  • Com Truise: Cyanide Sisters (2011)
  • Queen: The Game (1980)
  • Emerson Lake and Palmer: Live at the Mar y Sol Festival (1972)
  • Peter Gabriel: So (1986) [Seriously! OK, I did already own it on vinyl.]

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.