Homebrew Pinball #3, Part 40

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



While doing some gameplay test I had my first 3D printing casualty... Luckily it wasn't from the ball hitting it, but from a design flaw. My shooter lane diverter gate is using a regular ball gate (what bally tended to use in its outlanes), and they aren't too accurate since they just use a relay to spin the gate. When the gate is resting against the side rail it's fine, but when it's energized and out in the playfield it can have a lot of variance. In this case it ended up stopping above the 5 bank of drop targets:
You can guess what happened next...

I've now added some software compensation to prevent this from happening:

You'll also notice my new gate is orange. I ran out of my original spool of white PLA plastic, so now I'm trying out some orange PETG; recommended to me by by another homebrewer as being much stronger than PLA and good for pinball mechs. It took me five prints to get a usable gate though, and it's still a bit messy, so I need to work more on dialing in the settings for printing with the different material.

Posted Friday, October 23, 2020
at 09:23 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 39

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Still alive! Been distracted by other stuff but I've been slowly making code progress on the game.

I had started by trying to code the first multiball, but I was making lousy progress due to running into a lot of bugs and having issues debugging them. After a few days making no progress like that, I decided to put a halt on game coding, and focus on making the dev/testing/debugging workflow better.

Testing the game physically was a big pain. Originally I was trying to run the code from my desktop, but the game was at the other end of the house. Then I tried doing remote desktop from my laptop, but it still wasn't too good. So I started planning on how to rearrange my office to accommodate the machine, so I could have easy access to it while developing, but I couldn't really come up with any good layout. There's just no comfortable way to be sitting in an office chair near a desk but also be able to reach a whole playfield. Plus, I realized that my projector mount is too tall to fit in my office

So cleaned up my work area, cleared out my livingroom (which has a high ceiling), and set up a new testing/work area there, with all the best comforts available :

As cushy as this is, I still would prefer to do my coding from my office workstation as much as possible, so also worked improving my 'visualization'/'simulation' more. Even then though, I still found that every time I deployed new code to the machine I was running into tons of hard to reproduce bugs, so I spent some more time adding a ton of logging to the code, and improving how the logging works to make it as easy as possible to examine different subsystems, etc.

The real big change though came after that. I captured some weird bugs on the machine, and then took the logs back to my desktop to investigate, but it was slow going reading the logs and attempting to figure out what was important when trying to reproduce the issues virtually. In particular I had one log file that contained nothing but a log of every switch closure/opening that I was staring at since there were some weird switch issues (flickering, etc) going on.... and I thought to myself, with this info, couldn't I just play back the entire game?

So I spent a weekend writing a 'recording'/'playback' system that could read any log I give it and run the game on my PC to recreate the exact sequence of events. With that, I could add tons of breakpoints, pause and step through the code, etc, and pinpoint the issues. Plus, the recordings make perfect automated test cases, so I now have a growing collection of recordings of resolved issues that can be automatically run to verify the game is functioning properly when I change more stuff.

This had further benefits too beyond tracking down bugs too. When developing new bits of the code, I no longer need to click through the game to access the areas I want. I have premade scripts for "complete a hand", "qualify multiball", etc that I can just run whenever needed, which has made development much nicer.

Plus, since it's a recording, I can speed it up. Here's a video of the game playing back a recording of collecting 5 cards, starting multiball, and then lighting a jackpot:

Overall, I'm still spending a lot of time working out bugs, and figuring out how to handle various standard game things like various priorities overriding each other while I develop the game code, but it's been worth the time to slow down and improve my workflow. The game is going to require a lot of code, so if coding the game isn't fun by itself, then I'm in trouble!

Posted Friday, October 23, 2020
at 09:22 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 38

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Not much progress lately, all my time has been taken up by other things

I installed an up-post next to the magnet to catch the ball as it comes around the left orbit

Was a bit nervous about the installation since this wasn't at all planned for, and I had to just eyeball the location, but luckily it did barely fit

The post itself is a bit smaller than the sleeve, but the sleeve itself is nearly touching the magnet, so I definitely can't really get much closer

Sadly, even with this set up, the magnet still couldn't grab the ball. In retrospect I should have just screwed a regular post in at this location and tested the magnet with that first. If I pushed the ball even 1/4" closer to the magnet, then the magnet had no trouble grabbing the ball, but with the ball leaning against the right wall, there was just slightly too much distance. I can't move the wall, since it's part of the shooter lane, and I can't move the magnet, since it has to be aligned to drop to the upper flipper.

Again, I wondered about having an exposed core, and whether that would be enough, but I didn't want to drill the playfield to find out. Before setting up some test cuts on my spare playfield, I decided to test out the best-case scenario: instead of an exposed core, just expose the whole magnet! I stuck the magnet under the lexan sheet on my test playfield, and ran some wires to test it:

No problem here. The magnet easily grabs the ball from at least 1-1.5" further than it does with 1/4" of plywood in the way. I'm now very curious how this compares with the large exposed cores Stern uses now, but still don't want to spend $50 to find out. Even that wouldn't be needed though, if I do end up going the route of just covering the entire playfield with a plastic sheet, which is looking more and more enticing as a solution to many of my issues.

The main problem right now is actually cutting the sheet. Circular holes shouldn't be a big issue, but I'm not sure how cleanly I can make the slots for the target banks. My biggest worry is all the star rollovers. I'd have to cut holes for each of them that align very well with the holes in the playfield, and then raise the rollovers up to be flush with the sheet. I'll need to practice some more with my spare material and see how cleanly and accurately I can make all these cuts. Long term I'd probably need to get this laser cut, but I haven't had any luck finding a place to get a cut this big made yet

Posted Tuesday, October 20, 2020
at 02:02 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 37

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Last month I picked up a world cup soccer, and while shopping it I noticed that it had the same style one way gate as one of my spares, with a second wireform to hold the gate open, and that this was the type used by TNA, so it's available from PBL. I did a rough mockup of the part from measuring it on WCS, and it looked like it'd fit, so I ordered the mech from PBL for $30, rather than making another custom mech.

Of course, it didn't quite fit, but I was able to make due. I ended up having to move the mount for my support rails in a bit, and then mounted the gate mech on top of the rail at an angle. I could have put it in a nicer position, but I'd mounted the switches for the lanes in the way. As I probably could have predicted when I decided to do all my switch wiring with one mech still missing, it was a bad idea.

When I hooked it up to test it first, the gate didn't work. I could hear it buzzing, but it wasn't quite strong enough to pull the flap in. If I gave it a small nudge it'd work though. Once I turned the playfield over, gravity did the work for me and it worked fine. In retrospect I realized that this is another mech designed for 50V, not 25V, so I guess I should be happy it works at all. On the plus side that means that it's pulling such minuscule power at 25V that it'll probably never overheat, even without any PWM. I left it on for two minutes and couldn't even feel any warmth from the coil. I like the idea of being able to just have gates and diverters constantly energized, vs having them react when they know a ball is coming at them. There's a lot of times in other games where I get caught by surprise by the orbit coming around or not coming around, etc, since there's no indication on the playfield. At a minimum I think it'd be nice to have a little stop sign insert or something if you're going to do that...

Using a transformer that only outputs 25V seems to be my single biggest mistake so far with the whole project.... It's just continually messing me up since it's not something I ever really thought about before. As much as I like the gottlieb flippers and the general retro feel I think that, if I do another homebrew after this one, I'll either switch to all 50V, or at least get a transformer that can support both, and just use williams mechs...

Posted Tuesday, October 20, 2020
at 02:01 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 36

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



In order to prevent the arcing from destroying my relay contacts, I switched to driving the magnet using a TIP36C that in turn was grounded via the relay instead. That way, the high current is switched by the transistor, so there's no possibility of arcing, while the relay still allows me to control the 50V coil via my 25V driver FET. I mounted the TIP36 on a small bracket made from left over aluminum to act as a heat sink.

With this, the magnet functioned properly, no more locking on, but it also somehow managed to blow my 50V supply's fuse. Even upping it all the way to a 10A slow blow didn't help; I couldn't energize the magnet for more than 1 second. I think this must have something to do with the caps on my voltage doubler, as the lower rated fast blow fuse directly powering the magnet isn't blowing...

Regardless, none of this seems to matter since the magnet still can't grab the ball from the orbit very well. Even with, a medium speed ball thrown by hand, the magnet seems to have almost no effect, let alone being able to grab it. At this point, seeing how bad even 50V is suited for this task, I'm going to stop bothering with this approach for now, and just install a diverter of some kind, as I can't see any of my other ideas improving on it enough for this to be a reliable function in the game. I'm hoping to have at least one multiball be all upper flipper based, inspired by classic lawlor layouts, so having a reliable way to feed the side flipper is a must...

Posted Tuesday, October 20, 2020
at 02:01 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 35

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



3D printed some brackets for the screen. It's funny, prior to getting a 3D printer "how do I mount a screen under the playfield?" was a really big question mark on my project's todo list. With a 3D printer, I had it mounted just fine with 5 minutes of modeling.

Made a test screen hole in my testing playfield plywood. Messed up the cut spectacularly somehow, my whole rectangle was like 1/4" skewed. Not sure how I managed that when I made it by tracing the screen, but oh well.

I also tried mounting a test piece of 1/16" lexan over the hole, to see how much it deformed. I screwed it in at the same positions that the nearest posts are on the real playfield, to get an idea of how well it'd be held down. I had problems instantly with a bit of warping, since my holes weren't placed perfectly.
I think that to use this on a real playfield I'd need to pre-drill all the screw holes with a slightly larger bit, so it has some room to slide around while I'm tightening everything down. Then I'd have to work from the center outwards as I attached everything to try to keep it taut.

My initial test of 'pressing it down with a finger' didn't seem very promising. I could flex the hole down way more than I can on my Black Hole. I still don't understand how the super thin window on black hole is so sturdy when every plastic I've looked at is so much more flexible...

In the end though, I realized I shouldn't be testing with my finger, but with a ball. Setting a ball in the middle of the hole has almost no effect on it, and it seems to roll across it fine. At worse, I can always make a second layer of plastic just for the screen, to bridge that section if it becomes an issue, so this approach still seems viable.

Another benefit I thought of is that I could conceivably mount my magnets way closer to the ball. With wood on top of the magnet, it seems like most playfields are still retaining 1/2-3/4 of their thickness to keep the wood solid, which means the magnet is probably about 3/16" away from the ball in the best case. With a plastic covering, I should be able to cut that down, which should make the magnet stronger, and might help with my issues on the upper magnet. I'm not very familiar with the physics of magnets though... I'm curious how this would compare to the large metal cores on games like TWD. Is a 3/16 thick, 3" wide metal core on top of a magnet generating a larger field than the entire winding itself does?

Next I need to figure out if I can use my star rollovers with it. I used them a lot in the design since they're easy to cut the holes for (compared to a rollover switch slot), but I know I've heard about issues with them and playfield protectors...

Posted Thursday, October 15, 2020
at 09:38 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 34

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Received my replacement screen today:

Will try to hook it up this weekend and get it displaying some images, then do some text cuts on my spare plywood to figure out mounting, and see how well my lexan sheet will work.

In other fun, my flippers have suddenly gotten very weak (can barely make it up the ramp). I hadn't actually had the game on in the past week or two since I'd just been working on code, so I have no idea how long it's been like this. Always a fun issue even on regular machines, so I'm sure it'll be fantastic trying to track it down here...

I wish there was a reliable way to quantify flipper/coil strength so I could really check on stuff like this, make sure I'm not going crazy, etc...


Finally tracked down my weak flipper issue... I replaced the bridge, no change. Replaced the capacitor, no change. Checked signals with a scope, everything looked okay. Cap smoothed the signal out well, peaks were proper height, everything seemed proper. Then I realized... the fuse was blown. I never even considered checking that, since obviously the flippers were working. Something about the way I hooked up two bridges in parallel, one with a smoothing capacitor on it, must have allowed enough voltage to build up through just one side of the AC, through a common ground or something, that allowed it to still get the flippers enough power to flip. Not really sure how that could be, but. I thought I had replicated the circuit gottlieb used on black hole accurately, but the one difference was that I had a separate fuse for each bridge (although I only fused one side of the inputs) while Gottlieb had a shared fuse for both bridges.
I assumed that was just a cost saving measure, but maybe it's actually because of this?

I also realize now, looking at the schematics, that they don't actually fuse the DC side of the bridge, which is interesting. I guess they figure that the per-coil fuses will usually catch those issues? I guess they usually do, at least in my experience. I definitely didn't fuse my solenoids enough overall. I put separate fuses for each flipper and bumper, but the controlled coils only have the one shared fuse on their driver board. More concerningly, I've never blown the on-board fuses for some reason, but I have blown the rectifier fuse when a coil locked on, despite the rectifier fuse being 8A slow blow and the on-board being a 4A fast blow. Hopefully that doesn't become an issue.

I've also designed another iteration of my driver board since my rev 7 that I assembled still had mistakes, though I haven't ordered it yet since I'd like to get some more boards done for a combined shipment. This time, I restarted from scratch. My previous schematic had been carried over and repeatedly modified since my original rev 1 board back when I started learning how to design boards, and was a bit of a mess.
Before:
After:

I'd also been repeatedly running into issues when designing the boards trying to fit them in a 2x4" footprint. Over time I went from 13 FETs to 16, added driver chips, fuses, test points, indicator LEDs, etc while still using the same size board, and it had gotten really hard to layout. This time I scrapped the voltage indicator LEDs, and dropped from two fuses (one for each bank of 8 drivers) to one fuse. Originally, I had designed the board so each bank could be operated completely separately, and could be configured with pullups for PNP transistors or pulldowns for NPN transistors, so that it could also be used to drive an 8x8 lamp matrix, but that use has sorta disappeared in the intervening years.

Those part removals combined with some tricky layouts let me finally get all the transistors layed out neatly. This also means that I can now stick both solenoid connectors on one side, and keep all the low voltage signals on the other side of the board, to clean up the wiring a bit more

Rev 7:
Rev 8:


Yesterday my second screen shipped out, so of course today my original screen I ordered from China arrived out of the blue.. Only took 2 and a half months. This one included a USB power cable, which is nice since now I won't accidentally fry anything by using -12V, but it's also weird, since USB is 5V. As far as I can tell, the boards are identical. Not sure if there's something I can't see that's different or if one of the sellers was wrong about the supply. Was also able to confirm that my first screen is still good, so I must have only damaged the driver board, so now I've got a backup. And soon I'll have two boards and 3 screens. My attempt to get a cheaper screen from china has now cost me about $130 I guess that's what I get from ordering something from overseas during a pandemic though

Posted Tuesday, October 13, 2020
at 10:15 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 33

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



My screen still hasn't arrived, so I gave up and ordered another one. Hopefully it will arrive eventually..

In the mean time, I tried out an idea I'd been toying with for a while. I don't know where any of my lights will go, or how the art will look, and it's hard to play with that, so why not make some temporary artwork?

I dug out an old projector, and hung it from a 2x4 sticking out from my upstairs landing, and lined up the game underneath, then I loaded up a quick mockup:

I expected it to be a bit hard to play like this but it was actually surprisingly easy to ignore and play like normal. The quality isn't very good though; the cards aren't readable even at 1080p. With a 4k projector this might be workable beyond rough prototyping, but it'll probably work for now. I also had to put the projector really high up, probably 10+ft off the ground. Gets to be a real pain turning it off and on without a remote

With this I'm hoping I can get the game much more fleshed out before needing to commit to making a new playfield and moving everything over

Posted Tuesday, October 13, 2020
at 10:14 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 32

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Coded the logic for actually determining which hand won, and displaying the best 'hand' from each hand of 7 cards. The code for finding pairs, straights, etc was surprisingly simple and fun to write.

Since it can identify what hands you got, I can now tie that into what modes/multiballs are enabled at that point. Unsure what I should do if you manage to get multiple different hands.

For instance, what if you manage to get three pairs? Technically only your better two pairs will count as far as the poker game goes, but if each pair qualifies a mode, should you have the choice of which one(s) to play? Should only the higher two pairs' modes be lit, effectively making lower cards' modes harder to get?

If you get a straight and a pair, and then you play the mode you get from the pair, does the multiball you got from the straight go away, or could you go play it after finishing the mode?

If you qualify a mode, but then immediately go into the shooter lane to start another round of poker, should you lose that mode, or should it still be available? Should you be able to start a mode mid-way through a hand?

So many questions... Luckily the decisions on these aren't really hard to change the code for, they could even be settings technically, although I'm not going to bother coding any settings menu or anything since I can just edit the code I'll probably go with the most restrictive options for now (if you take a mode you lose your multiball, etc) just so I don't have to deal with coding a mode select screen yet.

Posted Tuesday, October 13, 2020
at 10:13 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 31

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Coded some initial spinner rules. First time you shoot the spinner, it stops it in the upper lanes. Next time it orbits around back to the left flipper for a 2x spinner shot, and stops it in the lanes. Then you get two orbits before it stops it, etc.

Coding this was way harder than that sounds, due to me not really thinking about 'shots' and such when I designed the playfield. A ball shot through the spinner could go in one of six lanes. Or it could fall back through the spinner. Or fall down the shooter lane. Or it could manage, theoretically, to go below the left one way gate and continue on to the left. When the gate is open, it will usually go all the way around, triggering the left orbit switch and the left inlane on its way down. But it could also fall short into the upper eject, or go under the ramp, or fall even shorter into any of the lanes, etc from before.

Originally I figured I didn't need to care about this too much. I'd just consider a shot to the spinner as whenever the spinner suddenly spun a few times. But when I'm purposely designing the code to let you repeatedly rip the spinner, it's very likely the spinner will still be spinning somewhat by the time you rip it again, or you could even go right under it while it's spinning, so I ended up with a ton of code for different edge cases trying to detect when the player does a successful orbit or not, multiple timers going on, etc. It's a bit of a mess, and it's going to be even more of a pain to debug if something goes wrong.

It would have been really nice to close up some of the areas a bit more so I could know 'for sure' whether a ball passed through there, rather than having a big open area up there for the ball to bounce around in. Too bad big areas for the ball to bounce around in are fun...

Scoring wise, I'm trying to sorta take a page from Meteor, since I like the way its spinner value is continually fluctuating. For the first iteration of that, my attempt is to make the spinner score more when you having matching numbers of drop targets down on each bank. For instance, the spinner starts at 10 points. You knock down one target on bank A, that goes up a bit. You knock down one target on bank B as well, that number goes up even more. Two targets down on each bank is better than one, etc. I'll try to balance it so you can get the spinner up really high, but at the same time if you hit one stray target it may ruin it completely.

Hopefully this will also encourage people to 'shoot around' more, instead of finding one or two banks they feel safer on and just picking targets off those

Posted Friday, October 02, 2020
at 10:58 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 30

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Coded the basic structure of the skillshot. I'm pretty dissatisfied with most skillshots in games currently. Most seem to either be 'just plunge the lit lane', or plunge to a flipper and hit a lit shot. You don't really care about your plunge at all. Some games like Deadpool make it a bit more interesting by locking in your lane choice. Most games that actually require you to plunge to a specific spot (such as Taxi) just make you learn one or two plunger positions, which I think can get boring once you've learned them, since at that point you're just slowing down your game to squint at the plunger. My goal here is to have a lot of different places to plunge to, and have the context of the game make you change which one you're plunging to frequently.

There are seven different places to plunge to:

Red: plunge just far enough to clear the diverter. Diverter will close, leading ball to right inlane
Orange: plunge so that the ball hits the lower magnet switch, without hitting upper magnet switch. Magnet activates, pulling ball to the left and feeding upper right flipper (well, hopefully, if I ever get it working)
Yellow: if you plunge past the magnet and hit the upper magnet switch, you'll fall back down and feed the right inlane, similar to the red skillshot
Green: The lower 3 lanes. Not sure what will happen with each lane yet, maybe one will be lit as an extra target
Blue: Upper 3 lanes, same as green
Pink: plunge and fall into the upper eject which will then feed the upper left flipper. Really hard to do, worth the most
Purple: Hard plunge all the way around and feed the left inlane

The Pink and Purple skillshots are made harder since there's a one way gate to the left of the lanes, blocking them. Currently I have it timed so it's open for 2 seconds, then closed for 2, so you'll get redirected to the lanes or let through based on your timing.

Your current 'bet' amount is determined by where you plunge, so you can choose to bet a little or a lot while still keeping it 'pinball'. I'm thinking the bet amounts will be percentages of your total 'bank', so you'll be forced to bet more later in the game. You can return to the shooter lane at any point while playing your poker hand by shooting under the upper right flipper, so you can adjust your bet if your hand is looking better or worse.

In addition, there will be an award on each skillshot, that you can only get if you 'call' your shot by selecting that award with the flipper buttons. Currently it's just points, but I want to eventually put other stuff in there to mix stuff up. If it's only ever points, they'll either just be ignored, or they'll be so big they're unbalanced, so I like to put 'in game' effects into stuff wherever possible. But that will have to wait until I have more game coded to affect.

The graphics themselves on the screen are pretty basic right now, but serviceable. I kinda dread getting to the point where I actually need to make this stuff look nice somehow. Even for a simple screen like this, I think more code is dedicated to drawing and updating the screen than there is to the actual skillshot logic... It must have been nice in the DMD or alphanumeric games where you could often just slap some text up and be done with it

Posted Thursday, October 01, 2020
at 09:43 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 29

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



I've spent a good amount of time playing with the upper magnet. It's positioned next to the shooter lane, right orbit, so that it can drop the ball to the upper right flipper.

The magnet had two use cases:
1. for the skillshot, if you plunge the ball up so that it stops next to the magnet, and then the magnet activates, pulling the ball sideways from the shooter lane to then release it to the flipper
2. to feed the upper flipper via left orbit shots. this is the main use case, with the skillshot just being a bonus. I didn't really forsee a problem with this while designing, but I've come to realize that this just isn't how magnets are normally used in machines. Games like Twilight Zone will stop a fast moving ball on an orbit, but they have the magnet directly under the ball's path. The magnet acts only as a ball grabber, not a diverter. Most cases I can find of magnets being used as diverters are things like TWD's crossbow, or WCS's lock. WCS is the closest to my use case, since it specifically grabs a moving ball, stops it, then drops it. But even WCS has issues grabbing a fast moving ball.

I quickly discovered that my original plan of wiring and mounting this magnet the same way the magna save is mounted just won't work. The magna save coil is being powered using 25V, while most newer games use 50V for their magnet. So I hooked up my 50V line to my magnet relay, instead of 25V, and... immediately fried my relay. The 50V is strong enough that, when the relay deactivates and its contacts move apart, the voltage will just arc across the gap and continue powering the magnet while melting the contacts. I had a similar issue with the 5-bank reset coil, and was able to fix it by adding a 10uF, 300V capacitor across the contacts. For some reason this doesn't work on the magnet. I wondered if the magnet was stronger, but the magnet actually has more resistance than the drop target coil. My random relay was only rated for 3A@25V though, so I ordered a really beefy relay, which was rated for 30A (!). I think my magnet should be drawing about 10-12A at 50V, so that should be plenty. But that relay also had constant arcing issues. I tried bigger snubber capacitors, other snubbing solutions, even disassembling the relay and physically bending it so the contacts are farther apart, and nothing helped.

It seems like switching 50V@10A just isn't reliable via a relay somehow, though I don't understand why. Modern games all control their magnets via transistors and mosfets, although I don't know if that is specifically to avoid this issue, or for other reasons. The problem is, I can't use those here, since my 50V has a separate ground from my 25V. My next plan is to get a TIP36C (which is what williams used for their 50V coils in the 90s), and then try to use a relay to switch the gate (instead of having a microcontroller switch it like normal) which feels like horrible overkill, but it may work. Even at that point, I'll still have issues because I can't PWM a relay, so I'll basically be running the magnet at full power. I'm not sure how long I can power the magnet like that, hopefully it's long enough to get the ball settled.

The magna save is also a completely 'below playfield' magnet, with no visible core. Adding a core that goes all the way through the playfield helps make the magnet stronger, and I assume that this is why games like TWD, which need to grab a ball shot at their wide bash toys, use an even bigger exposed magnet core. At first I figured I should just order one of those larger exposed cores, but they're incredibly expensive somehow (the large core costs more than the magnet itself!). Even a regular size core is expensive. I don't really want to spend that much money on something that may not even be useful, so for now I've just bought some 3/4" steel roundstock that I'll use to test the smaller exposed core. I can't find any info on how much stronger this make the magnet.

All this is still up in the air, too, as I don't know if the magnet will be able to grab the ball properly even with a large core and 50V, given the crazy speed my left orbit shot has. I've spent a lot of time trying just to get the 50V to work, and still haven't been able to even do a single test yet to see if the 50V can grab the ball since it keeps melting stuff

I'm also trying to consider other approaches, such as replacing the magnet with a physical diverter, but currently I can't find any good way to fit one in with my current constraints, and I would still need a magnet or an up post to hold the ball for a reliable side flipper shot after the diverter gets the ball to the flipper...

I may also try putting an up post in the shooter lane, specifically to stop the ball as it comes down the lane from the left orbit, and then using the magnet to pull the stopped ball over the flipper. I am running low on drivers for the coils though, so I want to avoid adding in more coils if possible...

Posted Tuesday, September 29, 2020
at 08:58 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 28

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Got the basic habitrail installed. Made a half height, low quality mount to hold the other end, which seems to work okay.

It looks like I can make the curve on the entry mount wider for a smoother feed. This is the original:

And here's my current iteration:

Mounting the entry mount was also an issue, since I didn't really plan for that. I ended up putting it on a standoff on top of one of the existing ramp's mounting holes, but I still only have one screw holding it. It seems to work okay, so I'll leave it for now. I could probably extend another support out to the posts behind the 2-bank if necessary, but I don't want to cover the playfield any more than necessary.

I also needed a place to mount the switch, so I stuck a microswitch through a small gap. To prevent airballs, I put holes on the top to screw a sheet of clear plastic into. Still need to figure out how to attach the plastic on the left side of the ramp. I don't understand how Mars never has airball issues on its ramp... seems hard to believe that they managed to make it the exact height needed for their flipper strength, especially since I'm using the same flippers!

This is my final entry design. Looks pretty weird, but it works. :

I had to add some side rails to keep the ball from falling off, especially at higher speeds. Lock post worked on my first try with a random guess for the pulse length, which surprised me.

While it's nice to know this works, I probably will avoid locking multiple balls this way, since I don't have any way to mount a switch behind it to know if it failed to release a ball due to the ramp positioning. Sadly, this was the only position I could fit the post mech in, so I'm a bit constrained here. I'mthinking I'm going to have most multiballs work by locking one ball on the ramp, and then you get a second ball to plunge, and the ramp ball is released once you hit a switch. Maybe there will also be something to let you short plunge and combo up the ramp to lock a second ball, for three ball, or a rule about locking both balls during MB to release a third. Since there's no auto plunger I can't really have a normal add a ball. I feel like multiballs lately have been a bit boring design wise, so I'm hoping to do more stuff with multiple phases like DE used to do, or maybe more advanced stuff like a special multiball that you can only work towards qualifying while you're already in another multiball, at the cost of ignoring the current multiball's jackpots to make that progress...

For normal ramp shots, I programmed the game to engage the post as soon as the ball makes the ramp, and then disengage once the inlane switch registers, but I had issues with the ball bouncing over the switch since it was just dropping off the end.Inspired by Metroid which I saw at Pintastic last year, I made this end cap for the rail to make the ball drop nicely.

It worked, but I didn't like how it looked, so I made this instead, which seems to work fine and looks more natural:

Posted Tuesday, September 29, 2020
at 06:30 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 27

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Here's a big case of 'wish I was using MPF'... Testing live on the machine was a pain since it was at the other end of the house from my regular computer. So I wanted to be able to easily test stuff virtually. MPF has a nice application for this. Lets you import a picture of your playfield, then drag and drop switches, lights onto it. Pretty handy, so I recreated it using my new rendering capabilities. Not a ton of work in the end, although mine lacks some polish...

Squares are switches. Red means closed, yellow/white means open. Left click to toggle open/shut, right click to quickly press the switch and release it again. Diamonds are coils, they turn red when energized. The white circle above the right inlane is a light, currently off, currently wired up as a 'lower ramp w/lit'.
Another in the left outlane will turn green when the mini-playfield is enabled, triggering the down post to let the ball in. Hopefully I can use this to get a slightly better feel for where lights will go.

I also added some code to do stuff like automatically opening the drop target switches when the bank resets, auto closing the shooter lane switch after a ball is released from the trough, etc. Stuff that would happen physically on a real machine. Otherwise it gets to be a pain to use, since the drop target coils would repeatedly fire until you remembered to click each switch again

Posted Tuesday, September 29, 2020
at 06:30 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 26

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Code can't get very far without some read-outs. I don't have any lights yet, so for now my 'screen' will have to do. Currently that 'screen' is a 50' HDMI cable running to my livingroom TV, but it'll do.... I spent a long time trying to find a good R-Pi compatible graphics library that would work with Typescript/Node. For some reason, everything seems to have been abandoned 2-3 years ago, and doesn't work with modern Pi operating systems. I'd be fine with even coding the graphics from scratch with a plain OpenGL context, but even a simple library to provide that seemed to be missing.

Eventually, I found a simple library that supported things like basic shapes, images, and text, that was designed specifically for RPi game dev, but had been abandoned partway through development. The author's last update said that they were working on keyboard/mouse support, since without that a game graphics library isn't very useful. Well, it's useful to me! no keyboards here...

Only problem was, it didn't work with the latest RPi OS, since they introduced a new graphics card driver, and it wasn't compatible with Windows (my dev OS). So I dug in, forked it, and made my own version with RPi 3 support, some features and bug fixes, and, with one late night hacking session, a shaky but usable windows port. Not too bad, all things considered. The nice thing about this, vs using an established library (if one had existed), is that if I find any other bugs or shortcomings, I can just easily add whatever I need, since I'm already maintaining my own fork.

With that out of the way, I got some initial status displays set up. Very rough currently; I am not in any way an artist. Hopefully I can work up something half decent for the screen at least, but actually doing some art for the playfield is probably beyond me... More mountains to climb down the road

I can add more cards from the drop targets

No scoring or ball logic hooked up yet though... I also need to figure out what exactly is actually going to happen once you complete a hand. To keep with the 'real poker' goal, technically you should have a final opportunity to bet before your opponent reveals their cards, so I figure you'll need to shoot a shot that can hold the ball to finally flip the cards and declare a winner. In this case, my only ball holds are the upper eject hole, the ramp, and the shooter lane, so I'll have to figure out some logic for that, as well as how exactly you can 'fold' if your hand is looking bad. I'd like it to be something on the playfield, vs some menu interaction, but it has to be something very hard to hit accidentally....

Current lines of code: 4,106

Posted Friday, September 25, 2020
at 10:25 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 25

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Began work on the habitrail for the ramp, to return the ball to the left inlane. I 3D printed some clips with flat bottoms to make it easy to hold the rails while I align them and work. The plan is eventually to either use some brass and solder it, or try to braze some steel, but for now, I'm using some easy to bend 1/8" copper wire (and cheap, since it's just on spools at Home Depot) to get it right and test things. I'm curious to see if the clips can hold up to soldering/welding, it'd be convenient.

The actual alignment is a bit iffy; since my ramp model didn't match the actual model that means the habitrail I drew won't line up with the physical ramp either. I tried to eye-ball adjust it to match where it looks like the ramp actually is, but we'll see how well that works.

The actual attachment to the ramp will also be weird. It was designed to connect to a plastic tube that goes across the playfield, and didn't have much flow. Originally I just sorta hand-waved this part as "I'll make something to hold the habitrail, can't be that bad", but now I'm at the part where I need to actually figure out how to connect a ramp whose shape I don't know to the habitrail I haven't built yet.... Here's my first attempt. I'll probably just have to print this a lot of times to get the fit right, assuming the basic shape even works.

Posted Thursday, September 24, 2020
at 10:36 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 24

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Earlier, I went searching for an LCD to put in the middle of the playfield. After a lot of digging, I ordered this 9" screen from AliExpress. Seems to have HDMI support and can be powered with my ATX power supply, but it's hard to tell for sure. There's a ton of different badly documented screens for sale, with conflicting information about what they support or how to drive them. It seems like there's really only two driver boards floating around, one with VGA support and one without, judging by the pictures, but some of the items for sale are clearly wrong about what they're offering. Lots of fun. But for ~$30, I'll take some gambles. Any screens for sale from more reputable US sources seem to be $100+ which is a bit ridiculous. Originally I planned to just buy a monitor and strip off the case, but it's hard to even find a 9" monitor, and the more common 10" won't fit my playfield.

Sadly it's been more than a month since I ordered the screen, and it still hasn't arrived. Tracking last showed it leaving China on 3/30, so not sure if it's gotten lost or just stuck in customs or something forever...

Not a super big deal, I guess, since I don't have any way to really mount it yet.

I'm investigating different options for plastic to cover the hole. Not sure what material is best as far as being pretty sturdy but also thin and scratch resistant. Based on the Voyager homebrew, I'm also wondering about just using a single large sheet of plastic for the playfield as opposed to recessing a smaller cover. I wouldn't have to worry about routing out the recess for the window, or about doing any inserts either, and no need to clearcoat. A lot of other possible issues arise though, so that'll need some more investigation. Once I can find better what material to use, I'll try to order some sheets for experimenting

Posted Thursday, September 24, 2020
at 10:35 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 23

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



While getting some basic code running to reset the drop targets and eject the holes, I suddenly lost an entire bank of solenoids. Inspecting the board, I eventually figured out that the board had been repaired so many times as I modded it to test different things that one of the traces carrying the solenoid ground had just gotten ripped off completely. At this point it probably had 4 jumpers on it already, and multiple cut traces, plus some of the mosfets had been replaced three times, so I decided it was time to junk that pcb and build a new one.

One of the main issues that required all those modifications early on was my changing requirements for how the inputs would work. First I'd had them active high, then active low, and then I'd had to change which pin they were. Back when that happened, I redesigned the board to add some more configuration points, so each I/O could have a configurable pull up/down, as well as fix some other pain points. I added LED indicators that the fuses were good, test points for the voltages, and combined my 6/6/4 pin connectors into two 8 pin connectors. A big goal on these boards as I design them further is just making the connector count as small as possible, since they needed to get unplugged so often. I'd actually had the new PCBs on hand for months, but hadn't needed to actually use one yet, so I started assembling:

Sadly, I discovered an issue with my design early on: at some point I had mirrored some of the components. For the mosfets, that wasn't too bad; just turn them around, but I'd also mirrored one of my 16 pin chips, which resulted in the horrible hack of mounting the chip upside down:
Sigh. I guess another pass at the design will be needed down the line. It'll work for now though, just hard to mount

Posted Thursday, September 24, 2020
at 12:24 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 22

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Switch and coil wiring complete!

It's hard to really grasp it from the pictures, but for comparison, here's the relatively empty bottom right corner with a few switches wired from before:

And after:

This area can still use a bit of cleanup, but I ran out of my little metal strips for wiring support as well as the plastic ones.

Also visible here is my attempt to save some more solenoid drivers: two gottlieb pop bumper driver boards. These are wired up to the slingshots. It seems to work fine, and makes me curious why Gottlieb still used EM style driving for their slings while using driver boards for their pop bumpers. Eagle eyed readers will also note that one of those driver boards says NG on it. Surprise surprise, that board was... not good. Instantly locked on one of my slingshots. Genius. I also figured I could very simply enable/disable these by just hooking their logic ground to one of my driver mosfets, but it turns out that makes them glitch and fire randomly when you turn them on and off, so I reverted to doing what gottlieb did, and cutting the ground signal to the switches.

Some more wiring pics:

I was able to mostly follow my sketched wiring from earlier without issue. The one place where it got weird was the mini playfield at the bottom. Since there's no support rail out there, I ended up having to run the solenoid wiring along with the switch wiring around the right flipper to reach it. I'd planned on it going around the lower edge, or between the drops and the flipper mech to leave all the area between and above the flippers open for lights, but there just wasn't room

Out of 62 switches, I only had three wiring issues to fix on my first switch test pass, which is nice. Very glad I didn't mess up a whole column or anything. There doesn't seem to be any sure fire way to confirm that a matrix doesn't have any issues, but I knocked down lots of drops and hit lots of switches, and didn't get any incorrect readings.

With that out of the way, I was able to get to the most important part: getting something on the playfield to react!

Now I can start actually coding a few simple rules, and try to play some test games where I imagine different targets are lit and shoot at them to try to get an idea for how my rules to work, and I won't have to stop every 30 seconds to manually reset a bank of targets or eject the ball from a hole

Posted Wednesday, September 23, 2020
at 03:23 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 21

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



In the midst of wiring, I've been taking some breaks to start on the code. Against my better judgement, I'm going to attempt to write all the game code in Typescript (a type safe superset of javascript), and run it via Node off the Raspberry Pi. I'm a bit worried about performance, but I figure I can always optimize it, shirk off some duties (such as video or sound) to a C backend, or upgrade to a Pi 4 or a x86 based board with a Pi compatible GPIO header at worst. Why Typescript? Because I've been using it at work for so long that trying to use most other languages is unbearable. Typescript is just so nice and developer friendly...

Hopefully this all makes vague sense to people who haven't coded a pinball machine before:

I also am going to try to take a different route from how (to my knowledge) all other pinball games are coded. I've worked with/explored a lot of systems (early williams/bally/gottlieb, wpc, MPF, skeleton game, etc) and they're all very much focused around a central concept: events come in (from switches, timers, etc), and then the code listens to those events, and sets some state (light on/off), fires some coils, etc. It seems to often lead to bugs where lamps get stuck on, balls get stuck in holes, etc, because there's state where there shouldn't be, or there isn't state where there should be.

For instance, on Demolition Man, when you collect the third claw award, it lights the 'car chase' inserts on both ramps. When you finish the mode, it turns them off again. But there's a bug where sometimes, if you drain while in car chase, on your next game, those lights will still be lit! Clearly, it's storing the 'state' of the lamp globally, and then forgetting to turn the state back to 'off' in some edge case. In my mind, that implies something wrong with the methodology they're structuring their code around. The lamp's state should be directly tied to being in car chase mode, it shouldn't be possible to 'forget' to turn if off. I'm sure there were tons more bugs like this that were found and fixed during development we never saw, if this one was able to get through multiple software revisions. I've even seen similar bugs on modern games, like Alice Cooper. On an older game like DM where they were writing in assembly and bytecode, and modes were a new concept, it's understandable that their handling of all this wasn't the cleanest, but with modern games where there can be tons of stacking going on, I want to come up with a cleaner solution for the lights.

Another example of the reverse case is something I've run into on my Taxi. In certain edge cases, the ball will go into one of the eject holes, and then won't kick back out. The game knows the ball is in there, since it registers in switch test, and it doesn't trigger ball search. Somewhere in the complex code surrounding the kickouts, there must be an edge case where it forgets to fire the eject coil. But again, that shouldn't be possible! We have a piece of set continuous 'state' here, which is that the ball is in the hole (the switch is closed), but its tied to a momentary input and output (the switch closing, and the solenoid firing). Since one of those momentary events was missed, the continuous state is now stuck.

In my mind, whenever possible, you want to match up these types of events/states. If a the eject switch is closed, the ball needs to be ejected. That's a 1 to 1 issue. The fact that sometimes, this might result in multiple momentary firings of the eject coil should be abstracted away. Similarly, imagine you had a shot where there's a down post and an opto. The game knows the ball is behind the post, since the opto is blocked, therefore it needs to release it. The same exact situation from a logical perspective: ball in hole/etc, ball needs to be released. But this time it's a down post, which isn't a momentary coil. You just need to energize the post until the ball leaves, no need to repeatedly fire the eject coil like in the first case. So I want to have a system where, in both cases, the game/mode's code is exactly the same. All it would say is something like "coil on if switch closed". Then a separate layer, which actually interacts with the hardware, can take care of things like, is this coil momentary? If so, fire it, then wait a bit. If the game is still requesting the coil to be on, fire it again. Increase the strength if necessary, or maybe trigger an operator alert if too many attempts have failed, etc.

With this in mind, my code works like this:
I have three layers: the game code, the machine driver code, and the actual hardware code. The game code is going to support stacking modes, sub-'modes', etc with their own priorities to override each other, etc. The machine driver code handles turning the 'wants' of the game code into commands for the hardware. In the simple cases this is just stuff like sending the 'turn on coil', 'turn off coil' commands to the hardware, but in cases of more complicated devices, it'll also manage that. For instance, my ramp has a switch to tell when it's up, and I put a switch underneath, to tell if a ball has gotten stuck under the ramp by rolling in from behind while it was down. The 'driver' will handle raising the ramp temporarily if it detects a stuck ball, or giving the lift coil another pulse if it detects the ramp has fallen down when it's supposed to be up. The hardware code will be very simple. It'll just handle reading the switch matrix, toggling IOs, etc, based on what the driver tells it to do.

The driver layer is going to have a list of every 'output' (coils, lamps, etc) the game has. Each mode will be able to specify its own values for any lamp or coil it wants to control. I'm then going to have a system that watches all the modes for when one of those values changes. It'll figure out which modes have priority, etc, and propagate the final value down to the driver. This way, I can have one mode say 'eject the ball from this scoop', but then, if needed, a sub mode that's playing an animation could say 'don't eject the ball right now', and block the coil from activating. When that sub-mode ends, the system will take care of automatically reverting all the outputs' values to remove any effects the sub-mode was having. In the case of lights, I'll also add support for combining values instead of overriding, so for instance I could have one mode say an arrow is green, and another say the arrow is white, but since they're stacked together at the same priority, the driver will take care of flashing the arrow green-white-green-white for them.

Hopefully this is all a good idea....

Posted Wednesday, September 23, 2020
at 09:39 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 20

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



My ribbon cable connector idea has solidified into a small custom PCB. I would have liked to have this custom fabricated, but the turnaround time is long, and the board is simple. If I'd known exactly what I needed sooner, I would have ordered it with some other boards a few months ago, but oh well.


My MPU board has a slot for a 26 pin ribbon cable. 16 columns + 8 rows = 24, but 26 was cheaper. I just ran every wire from the playfield to this board, and soldered them to the pins:

Wouldn't have been too bad, except that, since I want to avoid having any left over wire hanging around, I need to be soldering it while it's within an inch or two of the playfield, sideways A lot of careful soldering, but luckily no issues

On a custom board I would have made all the wires come in one side, but with no room to route traces here, it still gets a bit messy. 3D printed some simple brackets and mounted it to the very back of the playfield, and it was good to go

Posted Tuesday, September 22, 2020
at 09:37 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 19

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Wiring is progressing, not a lot to show...

I'm ending up running two main bundles of wire, one along each outside edge of the playfield, for simplicity. It gets a bit hairy in a few places where mechs are near the edge of the playfield; I need to make sure the wires don't get caught on the cabinet's supports. I guess this is another reason to use a wpc or stern style mounting system... Maybe if I get to a point where I can say the construction is 'done' and I don't need to take the playfield out completely anymore, I'll try to convert. Assuming it fits my playfield...

Trying to keep the switch wiring high enough to clear the mechs, and any future lights that get installed, while also keeping it as far from the coil wiring on the support rails. These stern wiring supports are great, and cheap at PBL, but sadly I only have two on hand. Wasn't planning on getting this far when I did my last parts orders, or if these would be useful, and now we're in quarantine so I'm trying to avoid unneeded orders.

To work around that, I found some random strips of metal I had on hand, and bent them. Seems to work just as well, and probably cheaper too, but I'd probably still use the plastic if I had a choice, just to avoid having random metal things to possibly short stuff against.
This all looks a bit messy right now, but hopefully once I have all the wires in, and zip tied together into a harness, a lot of the slack will disappear and it'll look cleaner. I also have a lot of coil wiring (like that white loop) where I've had to repeatedly rewire stuff as coils get added or changed, resulting in extra too-long lengths and wire nuts that can be cleaned up eventually. The wiring is going pretty well, and is pretty easy as long as I can reach stuff. The biggest pain is doing the connectors for all the drop target mechs. part of me almost wishes I hadn't bothered with them, but I know I'd regret it down the line. They require a lot of extra planning since you need to have both wires ready ahead of time before crimping, and you need to make sure never to have three wires join at a connector, even though that'd be fine at a regular switch.

I'm also realizing another issue: since I salvaged most of my switches from a Gottlieb playfield, they don't have the third lug for the diode. Right now I'm just sticking a diode on one lug, with the other end hanging free, which hopefully doesn't come back to bite me down the road...

One other hurdle to figure out soon is how to actually hook all these wires to the MPU. Right now I'm just terminating everything in the upper left corner of the playfield, which is vaguely where I picture the switch wiring leaving the playfield, since all the coil wiring is on the right side. I'm hoping I can use a big ribbon cable to connect the playfield to the MPU, to avoid having to assemble more connectors and run a lot of extra wire, since my wire supplies are already running low.

Posted Monday, September 21, 2020
at 09:53 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 18

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Quoted from atum:

Great idea on the rig! What all colors can you do and mark? Are you limited to black stripe? Or can you put a green stripe on red, etc. to get more possible color combinations with fewer solid (base) wire colors?

I bought all the colors at my local staples: black, white, gold, red, and purple. Weird arrangement, but ok. I used black stripes for the rows, since it was a color I was sure could show up on every wire color I was using. For the columns, since there was so much wire, I just left them blank (the sixth stripe color, invisible). Depending on how I handle lights when I get to that point, maybe they'll use some of the other colors.

I've also been using it to mark some of the coil wires. I managed to get 10 feet x 10 colors of striped 18awg fire off ebay that I used first where possible, but 10 colors is much less than my current 27 coils, and it turns out that 10 feet isn't long enough to reach from the bottom of the playfield all the way to the boards, so I had to reserve the striped wire for only coils on the back third of the playfield. My coil drivers are arranged into 4x 8 pin connectors, so I made one of those with no stripe, one with gold stripe, etc and tried to always use the same color ordering for pins. My rows go red-orange-yellow...purple-pink-brown, and so do my coil connectors, minus the random pre-striped wire thrown in. I've got a giant spreadsheet of all my connector wiring, and also use upper case vs lower case to denote 18 vs 22awg wire, which will allow me to reuse my limited stripe options more.
Coils:
Switches:

Posted Sunday, September 20, 2020
at 10:50 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 17

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



I populated the switch matrix components on the MPU board, and they seemed to test okay with any single switch. Still a bit worried about if the way I'm driving the switch matrix will work once I've got lots of switches down, but so far so good. Luckily, the actual wiring of a switch matrix doesn't really change regardless of how you connect to it, so even if my board ends up being bad, that won't mean rewiring the playfield. With that in mind, I started trying to plan out the matrix, which was surprisingly involved. Technically any switch could go in any position, so all that really mattered was what made wiring easier. I'd already wired up all the target banks as individual rows, so that constrained me somewhat, but beyond that I just tried to lay out all the other rows based on what groups of switches were closest together:

Doesn't look too bad so far!
Then I tried to connect up the columns...
That looks a bit worse. Then I realized I was going about this a bit wrong. No matter what, I was basically going to end up with two big bundles of wire going up each side of the playfield, and then joining at the back. So I need to re-order the rows in a way that will minimize how many rows/columns need to be run to the back, since that's where the most wire will be used. I also don't need the rows/columns to all connect together, since they'll join at the connector anyway, so I can simplify that a bit.
That left me with a new, more concrete wiring plan for the rows:
The columns, again, look a lot messier...

I feel like there must be a way to simplify this more, but I can't see any obvious major changes, and it doesn't look too bad overall. I'd love to see inside the mind of someone who designs the wiring harnesses for these games professionally.

I have nine colors of 22awg wire to work with, and the playfield itself uses 62 switches, which requires an 8x8 matrix. To keep things clean, I'd like to stripe the wires, so I can tell the rows and columns apart when working. Sadly I couldn't find any cheap sources of stranded wire online, so I came up with this:

Tried it first with a regular sharpie, but the ink would rub off quickly, so I got some oil based ones, which seem to stay on the wire well once they dry. Stick a marker in the top, pull your wire through the side, and you'll get a messy but usable stripe.

With that figured out, I started trying to assemble a minimal corner of the switch matrix for more testing, which ended up being the first three columns on one side of thee playfield, and two rows:

Switch matrix still checked out fine, so I'm going to go ahead and wire the rest of the switch matrix

Posted Saturday, September 19, 2020
at 03:05 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 16

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



To control the magna save and the outlane saver, I needed my secondary flipper buttons. I took measurements of my Black Knight, WCS, and JM to find out what the spacing should be, and was surprised to find that they were all different! JM's secondary buttons are further back than BK's, while WCS is not only further back, but also isn't 'parallel' to the rail (it looks to be parallel to the bottom of the cabinet instead, which makes it way harder to hit 'in the moment'). Both JM and BK feel okay to me, so I copied BK's spacing.

Luckily, the depression for a williams flipper button seems to be the same diameter as a star rollover, so I was able to use my forstner bit here too.

After I installed these, I realized that, in order to use them, I sorta need a switch matrix! That will be my next step

Posted Friday, September 18, 2020
at 11:17 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 15

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Mounted the final mech today, the outlane saver. I'm having some trouble with its reliability currently. It keeps going up too high and getting stuck above the playfield. I added a bolt across the bottom to stop it from going too far, but then the bolt got stuck instead. So I added a spring to prevent the bolt from hitting the bottom of the coil so hard, but the spring reduced the travel enough to make the mechanism weak. I'll need to play some with adjusting the lengths of the parts in an attempt to lengthen the travel, or maybe make a custom bracket to allow everything to be longer (currently I'm just using a regular up-post/vuk bracket).

Here's a video of what the saver does when it doesn't get stuck or bottom out:

It's super strong and just sends the ball flying back onto the playfield if you time it right. I like having an outlane saver that doesn't save you completely, it just keeps the ball in play. The magna save does the same thing to a lesser extent, and the mini playfield shot between the flippers also manages pretty well, since your shot tends to go right into the right slingshot and out of control. This can be good or bad, depending on your playfield situation, since chances are once it gets bouncing around it's going to knock down a few drop targets, which will help you complete your hand, but they might not be the cards you want to make a good hand.

If you fire the popper too late though, you'll end up with a ball that, due to its left/down motion, leaves the metal guide sideways, and just flies off to the left. I've had it end up in the left inlane, the left outlane, all the way down in the mini playfield, and even somehow jumping backwards into the trough. I'll have to put up some air ball protection to make sure it always returns to the playfield somehow.

Posted Thursday, September 17, 2020
at 04:07 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 14

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Next step was adding the diverter to the shooter lane. I have a bally gate mech, but it's designed for low speed inlanes, not very flowy. So I 3d printed a much smoother gate:

This mostly works, but I had issues where very fast balls would somehow get too much horizontal force out of it and hit the top post of the slingshot instead of directing down into the inlane. So I had to take 3 iterations of straightening it and adjusting the curve to get it to a point where even the fastest ball I can manage still goes towards the inlane, while a slow ball that just drops from the end still has a good chance of getting to the inlane.
Original:
Final:
It's a fine line because it needs to be able to fit behind the right drop targets and not block the shooter lane, so it can't be too wide or too straight.

I also added a little guide on the slingshot to smooth the transition, since the ball tended to bounce back and forth before coming down to the flipper

With the diverter and the left inlane done, I now have two more shots I can test.

First, the spinner/orbit:

This works, although it's a bit clunkier than I'd like. The spinner eats up some of the energy from the ball. I'll have to do some more tests with the spinner removed to see if there's any geometry improvements I can do. My upper arch isn't optimally designed, since it has a large flat part, which gives the ball time to 'drop' at the top and not follow the other side curve smoothly. Plus, with the lanes on both sides of the playfield, the shots hit the side walls at a more oblique angle which is probably leading to a less smooth shot. Might need to get the camera in slo-mo to see for sure

Second, the under-ramp/orbit:
I was worried about this shot since the left side curve of the upper arch is tighter than the right due to the ramp and upper eject area being in the way, so the ball had a the potential to hit the wall and bounce off at a ~25 degree angle, missing the curve completely, but luckily this doesn't seem to be the case somehow. In fact, it's smooth. SUPER smooth. And ridiculously fast. I took 20 shots at it, and didn't manage to loop it even once due to the sheer speed of the ball coming down the inlane. But I'm also not very good at that type of repeating shot. Can't wait to get this flipping enough to see some better players take a crack at it.

Posted Thursday, September 17, 2020
at 03:23 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 13

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Printed some inlane guides, and made a one way gate for the left inverted inlane.

Had a lot of trouble getting the inverted inlane to work properly. I made it with slots so it could be adjusted up and down, but if I put it lower, than a ball that just dribbled into the lane above the separator wireform wouldn't manage to make it over the gap, and if I put it higher to save those balls, then a fast ball coming down from the top of the playfield would hit the back of the slingshot and drain. There was also a weird issue that I could never reproduce by hand where a ball dropped from a middling height would somehow rattle to a stop and then fall down the outlane.

I designed this little gate to make it work at any speed. It works surprisingly well, although I'm sure it's going to break sooner or later since it's quite flimsy. I'll have to come up with a more solid way to accomplish it..

Posted Wednesday, September 16, 2020
at 03:55 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 12

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Some more small build updates...

Made these little clips for the ball arch. They go on top of the side rails and clamp one long piece of stainless down to the playfield. Eventually I'll probably drill some holes through it to mount it, similar to how williams games do it, but for now this will allow some easy adjustment while I play with the curves

In the spirit of getting as much mounted as possible to figure out placement under the playfield, I started mounting all the rollover stars. Had to special order a 1-3/16 forstner bit (dang, these are expensive!) to cut these. Manually drilled down the proper distance to get them flush, was a big pain.

My biggest innovation yet, a target in front of the spinner wire instead of a mini post. Should be back handable from the right flipper

Threw together a 60 degree kicker for the upper eject hole as it was the only shape mech that would fit with the drop targets so close. Didn't want to pay for a full mech so I used a random plunger from a vuk or kickback, not sure. The plunger was too long, so I just put some 1/2" standoffs under the mech

Needed a down-post for the mini playfield diverter, so I 3D printed one. It just presses up against the bottom of the playfield to stop it at max height, and uses a plunger from a williams drop reset mech that has a built in thread on the end. I had problems with the rubber I put on it sticking in the hole of the playfield, and being too bouncy when up, so I switched later to just a straight plastic post on top.

Posted Monday, September 14, 2020
at 06:08 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 11

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Bottom of the playfield already getting pretty crowded...

Before I got much farther, I realized I'd forgotten to cut the magnet holes in the bottom. Those will need to be done with the router, which needs some space, so I'll need to remove all the mechs in the area and the support rails.

I very scientifically traced the magnet out, and routed out a depression:

I wanted to hook it up to test, but that meant installing the relay somewhere. When I was looking around for the best place to put it, I realized that this was a bit dangerous, as I didn't know where any of the lights, switches, or wiring was going to go. I tried to mark out roughly where I was picturing things, and that actually left me with no safe spaces to put the relay! I'm sure once it's all done there'll be room, especially in the middle of the upper playfield area, but I have no idea what sort of lights are going to be up there now, so I want to avoid mounting anything there. Then, I realized the one area I knew was safe...

Posted Monday, September 14, 2020
at 09:39 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 10

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



In order to get the sequenced firing working to test the 5 bank, I had to get some more control going on. Previously when testing the flippers I was just editing the driver board firmware manually to configure coils. I made a custom MPU board with hookup for up to 8 external driver boards for solenoids, lights, displays, etc. It's powered via a raspberry pi for simplicity, and also has support for an 8x16 switch matrix. Here's my first test setup, with the two boards just screwed to a spare piece of foam core.

The driver board can have each solenoid configured with a default pulse time, a maximum on time, and PWM duty cycle. The switch matrix and board I/O are handled via a small Java app for now, which can be connected to via a socket to send commands. The game code will eventually send those commands, but for now it makes for easy testing to just connect directly to the socket via PuTTY and type them in. To fire the 5 bank, I just made a quick bash script to send six commands in a loop with some pauses in between.

Posted Sunday, September 13, 2020
at 11:22 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 9

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Started wiring all my drop target banks at my workbench. Each will have a connector for easy removal. Not going to bother with that on every mech, since most are pretty simple and either serviceable from the playfield or unlikely to need service, but drop targets and pop bumpers are another story.

Realized I'd made a big mistake during initial planning... Most of my banks are williams or gottlieb, which is fine, but the 5 bank on the right is a bally, which I chose because they have thicker targets, which will make shooting past them into the shooter lane smoother, and they had 'memory', so I could knock them down with code if needed to make the shooter lane shot easier. Problem is, Bally used 50V coils, while gottlieb and williams used 25V, and I'm using a Gottlieb transformer. A quick test revealed that, of course, the giant 50V reset coil on this bank doesn't even move when you apply 25V to it. I dug through my spare mechs box, but the only other 5 bank I had wouldn't fit due to space issues with the flipper mech immediately above it.

So I needed to get creative. How do I get 50V when my transformer only puts out 25V? With a voltage doubler! Here was my simple test setup to see if this would even work:

Basically, creative insertion of two big capacitors in the middle of a half bridge rectifier allows each to be charged by half the AC circuit to 25V. But they're wired in series, so that combines to 50V (technically, I guess it's -25V and 25V compared to the rest of the voltages in the system). Those TO-220 transistor looking things are actually just really big diodes, I think 10A each? I overspecced this thing for sure, since I couldn't find exact details on what tolerances were needed. And it worked! Bank resets just fine. You can't energize anything continuously with it since the caps will empty pretty quick, but it also recharges within a second, which is good enough for resetting one drop target bank. I got a new PCB made for this, with even more fuses (again, wasn't sure where to fuse, so I just fused everything), and a bleeder resistor so the 50V (actually, it reads as 80V for whatever reason) doesn't sit around after the machine is powered off

The issue with this of course is that, since it's operating off its own rectifier with a weird half-ground system, I can't control it via the MOSFETs on my driver boards, since they don't share a common ground. For the reset, this isn't a big deal; I can just add a relay in to control it. But I also have the 5 knock down coils. I don't want to have to wire up 6 relays for this bank. Luckily, since the knock down coils are so small, I find that they can be moved via 25V. But not enough to actually knock the target down. So I added a 4700uF cap onto my 25VDC rectifier, similar to what gottlieb did on games like Black Hole to give the kickers more juice. That gives enough strength for the knock down coils to operate 90% of the time, and I can just code them to try again if they don't detect the switch closing to handle the other 10%.

Posted Sunday, September 13, 2020
at 12:46 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 8

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



From thinking about the idea of the jump from a flipper behind the main playfield, the idea turned into: what if you shot the ball up between the flippers?

It's a tough shot, but it is possible!

But, if you drain the ball from that flipper, how does it get to the outhole? Originally I wondered about doing this with a newer style below-playfield trough, so I could try to gravity feed it, but from my issues with the reverse outlane ramp, I was wary of any slopes going against the playfield slope.

I really hoped this worked when I drew it up in CAD, but wasn't sure how it would go. So many variables. I tried to leave some room to maneuver the kicker arm around to get different angles if needed, but my guess for an initial angle that I drew a line for turned out to work. I had to use a gottlieb kicker arm due to the clearances needed.

With that proof of concept looking promising, I decided to make a whole mini playfield out of it

There was not much room to work at all down there. I positioned the flipper mechas low as it could go, which resulted in this angled mech, with it pressing right up against the bottom and left side of the playfield. I couldn't put it any more to the right or else the angle for the eject would be too steep. That limited the place where the drop targets could fit. I needed to use a williams mech since they're the only style that has the coil mounted in front of the mech instead of to the side, since I had mechs to both side. And since those have a bit base plate in front of them, I couldn't put it any lower since the flipper mech was in the way, and I couldn't put it any higher and still have room for the ball to roll under the main flipper. I wanted to make sure I could disable the mini playfield area during multiball, etc to prevent anything getting stuck down there, so it needed to still have the standard outlane path. I put a down-post at the entrance to redirect balls away from the mini playfield. No room for a rubber band behind the drops either, so I figured I'd have a metal wall with some of that blue rubber sheet behind it for minimal thickness. No room for any standups to the left either since the drop mech was underneath. I also wanted to put the flipper at as low an angle as possible so that it could make the shot back between the flippers, but at the same time I wanted it to go up at least to 'level' so theoretically you could cradle the ball.

I needed to make a custom one way gate for the exit since it's so wide. I reused the little gottlieb spinner mounts from the mars playfield to mount it since there were no brackets that length either. While i was doing that I got the idea to just also put one of those behind the drop targets. Minimal width, and now I get to use the back side of the main flipper as a rebound rubber. If you knock down the drops, there's also the possibility of shooting through them and getting into the outlane area and draining that way too. Hopefully I can make this mini area super valuable, to make you willing to risk going for the targets instead of going for the saving shot immediately, or maybe if you complete the whole bank you get a ball save? We'll see how the risk reward works once you get in there...

Posted Sunday, September 13, 2020
at 11:27 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 7

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



In order to test the upper playfield shots, I needed some ball guides. The shot I was most worried about was the one behind the upper right drops, since the angles looked a bit weird.
I got some 1" stainless strips, and bent one to follow the path on the playfield. I also got some #4 hex button cap screws, since they're very low profile. I can mount them near the top/bottom of the guides, and the ball won't hit them.

Made a test jig using a spare block of wood and one of my big C clamps for a quick test:

Success! Now to mount it for real...
I've never found a good place to buy these premade, so I'm making my own L brackets to mount the guides. I got a strip of 1/2"x1/16" aluminum, and cut it into ~1.5" sections:
Bend it into an L using my vice:
then drill both ends, one for the #4 machine screw and one for a #6 wood screw
Then, mount it using the button head screw and a nylon lock nut on the back

In the back you can also see my next 'custom' mech, a controlled gate:

As is going to be common, I don't know the dimensions of a lot of the mechs available online from marco/pbl, and I don't want to spend $50 to find out if it fits, so I'm making a lot of this myself... This one is made from a normal one way gate, with a piece of slightly flexible thin metal rod (I think piano wire from a PBR kit) that I bent so that it sticks through the housing and when I pull down on it, holds the gate open. Then I used a spare slingshot bracket, a random coil, and a custom plunger I made from some round stock, with a hole through the top to stick the piano wire on, and a threaded hole on the side to clamp down on the wire. The wire's hole is pretty deep, allowing me to adjust the 'pull' of the mech, and the set screw also acts as a holder for the return spring. Luckily since the piano wire is so flexible, the mech can be positioned pretty freely, as you can see here where the whole wire is going through the wood at an angle... I'll need to figure out exactly where this needs to go eventually, but for now it works.

Posted Saturday, September 12, 2020
at 10:49 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 6

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Now for the fun part: my first board!

I've been hoping to avoid FAST/PROC for cost reasons, and rolling my own sounded like fun, so I designed these. 2"x4", 16 drivers controlled by their own dedicated processor. 12 'high power' drivers using a step up chip to convert the CPU's 3V signals to 5V, 4 low power drivers for things like relays, which can also be configured as fast react inputs by replacing the mosfet (an IRL540N) with a jumper wire and all controllable via SPI. I'm hoping these can act as psuedo node boards spaced around the playfield to reduce wiring.

From prior experience making a homebrew 5 years ago, I know that direct high current switches can be a pain to deal with due to the arcing and EMI causing board resets, so my goal for this project is to have everything transistor controlled, but for initial testing, I'm going to leave the EOS switches on the flippers wired in.

I installed some low current stagable flipper buttons in the cabinet, wired them up to 3V, and ran a connector up to the playfield through zip ties on the support rails. Mounted my driver board under the trough for now, and hooked it to the lower flipper, and had my first flip! Success!

Well, until I hooked up the second flipper. Then both flippers flipped at once! A bit of troubleshooting narrowed this down. As should have been obvious, don't run your low voltage signals in the same bundle as your high voltage coil wiring! Basically, when I flipped one flipper, the first 3V pulse would go to the board fine, and it would engage that flipper. All the electrons flowing up the harness would create a magnetic field and induce enough current in the flipper button wires to be read as 3V, triggering the other flipper as well. I knew that generally, you want to keep those harnesses separate, but didn't expect to see that so soon, and so reliably.

Luckily, the next day I was at some friends' wedding, with a pinball machine in tow, and I got talking to another guest who was an electrician, who confirmed my issue, and told me that "about 6 inches" should be fine separation for the signals I'm dealing with, as well as the advice to try to cross high and low current at right angles when possible, which doesn't sound too bad. Since all the switches and lights will be close to the playfield anyway, I'm now planning on having two layers of wiring: one high current harness run through the rails, and one lower current one near the playfield. In the mean time for testing, I just run a separate wire down directly, bypassing the harness.

With that 'working', it was time to actually test the shots! Instead of moving the playfield in and out of the cabinet all the time, I found a two foot block of wood whose thickness would result in a 6.5 degree incline if I stuck it under the back end of the support rails, allowing me to play with the playfield sitting on a table next to the cabinet. This revealed that, despite me trying to account for it, my connector from playfield to power supply was too short! I spliced another 2 feet in for now. Lesson learned: always make your connectors way longer than they need to be, and then make them longer.

So I made my first shot, at the spinner, and actually hit it which was surprising considering that I was standing two feet to the left at the cabinet. However, it also illustrated a new issue: the ball didn't even reach the back of the playfield. I took another shot, avoiding the spinner so it couldn't steal any momentum, and was able to reach the top, but the power just wasn't there. It felt like playing a gottlieb EM with AC flippers. I tried playing with the pulse length, etc but nothing helped. To rule out the board, I tried manually grounding the flippers, and they were super strong! So the driver board was causing issues somehow...

I tried taking the CPU out of the equation by controlling the step up chip directly, no different. Tried sending 5V directly to the mosfet, no difference. I looked up the schematics for other games, since most modern games seem to use IRL540s, but couldn't see any difference. I tried driving the mosfet with 12v instead of 5V, since it technically can go that high, and the flipper seemed a bit stronger, but still not close to how it was when grounding it directly. Very confusing. I'm not sure if there's something else with this circuit I'm missing that's causing issues, but I think I eliminated every part of it being an issue. Maybe it's something with driving these very high power flipper coils on 25V (resulting in very high current), vs how modern games all use 50V with weaker coils? I also discovered that Stern node boards have special driver chips designed for mosfets, although they run them at just 6v, so those might be worth a try, but no other manufacturers use anything like that so it doesn't seem likely. The issue only seems apparent with flippers too; my drop target bank resets fine, the outlane saver is nice and strong. Both of those use a weaker coils though.

I'd love to figure out the answer to this, but for now I decide to work around it for testing, so I swap over to high current flipper contacts. I don't mind this too much really, since it's more like how the gottlieb games originally worked, and I love the feel of 80s gottlieb flippers. No need to spend time trying to get CPU controlled flippers working really nicely or anything, just do it old school. I'll have to add some arc suppression to the cabinet and eos switches, but that's not a big hurdle. I'm also gratified to see that my driver board seems to work fine (no resets) even without the arc suppression, so maybe my increased electronics knowledge is helping too.

With the directly controlled flippers, the game is nice and powerful. Perhaps too powerful! On my third shot I break off one of the drop targets on the center 3 bank. The spinner shot works well though, the ball makes it all the way around and comes down the left side. Will need to work on some inlane guides. I wish I had a laser cutter....

All the lower flipper shots seem at least makable. I would have liked the center bank to bit a bit more to the right, to make a shot from the right flipper to the upper playfield area easier, but with the clearance issues with the right bank I can't do too much. I played it a bit safe on the initial whitewood, so I'll adjust it a bit closer next time, but at most I'll gain half an inch.

Posted Thursday, September 10, 2020
at 07:37 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 5

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Got the ramp fully mounted, and found my first major design issue. My model for the ramp was way off. In retrospect I should have printed it out 1 to 1 on a piece of regular printer paper to test first before getting it printed on the big sheet. Luckily it seems like the existing placement will still work, it's just that where I was planning on putting two targets on the upper left, I can now only fit one, since the ramp mounting hole overlaps that slot, and you can't really take the ramp off while the upper left flipper is installed. Will also need to adjust the habitrail design somehow to match the new placement.

Installed the side rails and the spinner and inlane guides.
At this point I now had enough worked out to technically test some of the main shots and see how they felt, but for that I'd need to get it in the cabinet. I'm using an old whirlwind cabinet I bought from a restorer a few years ago. It came with the side rails, lockdown bar, etc, but no playfield mounting hardware. That's probably good anyway though, since I hate the hinge on system 11s. For now, to make playfield removal easy (since I'll be doing that a lot!) I'm just going to go oldschool and put some wood bars down to rest the playfield on. I got some really big C clamps from harbor freight and used them to attempt to level the bars. This was a bit of a pain since I need them to also match the playfield hanging from the lockdown bar at the front. I ended up installing some permanent back panel support legs, and using that to set the playfield in the cabinet upside down, then reaching in through the speaker hole to mark the height.

Installed the transformer panel, taken from a mystery 80s gottlieb, and luckily it has clearance from the playfield
Did some initial power wiring to get the transformer the 110v it needs to generate the 25v I need
The lightswitch kills the power going to the transformer so I can turn off the high voltage to safely work on the machine without shutting the whole thing off. One outlet will be to power the ATX computer power supply I'll be using for the logic voltages and is controlled via the power switch, the other is an always on service outlet.

Posted Thursday, September 10, 2020
at 05:52 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 4

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



My goal with the initial whitewood is to do as little as possible to get the maximum info. If anything isn't going to work, I want to find out fast, so I can stop doing work I'll have to undo, etc. So top priority is: does everything fit? If it fits, do the shots work? Worry about the rest later. At the same time though, mounting a mech means I can't do any more cutting in the area while it's installed, and I won't want to be uninstalling tons of mechs and posts throughout assembly. Simple holes can be drilled at any point, but slots and other shapes will need more complex work, so I decide to try to cut every slot needed first before doing any assembling. That means, one slot for each drop target, one rectangle for the outlane saver, two slots for the lift ramp arms, and one weird shape for the trough.

My technique for any large slots/shapes is to drill the ends/corners first, then use a jiqsaw to connect them. I use a forstner bit instead of a regular drill bit, since they produce nice clean edges.
I discover immediately that the paper doesn't like being cut with the jigsaw, and if I drill through the paper then bits of sawdust get stuck under it, making it uneven. So now any cut starts with marking the centers of holes with a punch, then cutting away the paper around the cut, and then making the cut itself

For slots too narrow to fit a jigsaw blade in, such as the 1/8" rollover switches, I needed to use a router. I picked up a cheap one for $20 at harbor freight, which was probably a bad idea, and a 1/8" bit. I drill holes in both ends to give the router a good entry point, then clamp a length of wood on to act as a guide so I get a straight line

I need to cut 8 large slots and 5 small slots. I made it through all but two small slots without messing up, and then my router slipped a quarter inch on the left inlane Won't affect play, but the playfield is now forever marred.

I'm using a gottlieb 3 ball trough, which was used on all their games from Mars (their first multiball game) through their last game in the 90s. They're a nice design, with a separate ball release coil and a little wireform to prevent releasing two balls. Very simple to program for. But they also require mounting 5 parts (bottom rail, both side walls, outhole kicker, and release arm) all with very good accuracy. Instead of eyeballing it, I try to trace everything on the old playfield first. After removing the mechs, I tape a sheet of paper to the mars playfield, and sketch over everything with a pencil to find the holes, and use that to mark my new playfield. Worked out quite well, and the trough fits on the first try

I started test mounting a few mechs to check clearances.

Upper left flipper and ramp lifter fit, juuust barely. I think there'll be about 2mm between the crank and the lift arm.

Right bank and center bank also fit:
As to the upper 3 bank and the pop bumper:

I also found that, if I use a williams 3 bank with only two targets, and then chop out a bit of the base plate, I can fit a two bank on the upper left, nestled in perfectly with the 3 bank:

The other mechs I knew 'should' fit, according to the cad, as long as I didn't screw up the measurements, but this one was so close that there was no way to tell without just doing it, so I'm glad it worked out

Posted Thursday, September 10, 2020
at 05:35 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 3

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Attached the paper with thumb tacks. I wasn't able to get it as tight as I'd like, but I think it should be close enough.

I figure that once I actually get the holes drilled, etc, and every thing placed in a way that works, I'll have to strip the top of the playfield again, remove the paper (if it's survived), and then scan in the raw playfield again, and make a new CAD file based on the actual holes+positionings I ended up with

Posted Thursday, September 10, 2020
at 11:18 AM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 2

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Got some 'cabinet grade' plywood from Home Depot. Closest thing I can find to playfield style... I also picked up a cheap 2x2 sheet of rough plywood and some 8" feet for it, to experiment with cuts and mech mounting. Was able to find that a 3/8" hole is not big enough to fit a mini standup through, but 1/2" works.

Played around with another outlane saver idea: a player controlled vuk the ball rolls over to fling the ball over the flipper and back into play:

This should be able to barely fit in front of the trough on the right side, and can be activated by an extra flipper button...

I liked the idea on Pinbal 2000 of having full length support rails, so I made my own out of some angle iron. This should allow me to easily take the playfield out without worry of crushing mechs, and work on the top side easier. I also made some temporary legs for the top side, so I can set it upside down to work on the bottom.

Hopefully, I can make double use of these as a place to mount the wiring to. Put some zip ties through the holes, run the harness through them, with wires running down to individual mechs from there. Wire management can be such a pain

Posted Wednesday, September 09, 2020
at 04:43 PM


Tags: Blog Post, Pinball, Project, P3,

Homebrew Pinball #3, Part 1

Cross posted from the original Pinside thread, this is one of many posts regarding my third homebrew pinball machine, creatively nicknamed 'P3'



Need to come up with a catchy card themed name that hasn't been taken by one of the hundreds of card themed EMs...

Been working on this for a while, finally realized I should make a thread. I'm gonna start posting from the beginning and try to catch up to the present...

I've had an idea in my head for a while for a poker themed pinball machine. There are lots of card themed games, but much less are actually specific to poker (or any other card game). Games like Royal Flush or World Poker Tour come closest, since they involve actual poker hands, but you're still not really playing *poker*. In most EMs with poker hands, your real goal is really just to get as many drops as possible. In WPT too, if you just keep hitting drops randomly or even ignoring them, you'll just accrue hands.


So I want to have a game with a ton of targets, and a display (either dot matrix like WPT, or an LCD like Full Throttle, etc) in the playfield to show your hand, including suits, etc. The targets you hit become your hand, your hand is compared to your opponent's hand, you can bet/raise/fold somehow, etc. Not sure exactly how the rules will work, but that's the goal.

With that in mind, I've been accruing random drop target assemblies (since drop targets are always better than standups!) for years at various flea markets. I've got about 18 assemblies to choose from now, ranging from 1 banks to 6 banks. Gottlieb, Bally, Stern, Williams. Some have individually controlled 'memory' drops. Other mechs and random pieces too, such as flipper parts, slingshots, pop bumpers, gates, etc.

I didn't really have an exact layout in mind, other than having an upper flipper or two, to give more ability to hit targets, and that I want to have some sort of 'savers' in the outlanes (like magnasave, etc) since outlanes suck.

None of this ever got anywhere until I saw a partially populated Mars: God of War playfield for sale:

This had a few very important things on it:
1. more drop targets. can never have too many
2. a multi ball trough. No need to spend $100+ on one from PBL
3. four flipper mechs. The WPC mechs I'd use otherwise are $50 each, but these would just need a slight rebuild, and they're gottlieb mechs, which are my favorite type, and will fit well with the more 'retro' style design all the drop targets will be giving
4. The lift ramp. This is what really set me off to actually start designing. I immediately started picturing layouts involving the ramp, and how I could use it as a lock possibly, or use the up/down as a diverter to give more shot variety, etc.
5. Lots of other little playfield parts. Hopefully I can scavenge lots of rollover switches, wire guides, etc. Those add up fast when you're buying new too

I threw out my previous idle layouts in Future Pinball and started making a new one with the ramp in mind

Old design:

Future Pinballis great for seeing how big things really are. When I sketch something on paper or in my mind, stuff enver actually ends up the right sizes, so using a virtual pinball designer is a great way to get a rough idea before you start really drawing stuff in CAD.

The first attempt was very rough, but it gave me the basic idea of a ramp on one side, a spinner on the other. A 3 bank in the middle, and above it some pops and an 'upper'/mini playfield area with another flipper and some more targets.

With a basic idea in mind, wanted to figure out the shot angles better. I decided to copy the bottom areas (flippers, slings, inlane) from Alien Star, since I liked the feel. This also allowed me to test out shots by imagining where they are on the alien star playfield, and then trying to shoot them, to gauge difficulty etc. One thing I wanted was a center shot that could be hit from a ball coming down the inlane when you flipped as early as possible, since I find those really satisfying. So I tried some trial shots on Alien Star, noting the angle the ball went at off that 'early' shot, and made sure to put something there in my cad drawing.

I got a cool idea for an outlane saver: a mini flipper positioned behind the main flipper, and raised high enough that you could shoot the ball over it into play:
I 3d printed the feed ramp for this and stuck it on alien star to give it a try, but sadly the physics just didn't work out. The ball would roll part way up the ramp and run out of momentum. In order to make the ramp shallow enough, it would have to start about 3" above the inlane, which just couldn't work I'll have to come up with another idea for this outlane...

I modeled the lift ramp, which was pretty complex. I just blocked out the more complicated lift parts on the bottom, since I really just need it for spacing.
I realized that, due to the ramp's right side exit, I couldn't put it on the right side of the playfield as I had in my original drawing, so I had to reverse the playfield:

I also got more of the upper playfield figured out
- three banks down below, with possible room for a fourth under the upper left flipper.
- two upper banks, each with some targets hittable from the lower flippers and some from the upper flipper
- a shot in the middle (the 'early' shot from before) that can feed the upper left flipper
- a lane to the right of the upper right drops to go from the upper playfield to the upper right area, where there will be some lanes
- one pop bumper (that's all that will fit, but all the best games have one pop bumper!)
- a shot under the upper left flipper from the upper right. not sure where the ball will go once it gets in there yet
- a shot back to the shooter lane from under the upper right flipper, similar to Star Trek, but with drops below it, so you can hit down the drops to make the shot wider

More refinements:
- placed lots of mini targets to prevent vulnerable metal edges
- replaced the area below the upper left flipper with a single target to make the shots to either side easier
- replaced the upper left bank with standups, since sadly it looks like there isn't clearance for two mechs that close together
- added the lanes in the upper right. there isn't enough room for a full set of three lanes, so I've opted for just some mini posts to drop the ball between. the right most 'lane' will drop down to feed the upper right flipper, and there's also a place below it for a magnet to feed the flipper too off orbit shots. I wish this was a widebody, so I had more room to put stuff in areas like this, but sadly widebody cabinets are hard to come by, all I have is a narrow body

I modeled some of the drop target banks and added them, as well as a rough habitrail for the ramp

Clearances are already getting quite tight with all the mechs there.
- I originally wanted the upper left flipper to be more to the left, but the ramp lifter mech is in the way
- the upper right flipper had to be moved up slightly, since the 5 bank below it was in the way
- I had to change my 3 bank mech for a different one that had the coil on the left instead of the right

Bought some used magnets from a parted out Addams Family, which allowed to to add a magna save on the leftlane. I got an evil idea though, and decided to invert the inlane/outlane, bally style. This way, if you just hold the magnet, you can bring the ball to a stop, but it'll be above the outlane! I want to make the game more bouncy, encouraging the ball to fly around all over. Both the outlanes with have helpers of some kind like this, so it should be okay to be a bit more out of control.
The inverted inlanes also allows me to use the left side of the playfield as an inlane feed. I'll but a controllable one way gate above the upper lanes, so then a spinner shot can either feed the lanes, or come all the way around, down the left side, and feed the left flipper again for a repeatable shot.

Similarly, on the left side, I'll put a diverter in the shooter lane, so balls can either go back to the plunger, or feed the left inlane. This will allow another repeatable shot by shooting under the ramp on the left, coming around the top, and down the right side. Hopefully this will give some good combo potential (especially combined with the lowered ramp to feed the left side, to give the game some shots and modern feel, despite most of the playfield being taken up by drop targets

At this point I start to worry I'm getting ahead of myself. I don't even have a whitewood yet! There's no reason to be putting this much detail into a design that could change drastically if something doesn't work out. So it's time to do a whitewood. I won't install everything yet, but at least get some guides and flippers installed, see how it shoots.

I don't have access to a CNC machine, so I'll need to do this all by hand for now. I take my current drawing and send it to Staples to get printed at 1 scale. My thinking is, I'll attach the paper over the playfield, and use that as a guide to cut all the holes needed. Hopefully I can play test on paper without ripping it up too badly.
Tomorrow, the first steps of construction!

Posted Tuesday, September 08, 2020
at 08:54 PM


Tags: Blog Post, Pinball, Project, P3,

Stern Dracula Tournament Rom V4

I've been working on a custom ROM for Stern's Dracula for a bit now. This was originally prompted by wanting to remove its 5x bonus rule. In the original ROM, there was no way to earn 5x. You could earn 2x bonus, but 5x could only be gained by random luck on the last ball, when it would alternate between 2x and 5x (once 2x was earned) when the slingshots were hit. This made it very bad for competition play, as a 5x bonus collect could often eclipse whole game scores.

After removing that rule, I decided to make the 5x earnable by the player, and then made some other tweaks to try to rebalance the game now that 5x was in play:

  • 5x alternation removed
  • 5x achieved by earning 2x bonus again after 2x bonus is already lit (eg, by completing the left 3-bank of drops twice and shooting the loop three times)
  • to make this a bit harder (since getting 5x should be harder than getting 2x twice), once you earn 2x bonus via either method, the other method resets (loop resets to first star, or 'light double bonus' light at left 3-bank turns off if it's on)
  • made the extra ball worth 25k points, and made it collectable multiple times per ball
  • lowered the special score from 100k to 70k (still playing around with this value to try to keep it balanced with the 5x bonus)
  • X-Y-Z target progress carry over from ball to ball (per player). Once special is lit, on the next ball you need to hit the Y target again to relight it.
  • free play
  • sped up 5x bonus collect

If anyone would like to test this or has any further suggestions, send me an email

Posted Tuesday, January 15, 2019
at 09:23 PM


Tags: Blog Post, Pinball, Project, Dracula, Custom ROM,

Custom Bally OS, Pt 3: Lamp Control

Many months later I have picked up a nice Stern Dracula pinball machine, which allowed me to actually go and start testing this code in a game and get working on the I/O support.

Bally has an interesting system for driving their lamps. Unlike Gottlieb (who just had one transistor for each lamp and banks of latches to remember their state) or Williams (who used an 8x8 switch matrix), Bally opted to use 60 individual SCRs. SCRs have an interesting property to them: unlike transistors, which allow current through when there's voltage at their input and then cut it off when the input turns off, SCRs will keep letting current through until the input turns off, and the current drops to zero. This has a cool effect in that, you can hook a lamp up to an SCR, give it a quick pulse on its input, and then just leave it and the lamp will stay on. Of course, you don't want your lamps to stay on forever, so Bally powered all its lamps via raw rectified DC, which follows the same 120Hz sine wave the 110VAC coming from the wall has.

You can see the DC in purple here compared to the AC in blue. Effectively a rectifier just inverts the negative half of the AC signal, which means the DC still looks like an AC wave. Because of this, the power source for the lamps is dropping down to 0VDC 120 times a second, stopping current from flowing through the SCR, allowing the light to turn off. So what Bally does is, 120 times a second, the MPU pulses any lights it wants to be on, and then they stay on until the next 'zero crossing'. As long as the MPU pulses the lamp again right as the SCR turns off, the lamp appears to stay on. If it wants to turn a lamp off, it just doesn't pulse it any more. Pretty nifty, but it also means timing is going to matter a lot here, since there's factors beyond the MPU's control at work.

Of course, this complicated system wouldn't be very useful unless you could also pulse all your lamps simply, so Bally hooks up each bank of 15 lamps to a 4 to 16 decoder. This chip has 16 outputs, and turns only one on at a time depending on which 4 bit binary number is sent into it. Unlike Gottlieb, who needed a dedicated output on each chip for every light (limiting them to 4 lights per chip), Bally could use one chip for 16 lights. But I said 15 earlier, right? That's because one of those 16 outputs isn't connected to anything. Since the same data lines that the MPU uses to control the lamp board also go to the displays, they use one output as a 'safe' output to leave the lamp board on while the MPU does other stuff. (The same is done with their solenoid board, which can control 15 solenoids from its decoder).

15 lamps per decoder means we need four decoders to control 60 lamps, and four also is a nice round computery number. All four decoders are hooked up in parallel, so another set of 4 bits, one per decoder, is used to enable/disable each one while all 15 outputs are run through. 4 bits happens to be the size of the 5101 RAM chip on the MPU, so 15 bytes of that RAM will go to storing the state of all the lamps.

With that in mind, I feel like I have a pretty good idea of how to interface with the lamp board:

Each time the lamp voltages crosses zero, the MPU gets an interrupt signal and starts the lamp update sequence
Load up each 'row' of four lamps
Combine this with the 4 bit 'column' address for the decoder
Send them out as one 8 bit byte to the lamp board
'strobe' the decoders to tell them to latch in the data
Repeat for the rest of the rows

Nice, simple code, aided by the four 'data' bits of the lamp board inputs being mapped to the top 4 bits of the MPU PIA's 8 bit output port, which coincidentally matches which four bits of RAM the data is stored in. Almost like they planned all this! Too bad it didn't work. The lamp I wanted to turn on did turn on, but so did another in the same column.

After some thought, I realized that the decoder chips only 'latch' the address. The enable/disable data signal takes effect immediately. So when I sent out the next combined byte containing both the 4 data signals and 4 address signals, the new data for the next row must be affecting the previous row.

So now I had another step. Instead of sending them both out at once, first I'd have to disable all four encoders. Then, I'd send out the new address and latch it in. Finally, I'd enable to encoders again. A bit slower, but much safer than relying on the timing of the two signals to work out. Of course, this also didn't work.

After tearing my hair out for a few days reading and rereading data sheets for the decoder chips, staring at schematics, and scrutinizing my code, I finally discovered that my data sheets were wrong! The part number on the schematic was 14514CP, but my data sheet was for 14514B. Very similar chips, but with one important difference: for the 14514B the way to latch a new address was to drop the latch signal from high to low. That transition was what triggered the latching of new data. With the 14514CP, when the latch pin was high, it was instantly passing the address data through. Dropping the latch pin low just made it stop passing the data and remember whatever it had last. So I rearranged my code to quickly pulse the latch pin high for a few microseconds, instead of leaving it in one state or another, and finally my issues were solved

The code for all this is available on my github, if you want to check it out

Posted Thursday, October 04, 2018
at 07:32 PM


Tags: Blog Post, Pinball, Bally -35 OS,

System 6 MPU Repair Log

When I got it, it was a clean board that worked a few months ago. Game stopped booting, so owner had rom and 5101 sockets replaced. Repairer says board booted on bench (LEDs turned off), but when installed in game it still didn't reach attract mode.

  • I replaced the (still original) CPU and RAM (IC13 only) sockets, but that made no difference
  • Installed Leon's test rom (flashes LEDs without using RAM, etc), but it didn't boot either
  • Tried Andre's test rom (tests all chips without using RAM, etc), also didn't boot.
  • Checked all the inputs of the ROM and PIA chips with logic probe, none were stuck.
  • Replaced data line buffers (IC9+10) with jumpers in case they were a problem, but no difference.
  • Found out Andre's test rom also strobes A15 line along with LEDs (in case the PIA outputs or LED chip are broken), so I checked that but it also wasn't working. At this point I reason that the problem must be between the CPU and ROM (both known good).
  • Although all the address and data lines are strobing, it's still not working, so one must be strobing wrong somehow.
  • I write up a quick test rom comprising nothing but infinite loops, reasoning that this will keep the program counter (and thus the address lines since no other accesses are happening) constant. Installed in a known good board, it works as expected. Reading off the address lines one by one reports the address $7800, which is the first byte of the rom.
  • When installed in the problem board, A9-11 are low (as expected) but every line below them is strobing. I can't really explain this, why would the CPU be jumping all through a 512 byte subset of memory?
  • I Remove the remaining RAM (IC16) and PIA, but nothing changes
  • Since the data on the data lines should now be predictable (just reading the entry address, and then that address itself repeatedly), I reason that I should be able to pick it up with a logic analyzer. With mine hooked up to the 8 data lines, I record them at 24MHz (for overkill), and examine them, but I don't see any of that data. # - What I do note though is that at the beginning of the boot, D6 seems to wobble a bit while the rest don't. I don't know if that wobble is normal, but the one reliable thing about any pinball related troubleshooting, I've found, is that if there's 8 of a thing they tend to act the same, so I suspect something is up with the D6 line
  • I take out the CPU and rom, meaning that, per my look over the schematics, nothing should be attached to any of the data lines now (and thus they should all be floating), but when I apply power, I still read a signal on D6.
  • Something must be shorted somewhere, so I begin checking the resistance between D6 and every other signal on the board, eventually finding that it has continuity to A6. All that's left now is to actually find it
  • I begin at the source of D6 (IC9), and visually follow the trace all around the board, looking for any potential problems, but am unable to find any. Usually a short is between two adjacent pads of a chip, but looking at the various chips, none have A6 and D6 near each other. What I do realize though, is that the RAM chips have them directly across from each other. The chips are too wide to have a short that way, but the way these boards are routed with both chips next to each other, they squeezed the signals from the left side of the chip between the right side pads to reach the next chip over, which means the trace gets awfully close to the pads. To make matters worse, due to their cheap board manufacturing process, instead of masking off individual pads for soldering, they just did the whole strip of pads, which includes the traces running between the pads.
  • Although I'm unable to see a problem, this area seems suspect, so I desolder the sockets and confirm my theory: there's a tiny bit of solder bridging the pad of D6 to the A6 trace running next to it.
  • After removing the solder, the board boots fine

Posted Tuesday, April 17, 2018
at 11:31 PM


Tags: Blog Post, Pinball, Repairs,

Custom Bally OS, Pt 2: Let's Blink a Light

With I/O figured out, I theoretically know everything necessary to start writing code, so I want to start with the simplest possible thing: getting an infinite loop to run in pinMAME. The CPU (Motorola 6800) is fairly basic, it only needs to know one thing to run code: where to start. You do this by putting the address of your starting code at the highest location available in memory, so I wrote a quick assembly file:

.orq $1800 ; start of U6
main:
    jmp main

.orq $1FFF-1 ; two bytes before end of U6
    .dw main ; address of main

It doesn't get much simpler! And besides from a classic off-by-one error (I did $1FFF-2 instead of -1), it worked on the first (heh) try. Loading this up in PinMAME I was able to open the debugger and see it dutifully running around its tiny loop, forever.

My next step, then, is to initialize the PIAs. With this helpful guide I'm able to transfer my notes from part 1 into some shorthand instructions on how the PIAs will need to be initially configured:

U10
Bank A:
control: |self test irq|n/u|1|1|!blanking 0|D|0|1|
direction: out (1)
data: 11110000 
    - bits 0-3 go to display latches, start low
    - bits 4-7 go to display data, start high (1111 = blank)
Bank B:
control: |zero crossing irq|n/u|1|1|lamp strobe 1|D|1|1|
direction: in (0)

U11
Bank A:
control: |display irq|n/u|1|1|led 0|D|0|1|
direction: out (1)
data: 00000000 
    - bit 0: credit display latch, start low
    - but 1: not used
    - bits 2-7: digits 1 thru 100k, start low
Bank B:
control: |n/u|n/u|1|1|solenoid0|D|0|0|
direction: out (1)
data: 10011111
    - bits 0-3: number of solenoid to fire, use 1111 to fire none
    - bits 4-8: continuous solenoid data (turn flippers off, coin lockout on)

Configuring the PIAs is a bit of a pain as they have three bytes of memory internally (the control byte, the direction byte, and the data byte) per bank, but you can only access two at a time. Therefore, one bit (2) of the control byte chooses which (direction or data) the other byte goes to. Fully configuring a PIA involves first initializing the control byte so that you can access the direction byte, then initializing the direction byte (read or write), then changing the control byte to let you access the data byte so you can actually do some I/O:

    ldaA    00110001b   ; irq state | n/u | CA2 output | ...mode | CA2 value 0 = blank displays | enable direction register | irq on | ...self test ->low
    staA    u10AControl
    ldaA    11111111b   ; all outputs
    staA    u10A        
    ldaA    00000100b   ; toggle DDRA (3rd) bit to write to ports
    oraA    >u10AControl
    staA    u10AControl
    ldaA    11110000b   ; blanking means any outputs here will affect displays
    staA    u10A        ; 0-3 set all display latches low, 4-7 blank disp data

Finally, I can use the PIA to start controlling the LED, toggling it on and off repeatedly:

inc     counter
ifeq    ; counter = 0, it wrapped around from 255
    ldaA    00001000b   ; led bit
    bitA    >u11AControl
    ifne    ; led on?
        ; turn led off
        ldaA    11110111b   
        andA    >u11AControl
        staA    u11AControl
    else
        ; turn led on
        oraA    >u11AControl    
        staA    u11AControl
    endif
endif   

and it works! At least in PinMAME. I don't have any Bally/Stern machines on hand and configured correctly to easily test it in game right now, but that's alright. PinMAME isn't perfect but you can at least get most of the logic ironed out when it's easily debuggable before throwing it on the black box of a real machine.

The code for all this is available on my github, if you want to check it out

Posted Tuesday, April 03, 2018
at 02:46 PM


Tags: Blog Post, Pinball, Bally -35 OS,

A Custom OS for Bally -17/-35 Pinball Machines, Pt 1

With my previous success programming a new rom/os for early williams pinball machines, I thought: why not do the same for their competitor, Bally? I've already got most of the code worked out, so it can't be that bad to adapt the I/O part to the other board, can it? They both use the same CPU, RAM, and IO chips as well. So today I dug into the schematics and started documenting what I'd need.

Memory Map

The first step for coding some basic I/O is to get the memory map:

Chip Address Purpose
U7 $00 128B of RAM
U10 $88 PIA (GPIO)
U11 $90 PIA (GPIO)
U8 $200 256 nibbles of RAM
U2 $1000 2KB Game ROM
U6 $1800 2KB OS ROM

What's notable here is how small it is. The Williams boards used 3 RAM chips instead of 2, 4 PIAs instead of 2, and 3 ROMs instead of 2 but, besides from an extra 128B of RAM (which I'll miss), the Bally boards have comparable capabilities to the Williams.

Williams took a very straightforward approach to their design: 16 solenoids? Well that will need 16 I/Os, so that's one PIA (each PIA has two banks of 8 I/O pins). An 8x8 switch matrix? Another 16 I/Os (and thus another PIA) obviously. This resulted in a system that was easy to program, but uses a ton of chips that can all go bad. Williams boards are notoriously unreliable, and reproductions aren't readily available.

Bally took the opposite approach here. 16 solenoids? That sounds like 4 bits of data. Why an 8x8 switch matrix when we probably won't need more than 5x8 switches? Lets use those other three bits for other unrelated things. We won't need to write to the lamp board and switch matrix at the same time, so lets connect both up to the same pins, and use another pin to select which one. And hey, the same logic works for the displays as well, right? Stuff like this allows Bally to make due with half the I/O lines, but I can imagine it'll be a pain to work with. Still, it worked out well, right? Bally boards are considered the most reliable and well designed of that era, they're easily repairable, and replacements are available with better, modern designs.

It took me a good few hours to decode the meanings of all the pins on the 2 PIA chips. Each has two banks (A and B) with eight lines each, and four extra lines (CA/B 1/2) with more limited functionality:

U10:
A0-4:  switch strobe ST0-4 (NH)
A5-7: dip switch 1-3 strobe (NH)
A0-3: lamp address
    selects lamps 0-14 for each of the four lamp chips
    all high (15) for no lamp
A4-7: lamp data
    low to enable any of the four lamp chips
A0-3: display 1-4 latch,  nored with CA2 J1-(20-24)
    bcd enabled when high
A4-7: display data
CA1: self test switch input (low = pressed)
CA2: nored with display latch: display blanking/enable (low -> high blanking)
    bcd blank when blanking high (signal low)
CB1: zero crossing input (NL)
CB2: dip switch 4 strobe (NH), lamp strobe 1 
    latches data for first lamp board on down signal
B0-7: switch return I0-I7

U11:
A0: display 5 (credit?) latch, nored with U10-CA2
A1: 'sound module address enable'? J1-7
A2-7: display digit enable #6-#1 (100k-1 or v.v?) J1-(6-1)
B0-3: solenoid/sound data A-D
    0-14 turns on that solenoid
    15 all solenoids off
    (only one solenoid can be on at a time!)
B4-7: 'continuous solenoid data' A4J4-(5-8) -> A3J4-[11,9,8,10]
    low=enable
    B4: A3J4-11: Cont 2 
    B5: A3J4- 9: Cont 4 coin door lock out
    B6: A3J4- 8: Cont 1 flipper disable (high=enable flippers?)
    B7: A3J4-10: Cont 3 
CA1: display interrupt input (NH)
CA2: LED (high turns on), lamp strobe 2
CB1: n/u?
CB2: solenoid (low) or sound (high) select

With this, I have a general idea of what my OS will need to do to run the peripherals, and most importantly, I know how to turn the diagnostic LED on the board on and off, which will be the simplest way of knowing whether my code is actually running. My next step will be to set up an entry point and toggle the LED via one of the PIAs

Posted Sunday, April 01, 2018
at 07:05 PM


Tags: Blog Post, Pinball, Bally -35 OS,

Custom OS for Williams System 3-6 Pinball Machines

Many older games from the dawn of computer based ('solid state') pinball have some pretty basic rules, and I've often pondered hacking the roms to improve them, but reverse engineering assembly from scratch isn't really my idea of fun so I never really got into it. Driving home one night though, I got to thinking: the hardware for these machines is pretty simple, the schematics are available (and even have memory addresses!), would it really be that hard to just write a brand new rom from scratch? Sure, I didn't know assembly or anything, but it couldn't be that hard!

So I sat down with a copy of the Motorola 6800 reference manual, some data sheets, the schematics, and a copy of PinMAME to debug my code in, found where the entry point/address was, and started coding.

Long story short, it actually was pretty easy! The williams hardware was designed for simplicity from a programming standpoint (though that ended up making the boards overly complicated and unreliable), all the I/O was easy to work with and within a few days I had simple drivers written for all the different peripherals and a basic 'OS' for a game that could control lights, display scores, and jump into a callback table when a switch was hit by the ball.

Programming a game itself using this would prove a bit more complicated of course, due mostly to timing/threading issues (of course, I just had to write a custom threading system for this 1MHz processor), but nothing extreme. A few months later, and I had a brand new rom for my Hot Tip, with many fancy new features which I showed off in a video here

I didn't document the whole process very much, but if you'd like to know more, or would like to try to write your own new game rom using this as a basis, drop me a line!

The full source code and roms are available at http://github.com/zacaj/williams-sys-3-6

Posted Sunday, April 01, 2018
at 07:00 PM


Tags: Blog Post, Pinball, System 3-6 OS,

Arduino Pinball Restoration


I found a pinball machine sitting disassembled on the floor of a leaky shed and brought it home to tinker with. The mechanisms and electronics inside were all rusted solid, as was most of the metal on the outside. The backglass had lost half its paint, and one entire side of the machine was covered in mold.

the body after arriving in my garage

I'd originally planned to disassemble the machine for parts, but after I got the glass off I found that the playfield itself was in amazing condition. With the glass to protect it and no light, it had survived unscathed, and I couldn't bring myself to tear it up. Instead, I decided to teach myself some electrical engineering and wire it all up to an Arduino.

This picture was taken later, but all I did for the playfield was wipe it down, clean the clear plastic parts, and replace the rubber bumpers

I took out one of the score reels to divine its inner workings

The circuits I cobbled together to control the 25V solenoids from my puny 5V Arduino

The Arduino couldn't handle the machine's incandescent bulbs, so I replaced them with LEDs

The score system, rewired

The original innards, still inside

The solenoid and LED control circuits

The same board, after being hooked to 100+ wires

I managed to clean off the mold and dirt using a combination of extremely toxic solutions. The door and plunger needed to be sand-blasted and repainted. Luckily, the rails along the edges were stainless steel, so they only needed a quick cleaning.

post cleaning



If you've got any questions, feel free to email or tweet me; I'll be happy to elaborate

Posted Sunday, April 01, 2018
at 06:06 PM


Tags: Blog Post, Pinball, Stock Car, Arduino, Electronics, Project,

Arduino Pinball Repair, Pt. 1

I got a hold of an old EM Stock Car pinball machine a few weeks ago with the hopes of repairing it, but my first attempt ended in failure. The machine had been sitting in a damp, moldy garage against a wall, under a leaky window for at least twenty years, and it was beyond repair. About a third of the inside was covered in mold, all the moving parts were stuck, all the metal was rusted, and the back glass was damaged beyond repair.

So instead I realized that this would be a good way to use an Arduino. I could just plug one into all the inputs and outputs of the machine and then program it to react in the same way all those complicated and broken electronics would have. I ordered an Arduino Mega, which has 54 I/O ports, and then got to work investigating how complicated it would be to interface it with the pinball machine.

Some quick testing revealed that all the moving parts of the pinball machine ran off 25V AC, which posed my first problem, as the Arduino runs off 5V DC. Asking about how to fix this online wasn't much help; the experts couldn't even agree on whether an AC coil would work with DC. Being the pragmatic and cautious individual that I am, I of course took the rational route, and hooked two old car batteries up (12V DC each x2=24V DC) to a solenoid to see if it would work. (It did). Of course, this still left the big problem, which is that even if the coils would work off DC, they still needed 25V.

The answer, of course, was to use a transistor, or a MOSFET to be precise (I still haven't figured out the difference), to switch the high power current with a low power current from the Arduino. Three burned out husks of transistors later, I'd figured out how they worked, and rigged up this insane hodgepodge of circuitry to control the eight solenoids in the machine.

After an arduous day soldering wires to all the components and hooking them up, I now have control of all the moving parts of the machine from my Arduino.

Tomorrow, I get to start working on wiring all the rollovers to the Arduino so it can begin actually scoring points

Posted Sunday, April 01, 2018
at 06:06 PM


Tags: Blog Post, Pinball, Stock Car, Arduino, Electronics, Project,

Pinball, pt 2: Cabinet, Playfield Experiments

Some ugly Spring Break artwork wouldn't do, so I spray-painted the cabinet black:


The same went for the head:



I've never understood pinball machines that couldn't think of a use for more buttons, so I put a second set in:

A video posted by zacaj (@zacaj) on





I picked up a sheet of 0.5" MDF at Home Depot, and lightly drew out my layout



I also used leftover scraps from cutting it to the right size to experiment with mounting components

A video posted by zacaj (@zacaj) on


Using a small router and an 1/8" bit, I found that, as long as you go slowly, it can produce workable light insert holes

Since I couldn't find any launchers, I made one myself by welding a scoop to a piece of 0.5" iron stock and attaching some plastic to the front to guide it

When you power the coil, it pulls the iron stock in, and the plastic guides it through

Posted Sunday, April 01, 2018
at 05:44 PM


Tags: Blog Post, Pinball, Archive, P1,

Pinball, pt 1: Parts

After two trips to the Allentown PinFest, I've managed to get together pretty much all the components I'll need for the build.

I got two boxes of assorted used parts for $20, and a ruined, half populated Spiderman playfield for $30, yielding an assortment of playfield parts:



I also bought a head from a mysterious 4 player EM for $20:



I really wasn't looking forward to the thought of trying to assemble a cabinet from scratch that would work with regular parts, but luckily I found this slightly beaten Spring Break cabinet for $15

(the legs were separate, another $20)

It even came with a working power supply, so I didn't need to worry about finding a 25-50V power supply. I was able to find a combination of taps that put out 28VDC after recification. Most non-EM pinball aficionados seem to think that 50V+ is the way to go, but honestly the flippers seem just as strong on my 25V games as my 50V.

Posted Sunday, April 01, 2018
at 05:43 PM


Tags: Blog Post, Pinball, Archive, P1,

< Newer Posts
Older Posts >

Posts per page: 5 10 25 50 100