Wednesday, November 12, 2014

Budget Retro Gaming Console Build

The following is an explanation of a budget console (PC) build to be used solely for playing retro video games. (NES, SNES, Genesis, N64, PSX, etc) The idea is to make this as cheap as possible, while retaining the ability to emulate all of these systems.

Background

I have used the very popular Raspberry Pi computer for a number of projects.  In a word, its awesome.  The simplicity and the huge community of users make it a great way to get into linux and PC projects as well.  

After a couple years of messing around with my RPi (model B), I found out about the RetroPie Project .  So I immediately installed the Distro and spent hours configuring and setting up the different emulators.  After a good bit of messing around, I had a RPi that was set up as a retro gaming console.  After overclocking and overvolting I was able to even run certain PSX games (Crash Bash! Great game, tons of fun with friends).

I tried getting N64 to work but to no avail.  It was just a little too under powered.  To that same extent, most PSX games didn't run 100%.  

On top of the performance issues, the overclocking and overvolting made the 'Pi unstable.  60% of the time it would fail to boot properly.  Even with all of this in mind, I still considered it a success.  Its amazing what that tiny single board computer can do and all for $35!

So I eventually decided that if I was going to completely satisfy my love for retro gaming I would have to build another system.  Instead of just slightly upgrading to a 'Pi competitor with slightly higher performance, I chose to go all in and build a PC that could do what the 'Pi does and pick up where it left off.  

I chose all of my components and software based solely on what I had laying around and what I was familiar with.  I'm sure there are other ways, maybe even better ways, of doing this.  This is just what I did.  Hopefully this will help the next person looking to satisfy the hunger for Mario Party 64!

Requirements of Build

Cheap!  I wanted it to be as cheap as possible, so I used as many parts as I had laying around as possible.

HDMI - It's supposed to emulate a console, so it needs to seamlessly work with my TV.

No Mouse/Keyboard - Only control would come from gamepad.

Look like a console - This was optional.  Really I just wanted something that didn't look like a big desktop computer sitting next to my TV.

Hardware

Processor/Motherboard/RAM:


I bought my motherboard and processor as a bundle from TigerDirect at their retail store.  (Awful customer service, took 4 times of asking for help for someone to finally come over and unwillingly help me.  YMMV)  For $89 I got:

AMD A6 5400K (Dual Core 3.6GHz)

GIGABYTE GA-F2A58-HD2  (micro ATX)

Plus $30 for 4GB of RAM  (I don't remember what it was, but it really won't matter as long as it matches the rest)

So I'm up to $119 (plus tax).  You can probably do a little better than this if you shop around.  

Drives:

I had a 160GB 2.5" HDD laying around, so I used that.  You can buy one if you'd like.  (Check craigslist.  I have since bought a couple 80GB for $5!)  Just make sure its a working SATA drive.  

Optical drive?  Hell no!  What is this 1995?  USB/Network will do everything you need.  If you really feel the need to have one, (or you use an emulator that can read actual disks) then go ahead and grab one.

Case/PSU

XION XON-720P   $30 on eBay.  (link is to newegg for $40)

You could go with any case, I thought this one looked "console-ish".  

Grand Total: $150  (plus tax)  

Could have been cheaper, but I'm not going to complain.  The CPU is actually wayyyyyyy over kill for this application.  You could probably get away with something cheaper and smaller (mini ITX)

Additional Hardware:  


USB keyboard
USB mouse
USB gamepads  

Get them wherever you'd like.  For the controllers, I use:  Logitech F310,  They work without any drivers or messing around.  Likely, you can use any USB controllers you'd like.  I had these around.  But I'm pretty sure Best Buy sells them locally.  

Software

OS


I'm a Mac and Linux guy so I used Ubuntu 14.04.1 x64.  You can probably(?) do this with OSX or  Windows but I have no knowledge of it, so I'm going to explain this as if you are building along with me from a fresh install of Ubuntu.

Why Ubuntu?  Its free!  And awesome.  And it worked.  That simple.  I tried Debian and I could not get it to run smooth on this processor.  I was probably doing something incorrect, but whatev's.  Ubuntu is also very "familiar looking" if this is your first run with Linux OS.  (Hopefully its not your last.)  

Note: Only use the x64 if it'll work with your system.  If you use the hardware I listed, then you'll be fine.  But it may not work on other hardware.

Emulator(s)

RetroArch (libretro)

RetroArch is what is included in the RetroPie distro.  I was familiar with it's setup/config so I stuck with it.  It works well.  To be honest, I have yet to find a game that didn't work on it. 

It's capable of emulating a bunch of different systems.  For the purpose of this article, I am only going to cover: NES, SNES, Genesis, PSX (the tough one), and N64.  But you can emulate any other supported system following the same instructions.


Front End

EmulationStation

The "front end" is going to be the software that you see when you first start up the "console".  It'll be where you select which system, and then which game you want to play.

EmulationStation looks great.  It's simple yet effective, plays nice with RetroArch (important), and has a built in rom "scraper".  I'll discuss this last part later.

But what about the OS?  The OS is hiding in the background.  Remember we want this to look like a game console and not a PC.  On the RetroPie, the GUI (graphical user interface) of the OS doesn't even start up upon boot.  That's done for 2 reasons: 1. it's not needed and 2. it's a waste of resources.  On the 'Pi, resources are a premium.  No need to dedicate them to something you won't even really be using.  

For this build, the OS and the GUI will run in the background.  EmulationStation will not run without the GUI being present.  I can't tell you why or how to fix that.  I'm sure someone can.  I tried. I failed.  I found a way around it.  (That may be my life's motto.)

Pics of EmulationStation in action:

EmulationStation System Select Screen

EmulationStation Game Select Screen


Build

Assemble the computer.  Follow the instructions given with the motherboard and processor.  There is tons of info out there on the google-machine that'll help with this.  No need for me to half explain it.

My advice:  Take your time!  Read and then reread.  One screw up and you'll be starting over from scratch.

Once the PC is built and ready to roll, we'll start installing software.  You'll need access to another computer in order to get the OS.  Grab a beer, the software is the hard part.  



Finished Product


Note:  Make sure your keyboard, mouse, and network connection are plugged in for the next part:

OS Install


On a separate computer: 


Chris: "Google, how do I install Ubuntu from USB?"  

Google: "You're an idiot.... Read This!"

Chris: "Next time I'm using Bing."

Google: "I Doubt it"


As you can see, Google can be a jerk sometimes and Ubuntu has a nice tutorial on how to make a USB install disk.  I used the Mac method, but they all do the same thing.  Just make sure you use the 14.04 image that you downloaded above.

After the USB is created, plug it into your fresh PC build and turn it on.  

If it didn't explode, you're off to a good start.  If it did, better luck next time.

Assuming the HDD you plugged in is empty, then it should immediately boot from the USB.  If not you'll have to press F12 during the boot process and change the boot order.  (Once again plenty of instructions on the internet for this.)

Eventually you'll see the Ubuntu install screen.  Follow the onscreen instructions:  

  1. Choose to erase the existing hard drive and install Ubuntu.  We don't want the PC to prompt which OS to choose at the beginning of the boot process.  
  2. Choose to download updates during install
  3. User Name: [your first name] (e.g. chris, You will need to type this a lot so make it short)
  4. Computer Name: emulator (case sensitive, Using this will make it easier to follow my instructions)
  5. Put in password
  6. Write down password
  7. Remember login name and password!
  8. Choose automatic login
  9. After the install you will be prompted to restart your computer.  You will need to remove the USB drive and hold the power button on the PC to restart it.  
At this point you should be staring at the Ubuntu Desktop.  Now we are going to set it up for our needs.

First and foremost, go to the top right corner and click on system preferences (or settings, whatever it says).  Go to appearance and change the desktop background to BLACK.

Then while you're in there, change the Launcher to autohide and turn off the "lock" function and the require password after awakening.  We won't have a keyboard to put a password in.  

Note:  After you select a game to run in EmulationStation, it's window is closed and there is a slight pause before the emulator window is opened.  During this pause, the desktop is shown.  Changing the background to black and autohiding the launcher simply makes the "desktop" less apparent.  

Next, go to the little finder icon (insert real name here) at the top of the launcher.   Type Terminal.  Grab the terminal icon and drag it to the left and side to the launcher.  It should place a terminal shortcut on the launcher bar.  If it didn't, try again.   We're going to use this a lot and it makes it easier to find this way.  

Alternatively, you can use the ctrl + alt + t shortcut to bring up a terminal window, but who has the time now a days?


Important Notes: This is mainly for new linux users, but its a good reminder:  Linux is case sensitive.  Everything you type into the terminal needs to be exact in terms of spelling and upper/lower case.  If you put something into terminal or a configuration file and something doesn't work or you get errors, 99% of the time its some sort of input error.  

Also going forward.  If you see code for the terminal.  (like: sudo apt-get update)  The end of each line needs to be followed by the enter key.  The only exception is when installing a bunch of dependencies.  In this case, you'll just put everything you want to install in and press enter at the end.  
little note: Pathways in linux need to start with forward slash (/).  

Example:  /home/chris/retroarch/roms  

home/chris/retroarch/roms will not work.  Stupid mistakes like this will cost you hours in trouble shooting.  

Next Step:


Open this article up on the "console" PC.  That way you'll be able to copy and paste all of the terminal commands rather than risk typing them in wrong.  


Actual Next Step:

Open the terminal. Type: (or copy and paste in terminal)

sudo apt-get update

(Followed by enter remember?  You'll need your password.)

Then when that finishes type:

sudo apt-get upgrade


This will update and upgrade all of the dependencies for your operating system.  It'll likely take a while to finish.  Grab another beer.  This is important for moving forward to ensure everything is up to date and ready to roll.  (the beer that is)

Note: From now on, I will only give the lines to put into terminal.  Unless stated, they are all separate lines followed by enter.  Got it?  

Now lets get RetroArch (Libretro Resource)
Next in the terminal:  

sudo add-apt-repository ppa:libretro/stable    (This will ask you if its OK to add, just say yes.) 

sudo apt-get update

sudo apt-get install retroarch

sudo apt-get install libretro*

(both of the last two might take a bit to finish)


At this point we have downloaded and installed RetroArch.  Its there but needs to be configured in order to work.  

Now we need EmulationStation:  (emulationstation resource)


In terminal:

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install -y libsdl2-dev libboost-system-dev libboost-filesystem-dev libboost-date-time-dev libfreeimage-dev libfreetype6-dev libeigen3-dev libcurl4-openssl-dev libasound2-dev libgl1-mesa-dev cmake git

Note: Copy this whole list and paste in terminal, then press enter.

When that is finished:

sudo apt-get install build-essential -y

git clone https://github.com/Aloshi/EmulationStation

cd EmulationStation

git checkout unstable

cmake .

make

sudo make install


This will take a while.  Just grab 2 beers and sit back and wait.  

Once this is finished you have all of the software needed for this project.  Lets check:

Open up the file and folders app from the launcher bar.  (Second one down from the top typically)  

Navigate to /home/[username]/EmulationStation 

There should be an emulationstation icon in that folder. (you can click it but it'll kick you out saying that you don't have any thing configured yet)

Next, navigate to /usr/bin/ (you'll have to click computer then usr, then bin)

You should see a retroarch icon in that folder.  Click on that little guy.  

Hopefully this opens up RetroArch.

Next Step

You can read up on how to configure RetroArch here.  

And how to configure EmulationStation here

The next post will go into this in more detail since it can get confusing.  



Homework:  Buy more beer.  












1 comment: