Friday, May 22, 2009

Arduino Pinball Hacking

My pinball machine does not have a functional MPU. The MPU is the board that has the logic for the rules of the particular game, and it communicates with the phyisical aspects of the pinball machine (the solenoids, the lights, and the switch matrix). Without a working MPU, the pinball machine doesn't do much of anything at all. Luckily for me, replacement MPUs exist for older machines like mine, and are relatively inexpensive.

I've been messing around with the Arduino lately. It's an excellent little embedded platform for hobbyists and goofing around, and you can do serious work with it as well.

I decided that it would be pretty spiffy if I were to create an MPU replacement using an Arduino. The interfaces to the other boards (lights, solenoids) and the switch matrix is documented with great detail in the manual for the machine itself. There are full schematics, as well as a number of repair tutorials available on the internet. There was even a project to create an ISA controller card doing just what I want my Arduino to do.

I envision my project progressing as such:
  1. get a switch matrix scanning routine and associated hardware working. This will permit me to monitor the ball on the playfield from a PC connected to my Arduino via the USB cable.
  2. get a lamp refreshing routine and associated hardware working. This will permit my controlling PC to set the state of the playfield lights
  3. get a solenoid triggering routine/hardware working. This will permit my controlling PC to pop bumpers and play chimes, etc.
  4. get a score display routine/hardware working. This gets me the ability to set the scores on the back-box, and is the last piece of direct interaction.
  5. write a simple game rule set that runs on the PC that allows me to play the pinball machine
  6. figure out how to make the Arduino autonomously follow that game rule set (either a library of the hard-coded game rules, or some sort of super-simple byte-code indicating events to watch for and what to do to the score and bumpers and lights, etc)
It's auspicious, but it seems like it could be many hours of fun!

This would permit me to take off-the-shelf Bally replacement parts and create my own pinball games!

Given the above features as a "version 1.0" of the project, I've already got some "2.0" plans in my head. For instance, the hardware for the controller could act as a man-in-the-middle for an authentic MPU. It could both monitor exactly what the real MPU is doing (and report it to the PC) and it could completely override the MPU. It could trick the MPU by showing fake switch presses.

Tuesday, May 19, 2009

The Mechanical Sudoku Turk

I've come up with an excellent art/tech project just now. The basic concepts are to create a Mechanical Turk aimed at solving sudoku puzzles. A player would input the puzzle via a keypad and switches on the panel of the machine, and pull a lever. The turk would come alive and start banging and clacking and tooting and clunking as it "mechanically solved" the puzzle. The actual brains would be a simple program on an embedded platform hiding inside the console, obscured by the gearing and woodwork. Different solution steps would produce different mechanical events, set to a specific metre. If the puzzle could not be solved, then an error buzzer would fire, and it would go into "tilt" mode. Instructions on the face would indicate how to reset the tilt mode, and claim your fortune. A successful solve would play a short unique sequence of notes and emit the fortune card.

Friday, April 3, 2009

The Pinball Machine

I've inherited a Bally's Evel Knievel pinball machine. It had spent the last decade buried under some miscellaneous junk in my father's garage, but it is now sitting in a partially disassembled state in my library.

Let me start out by saying that the back-glass is in beautiful condition.

Everything else looks pretty bad. The playfield is scratched and very dirty. The protective mylar shapes that had been applied over portions of the field are worn. The rubbers are cracked in places, and the plastics are yellowing and some are slightly deformed. The MPU is dead, so I haven't tested any other components yet.

I've got a replacement rubbers set, and have begun tear-down for a full clean and wax of the playfield, and a full bulb replacement while I'm there. While it has only been in the garage for a decade or so, it's been nearly twenty years since I recall it being in a playable state, and even then most of the bulbs were burnt out, so I figure I may as well do them all now while I'm knee-deep in things.

I will be very happy if I can get it to play again. Once that's achieved, I think I may attempt to sand and re-paint the sides. I've seen numerous places online offering stencil kits for this particular machine. The hardest part would be matching the colors!

I'm having a spectacular time figuring out how it all works. Every time I make another discovery, I am amazed at how well-thought-out the whole thing is.

Please forgive me if this post lacks coherency, it's currently 11:56pm, and my brain wanted to be asleep hours ago.

Pictures of Pinball Progress

Saturday, January 3, 2009

Enhancements for IceHUD and Grid

Here are a pair of add-ons for World of Warcraft that I've been using to tweak the behavior of IceHUD and Grid.

IceHUD_HungerForBlood allows rogues to follow the duration of their HfB buff, and has some coloration niceness to see how many stacks of it you have on you. This was originally the only HfB bar for IceHUD, but now it is actually a replacement for a buggier bar that is already included.

GridOnly is a tiny mod that attaches an extra layout option to Grid, "Hide default party frames." This is for people who want to use Grid and only Grid to view party and raid membership.

Both of these are hosted over on my Google Code project.

Thursday, January 1, 2009

Talented Export Popup

If you're using the excellent World of Warcraft talent addon Talented, you may have been frustrated with its exporting feature, which will only output the URL to your talent build to the most recent chat channel. The following (extremely long) macro will take the currently selected talent tree from Talented, and will put the export URL into a popup window, where you can actually copy it.

/script StaticPopupDialogs["Z"] = {text="URL:",button2=OKAY,timeout=0,hasEditBox=1,hasWideEditBox=1,OnShow=function() getglobal(this:GetName().."WideEditBox"):SetText(Talented:ExportWowheadTemplate(Talented.template)) end}; StaticPopup_Show("Z")

Monday, October 20, 2008

Java class file disassembler

I began working on a disassembler for the Java class file format, and it's come along very rapidly. The only hold-up has been in unpacking the constants pool when there are Long or Double constants present, and that trouble was simply due to ambiguity in the specification about exactly what it meant that such constants took up two entries in the pool.

I've posted my work thus far in SVN, and have created a short project page for it.

Saturday, October 11, 2008

PUG PSG

I've put together a write-up of exactly what this PUG PSG addon was supposed to do. The idea itself, while originally intended for use inside of World of Warcraft, could probably be adapted to any number of distributed peer rating systems. I'm not sure exactly how often such a thing is necessary (I mean really, there's almost always *some* way to centralize a system), but hey the idea's out there.

http://sites.google.com/site/obriencj/projects/pug-psg