We didn’t know there was a cheat to Galaga, but [Chris Cantrell] did. And so he did what any curious hacker would do — reverse-engineer the game to diagnose and eventually fix the bug.
Spoilers ahoy! Go read the website first if you’d like to follow [Chris]’s reversing efforts in the order that they actually happened.
The glitch is triggered by first killing most of the bees. When only six are left, they go into a second pattern where they swoop across the screen and wrap around the edges. While swooping, sometimes the bees will fire a shot when they’re at coordinates with X=0. Now two facts: there’s a maximum of eight missiles on the screen at any given time, and the position X=0 was reserved by the software to hide sprites that don’t need updating.
The end result is that eight missiles get stuck in a place where they never drop and don’t get drawn. No further shots are fired in the entire game. You win.
So that’s the punchline, but everyone knows that a good joke is in the telling. If you’re at all interested in learning reverse engineering, go read [Chris]’s explanations and work through them on your own.
And here’s our generic plug for Computer Archaeology:
Ancient video games run on MAME or similar emulators are the perfect playground for learning to reverse engineer; you can pause the machine, flip a bit in memory, and watch what happens next. Memory was expensive back then too, so the games themselves are small. (It’s not like trying to reverse engineer all however many jiggabytes of Microsoft Office.) The assembly languages for the old chips are small and well-documented, and most of the time you’ve also got a good dissasembler. What more could you ask for?
A walkthrough tutorial? We’ve just given you one.
Oh and PS: If you get past level 255, the game freaks out.
Continue reading “Reverse Engineering Galaga to Fix the No-Fire Cheat”
Building a MAME machine – an arcade cabinet that will play everything from Galaga to Street Fighter II – is surely on the ‘to build’ list of thousands of Hackaday readers around the world. It’s a relatively simple build, provided you can put a sheet of MDF in your car; it’s just an emulator, and if you can find a CRT and have an old computer sitting around, you’re already halfway there.
There is another class of arcade games that can be emulated. This is, of course, pinball machines. [Jan] built a virtual pinball cabinet over the last few months and his build log is incredible. If you’ve ever wanted to build a pinball emulator, this is the guide to reference.
The most important part of a pinball emulator is the displays. For this, [Jan] is using a 40-inch TV for the playfield, a 28-inch monitor to display the backglass art, and a traditional 128×32 DMD. Instead of manufacturing his own cabinet, he repurposed an old electromechanical machine, Bally’s Little Joe.
The software is the real star of the show with PinballX serving as the front end, with Future Pinball and Visual Pinball serving as the emulators. These emulators drive the displays, changing out back glasses, and simulating the physics of the ball. The computer running all of this has a few neat electromechanical bits including a shaker motor, an original Williams replay knocker, and some relays or solenoids give the digital table a tremendous amount of force feedback. This is the way to do it, and if you don’t have these electromechanical bits and bobs securely fastened to the machine, you really lose immersion.
You can check out a video of the table in action below.
Continue reading “Building A Pinball Emulator”
Video game enthusiast [Mike] is all about the journey and not necessarily the destination. That is why he likes working on projects and documenting their progress with great detail. His bar top MAME machine is certainly no exception.
One of [Mike’s] goals was to see if he could keep the look and feel of a large arcade cabinet but scale it down so that it was portable. He started with drawing up a model in Sketchup. Once satisfied with the layout and making sure everything would fit, the side panels were cut out of pine boards and will only be clear-coated. The remaining panels are cut from MDF as they will be covered in a matching decorative vinyl wrap.
The control panel may look simple but a lot of thought went into it. Of course, there is a joystick but [Mike] chose to only use 4 game-play buttons. He did this to save space and estimates he’ll still be able to play 90% of the available MAME games. Those 4 buttons are illuminated and the MAME front end, Mala, was configured to light up only the functional buttons for the particular game being played. Front and center on the control board is a rotary encoder for playing games like Arkanoid or games requiring a steering wheel.
In the end this build came out pretty nice looking. His build log is a great reference to hit before starting your next arcade cabinet project.
Although [Mike] calls his MAME cabinet ‘mini’, it’s not the most mini we’ve seen here on Hackaday.
Every kid dreams of having an arcade game at their house. When those kids grow up, they have a couple of options for getting that at-home arcade experience. They can either buy a one-game commercial game or build a multi-game MAME cabinet. Both options have the same disadvantage: they take up a bunch of space!
Arcade game-aholic, [lokesen], wanted to scratch his itch but do it with something a little less ‘big’ than a standard arcade cabinet. He came up with the only logical solution; a MAME computer stuffed inside an arcade controller.
A lot of thought went into the controller case, which is made from laser cut acrylic. It had to be large enough to allow a proper arcade-emulating spacing of the joystick and buttons as well as have room for a mini-ATX motherboard and 64gb SSD drive. The case also has provisions for a cooling fan and some exhaust vents. To finish off the case, wood grain veneer was applied to the sides.
[lokesen] chose this motherboard for a reason, it has several options of on-board video output; VGA, DVI and HDMI. Connecting this controller to any TV, monitor, or projector is a piece of cake.
[Florian] has a few arcade games and MAME machines, and recently he’s been trying to embed objects in those hard plastic spheres on the end of joysticks. A common suggestion is to 3D print some molds, but even though that’s a great idea in theory the reality is much different: you’re going to get layer lines on the casting, and a mirror finish is impossible.
No, a silicone mold is the way to do this, but here 3D printing can be used to create the mold for the silicone. Instead of a few pieces of hot glued cardboard or a styrofoam cup, [Florian] is 3D printing a a container to hold the liquid silicone around the master part.
After printing a two-piece part to hold both halves of a silicon mold, [Florian] put the master part in, filled it up with silicone, and took everything apart. There were minimal seam lines, but the end result looks great.
In addition to making a 3D printed mold container, [Florian] is also experimenting with putting 3D printed parts inside these joystick balls. The first experiment was a small 3D printed barrel emblazoned with the Donkey Kong logo. This turned out great, but there’s a fair bit of refraction that blows out all the proportions. Further experiments will include a Pac-Man, a skull, and a rose, to be completed whenever [Florian] gets a vacuum chamber.
For $5, [William] of Toronto’s Hacklab hackerspace got a hold of one of the smallest CRT screens ever made – about the size of a large coin. Over the course of a couple sessions – including a public hack boothside at their Mini Makerfaire – [William], [Igor], and several other members managed to connect it as a monitor directly off a Raspberry Pi. The end-goal is the world’s smallest MAME cabinet (smaller by almost half than this LCD one).
As Canada followed the US and stopped broadcasting analog back in 2011, it became quite a challenge to feed the screen a video source. They disclosed early that the easiest solution would just be an RF transmitter on the Pi and then tune the micro-set to that channel. Too easy. They wanted something elegant and challenging so they went digging into the circuitry to find a place to insert a composite video signal directly.
The real story here is their persistence at reverse engineering. The PCB was folded like a cardboard box to fit in the original case, making large portions of the circuitboard and wiring inaccessible. Even when they managed to trace the signal to what they thought was the appropriate chip (marked C80580), they could not find any information on the 30 year old chip. Noting that every other chip on the board was Panasonic and started with “AN5″, [Igor] suspected the mystery silicon was just renamed and went through every single datasheet he could find with that prefix. Combined with form factor, pin count and purpose, his sleuthing was rewarded with a guess for a match – the AN5715. His hunch was correct – using that datasheet led him to the answers they required.
Then they just had to figure out how get the composite signal the Pi outputted into something the chip would use to display the correct image. There were no shortage of challenges, failures and dead ends here either, but they had help from the rest of their membership.
Their project log is an interesting narrative through the process and in the end of course, it worked. It is displayed beautifully with a clear acrylic case and ready for a cabinet to be built.
Building a MAME machine around a Raspberry Pi has been the standard build for years now, and tiny versions of full-sized arcade machines have gone from curiosity to commonplace. [
The entire enclosure is 3D printed, and most of the electronics are exactly what you would expect: A Raspberry Pi, 2.5″ LCD, and a battery-powered speaker takes up most of the BOM. Where this build gets interesting is the buttons and joystick: after what we’re sure was a crazy amount of googling, [diygizmo] found something that looks like a normal arcade joystick, only smaller. Unable to find a suitable replacement for arcade buttons, [diygizmo] just printed their own, tucked a tact switch behind the plastic, and wired everything up.
Add in some decals, paint, and the same techniques used to create plastic model miniatures, and you have a perfect representation of a miniature arcade machine.