Introduction: Turn an Old CRT Television Into a Raspberry Pi Powered MAME Cocktail Cabinet

Here I will show you how I went about building my arcade machine that uses a Raspberry Pi running MAME to emulate games. As everyones setup will be different this will be general in nature but will hopefully supply enough information so you can get started yourself ! This is my first instructable but hopefully it will all go well. Enjoy ! 

Step 1: Parts You Need

- An old CRT television with an AV input

- A Raspberry Pi (any type should do)

- Strong timber for your CRT frame

- AV leads

- Arcade buttons and switches 

- Joystick

- USB interface ( I got mine here, or make one here)


Many of the arcade specific pieces (buttons, joystick, interface etc. are available online, google is your friend here, shop around get the best price you can) 

You will also need various tools, saws, drills etc. aswel as bits and pieces like screws and bolts. As everyones CRT will be different you'll need different amounts

Step 2: Getting MAME Working

If you havent already gotten your Pi up and running you will need to do so. There are tonnes and tonnes of tutorials out there so I wont cover it here. 

MAME (Multi Arcade Machine Emulator) is a programme that will run games. These games are called ROMs and you will need some before you can get started. I suggests you try and find something simple. I used Donkey Kong for all my testing and it worked a treat. I will not tell you where to get them nor will I help you find them and I definitely wont tell you to go to google and search for MAME roms as that would be down right silly...... 

Now I'm running raspbian wheezy (28 Oct 2012 version) and it works a treat so I would recommend you use this version of the OS as I have had trouble with later releases of raspbian. 

Ok now to the nitty gritty, I am just telling you exactly what the tutorial here told me to do but this is a more detailed step by step process purely for completion of this instructable. However I claim no ownership of this.

1 - Download a copy of AdvanceMAME form Silvermans blog (link above) 

2 - Open up the GUI interface on your Pi (boot up your pi and type "startx" then hit enter)

3 - Transfer the .zip file you downloaded to the pi directory on your raspberry pi (USB stick is probably the easiest way) 

4 - Unzip the file (simply double click and xarchiver should open up) 

5 - Run advmame, this is done through terminal. Pending on what the file that gets extracted is called (mine was called mameBin for some reason, however normaly its just called mame) run the following commands. 


    sudo chmod 777 /dev/fb0 - hit enter you may need to input a password

    <folder name>/bin/advmame - hit enter and you'll get some text mentioning the creation of a file. Folder name is whatever the folder you extracted is called. 

6 - Now you need to edit the file called advmame.rc. to do this go into th pi directory, right click and select the option of "show hidden". there should be a folder called ".advance", open that and there should be a file called advmame.rc. Double click it to open it. It should open in leafpad and look like a bog standard text file. Scroll to the end and put this in 

device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60 

Save the changes and close the document. 

7 - Now place whatever rom you have into the "rom" which is found in mame/share/advance/rom

8 - Run the emulation by typing the following into terminal where folder name is mame, mameBin etc and rom name is the name of the rom 

    <folder name>/bin/advmame <rom name> - hit enter and it should boot up. 


It will probably run really slowly if you are still in the GUI however if you logout and run it from the boot terminal it should be fine !

Step 3: USB Interface Setup and Buttons

No I'm aware that the GPIO pins could be used as a means of hooking up the arcade buttons. However I opted for an interface that is designed to work around MAME i.e I'm lazy..... You can also make one if you have an old keyboard laying around

So this step will vary depending on the interface you get. Mine was pretty straightforward but you will need to follow the instructions yours comes with in regards to wiring, syncing it to MAME however should be the same for everyone. I found it easies to make a mock up controls pannel for my buttons and joystick fron a bit of 7mm plywood, drilled some 28mm holes (using a spade) and the buttons affixed into place. I then wired them up according to the wiring diagram I got with the interface. Plug in the USB lead and boot up your pi. 

OK next.... 

Launch MAME (any rom will do) and hit the tab key. here you will find the options menu. 

Select Input (general)

Select Player 1

Then all you do is scroll through using the arrow keys on your keyboard, hit enter and press the corresponding button, then hit the down key. 

eg say you want so set the player 1 "up" button. highlight P1 UP, hit enter, push the joystick up (you should get some sort of response from MAME, it will put into the line highlighted something like j:trig or l;pinkie, so long as you get a response all is well.), then press the down key. 

Do this for all your inputs, or just the inputs you need and test it. If you find that some of the pins don't work it might be MAME not recognising them, just change the pin and try again. 

Step 4: Disassembly of CRT

I got my CRT from a hard rubbish recycling place for the grand sum of FREE ! Check your local paper and online trading sites (craigslist, gumtree, trading post etc.) you can usually get them free from people. 

WARNING !! The following is for informational purposes only and do not attempt unless you have experience. Needless to say all this work was performed while the TV was UNPLUGGED.

CRT's use high voltage and if you don't disassemble it correctly you can seriously shock yourself (I have done it before and trust me I was lucky not to have been seriously injured oh and yes it hurts !) 

Start by laying the TV down on a padded surface (a towel folded over a few times ontop of a wooden table works well). Take out as many screws as you can find, there may some snap lock clips and other things of that nature so I took my time when I did this, when all fittings and screws have been removed the shell can come off. 

Safely discharge the CRT (if you don't know what this means then you shouldn't be doing this) 

Remove any and all internal screws. Then proceed to remove the electronic components until all you have left is a bare CRT. 

It's a good idea to take photos and mark things so that when you go to hook the CRT back up together you don't forget anything. 


Step 5: Build a Frame for the CRT

Most CRT's have mounting holes in the corners. Again everyones CRT will vary so this is very general but not to hard to sort out yourself. 

I decided to build my frame from thick timber and have it so the CRT simply "dropped" in. I started by getting rough measurements and did a quick mock up frame. A basic rectangle frame with some legs that seemed to fit around the CRT nicely. I put some large triangle blocks in the corners the the mounting points to be rested on and bolted into. 

I then put 45 degree bracing brackets on all the legs so as to sturdy it up. 

Next I dropped in the CRT and botled it into a nice position. 


Step 6: Re Attach Electronics

This part is pretty tricky but you'll need to find a place within the frame where you can easily and safely mount the circuit boards you removed and have them close enough to the CRT that all the wires reach. I decided to put 2 bits of timber horizontal across 2 of the legs. This worked out really well and the boards fitted nicely and all the wires reached. 

The wires were hooked back up to EXACTLY  where they were before disassembly.

It was then a simple matter of hooking up the pi to the TV and then the keyboard and USB interface to the pi. It is possible to hook the audio up to the TV and use it's speakers (3.5mm jack to AV style connector should do the job) But I just have mine hooked up to some stand alone speaksers. 

I launched MAME and all is working !

I'll probably stain the wood a nice dark cherry colour. 

Step 7: Enclosure and Controls

This bit was a little tricky but I just cut out some panels of ply wood that attached nicely to the legs. Clamps helped a lot here with the aligning. The controls board was easy I just decided on an angle I wanted it to sit at, the best thing to do is sit down and eyeball where you'd like it to go, once you have an angle you think is comfortable then decide how high you want it to be. Again roughly eyball it then measure it out. 

I'll probably stain the wood a nice dark cherry colour.

Hope this inspires you to make one as it is a great bit of fun and guests love it ! 

Comments

author
SilverJimny (author)2012-12-30

Hey,

Nice work. Can you give a bit more information on the USB button controller board, where did you get it from?

author
Spartan 117 (author)SilverJimny2012-12-30

Yeah sure thing, I got mine from the link below but you can get cheaper ones on ebay if you just want one set of controls. If you google "keyboard encoders for arcade" you should come up trumps.

http://www.austinamusements.com.au/keyboard-encoders/2-player-usb-encoder-interface-suit-mame-pc-ps3/prod_165.html

author
KabirA7 (author)2016-09-18

AWESOMEEEEEEEEEEEE

author
RevFlatOut (author)2016-02-01

I know this instructable is old, but, it's the most informative piece I've found in my searching. Would it be possible to set this up as 2 player? one on either side, like the old Pacman Tables, or say as a nintendo emulator?

Ive got a 32" flat screen CRT that I don't really want to toss out, and am trying to find a way to use it as an arcade. I'd settle for MAME, but NES, SNES, Genesis/Mastersystem would be great, just 2 player. Even if I had to build a vertical cabinet for side by side 2 player that would be fine.

Thanks for this instructable, and thanks in advance for a reply

author
RevFlatOut (author)RevFlatOut2016-02-01

I guess I can't edit, it's a CRT TV. component, A/v, RF, and S video inputs.

author
Sanchees3 (author)2015-10-10

So I made an arcade a while back using my Super Nintendo and now want to use my raspberry pi, but my only problem is that the Tv only has channels (Channel 2,3,4,5 etc.,) and not an AV mode, can anyone help me figure out how I can get the Pi to show up on his TV ?

author
XboxModz (author)Sanchees32016-01-02

You will need to purchase an RF modulator, which will allow connecting composite video sources (yellow RCA connector) to TV's with channel selector only.. You can probably still get them at Walmart or Amazon for a few bucks.

author
brook.gerard.0 (author)2015-04-10

Here is a couple of suppliers for them. There are bound to be many others.

http://www.ultracabs.co.uk

http://www.vadership.com

author
JonathanT5 (author)2015-01-07

Would this still work if i used an hdmi cable to connect the pi up to my TV?

author
Spartan 117 (author)JonathanT52015-01-09

Yes

author
steliospc (author)2014-01-09

old tv samsung

author
dls3491 (author)2013-12-03

where did you get the movement comtrol,the one with the red ball

author
Spartan 117 (author)dls34912013-12-04

I got mine from here http://in2amusements.com.au/arcade-joysticks/ but you can get them from ebay too

author
dls3491 (author)2013-11-30

what source did you use to get the directional switch

author
Spartan 117 (author)dls34912013-11-30

I'm not sure what you mean ?

author
naikrovek (author)2013-06-03

i keep seeing donkey kong.. if you rotate that image 90 degrees it'll take up nearly the entire screen.

author
Spartan 117 (author)naikrovek2013-06-03

Donkey kong was just used for testing, I don't want to rotate the image as it'll ruin other games that I play. But yeah you're right about it taking up the entire screen.

author
thewildman (author)2013-05-27

Looks great, well done! I am making a similar design except using a full PC and an arduino to control for other interfaces, and smoked glass on top. Are you going to put something on the top or is it all finished?

author
Spartan 117 (author)thewildman2013-05-28

I plan to put some glass on top but I'll need to drop the CRT a little bit before do. I plan to make a keyboard encoder from an old USB keyboard so watch this space/subscribe I hope to have it up in the next week or so.

author
KD0SHI (author)2013-04-05

That is so cool, A great use for a CRT. But be careful, the flyback can have a nasty charge and so will the tube so ground the 2nd anode to the aquadag ground, not the chassis ground because that will damage semiconductors! Also watch the tube; implosion. If you don't have an A/V input, get an RF mod. You can also use a 2n2222 amp if the TV's sound sucks. Be careful with the deflection yoke, if you al of a sudden get a vertical or horizontal line or no HV, the horizontal or vertical output circuits are dead or disconnected from the magnet. I'm such a CRT geek!

author
braney (author)2013-02-15

Great Job. Do you think you could use a old usb keyboard instead of the "usb interface? Not sure if its possible but take the keyboard buttons out then wire the arcade buttons in.

author
Spartan 117 (author)braney2013-02-15

It was an idea I had but most modern keyboards don't use individual buttons for their keys, open one up and you'll see what I mean. They just use a plastic film bilayer that touch when a key is pressed. I'm sure there are other options out there as well, like I said the GPIOs are always an option and I'm sure I've seen an arduino keyboard encoder.

author
iamccd (author)2013-01-18

Hey mate,
where did you get you're joystick and buttons from? I've found them on Ebay and that's it. Where else would be a good place to start?

author
Spartan 117 (author)iamccd2013-01-19

I got mine from an online store in2amusements.com (I think). There are other online stores around too.

author
dailodai78 (author)2013-01-07

nice use of the CRT. Although I'm afraid to open up a CRT due to the fact of getting electrocuted. Anyways, good job on the MAME. What rom can it support on the Raspberry Pi? Street Fighter 2, Final Fight...all those good classics.. I have a project that I want to work on but I want to make sure it runs smoothly on the Raspberry PI... and how did you manage to get your hands on one? I've been looking around to get one but it's backordered for several months....

author
Spartan 117 (author)dailodai782013-01-07

I got mine from element14 and as far as I know they have some in stock at the moment. As for what ROMs you can run I've only tested a few of the old retro games like galaga, DK, pacman and a few other lesser known ones. You can always check out the raspberry pi and MAME forums (or Shea Silvermans blog) for more info on the ROMs you want to run. And if you're not confident in taking a CRT apart there's always the LCD option, you might be able to pick a half decent sized one up on eBay or a similar site.

author
tristantech (author)2013-01-03

Finally a great use for all of those old TVs!

author
Spartan 117 (author)tristantech2013-01-03

yep, we can all have arcades in our back yards !

About This Instructable

192,131views

320favorites

License:

Bio: Chemist by trade, hacker by nature. I love making things go boom and making things that have gone boom work again.
More by Spartan 117:Keyboard encoder for MAME arcadeTurn an old CRT Television into a Raspberry Pi Powered MAME Cocktail Cabinet
Add instructable to: