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”
The demoscene usually revolves around the Commodore 64, and when you compare the C64 hardware to other computers of a similar vintage, it’s easy to see why. There’s a complete three-voice synthesizer on a chip, the hardware allows for sprites, a ton of video pages, and there are an astounding sixteen colors, most of which look good. You’re not going to find many demos for the Apple II, because the graphics and sound are terrible. You’re also not going to find many demos for an original IBM PC from 1981, because for thirty years, the graphics and audio have been terrible.
8088 MPH by [Hornet], [CRTC], and [DESire], the winner of the recent 2015 Revision Demo compo just turned conventional wisdom on its head. It ran on a 4.77 MHz 8088 CPU – the same found in the original IBM PC. Graphics were provided via composite output by a particular IBM CGA card, and sound was a PC speaker beeper, beeping sixty times a second. Here’s a capture of the video.
Because of the extreme nature of this demo, it is unable to run on any emulator. While the initial development happened on modern machines with DOSbox, finishing the demo needed to happen on an IBM 5160, equivalent to the 5150, but much easier to find.
Despite the meager hardware and a CPU that reads a single byte in four cycles, effectively making this a 1.19 MHz CPU, the team produced all the usual demoscene visuals. There are moire patterns, bobbing text, rotated and scaled bitmaps, and an astonishing 1024-color mode that’s an amazing abuse of 80×25 text mode with NTSC colorburst turned on.
Below you can find a video of the demo, and another video of the audience reaction at the Revision compo.
Continue reading “Demoing an 8088″
[Juan] sent us his writeup of a microcomputer he built using an Arduino UNO (AVR ATmega328p) and some off-board SRAM. This one’s truly minimalistic.
Have a look at the schematics (PDF). There’s an Arduino, the SPI SRAM, some transistors for TV video output, and a PS/2 connector for the keyboard. That’s it, really. It’s easily built on a breadboard in a few minutes if you have the parts on hand. Flash the Dan64 operating system and virtual machine into the AVR and you’re good to go.
Now we’ve seen a few 6502-based retro computers around here lately that use a 6502 paired with a microcontroller for the interfacing, but they’ve all been bulky three-chip affairs. [Juan] wins the minimalism prize by using a 6502 virtual machine implemented in the AVR to reduce the parts count down to two chips for the whole shooting match.
Using a 6502 virtual machine was a crucial choice in the design, because there are 6502 cross compilers that will let you compile and debug code for the microcomputer on your macrocomputer and then load it into the micro to run. This makes developing for the micro less painful.
How does it load programs you ask? The old-fashioned way of course, using audio files. Although rather than using the Kansas City Standard as in days of yore, he encodes the data in short and long pulses of square waves. This might be less reliable, but it sure saves on external hardware.
Continue reading “The Dan64: A Minimal Hardware AVR Microcomputer”
Another day, another interesting YouTube channel. [Chris]’ Clickspring channel and blog is something you don’t really see much these days: machining parts with a lathe, a mill, and no CNC. The project [Chris] is working on now is a clock based on a design by [John Wilding]. It’s very large, and all the parts are constructed out of raw brass and steel stock.
Of course making a clock isn’t just about cutting out some parts on a lathe and turning them on a mill. No, you’re going to need to make the parts to make those parts. [Chris] has already made a tailstock die holder for his lathe, a clamping tool to drill holes in rods, and a beautiful lathe carrier to hold small parts.
All of this is top-notch work, with custom tin lapping tools to put a mirror finish on the parts, and far more effort than should be necessary going into absolute perfection. The clock project is turning out great, although there are several more months until it will tick its first second.
Selected videos below.
Continue reading “Machining A Skeleton Clock In 10,000 Easy Steps”
If you grew up playing Pokemon Red or Blue, you might have moved far away from your childhood friends by now. If you’re still playing Pokemon Red or Blue, you can now literally reconnect with these friends using [Pepijn]’s new and improved Game Boy link that lets players trade Pokemon over the internet.
Based on [Pepijn]’s previous work building an Arduino-based Pokemon storage system (which was inspired by a separate project that was able to spoof trades), the device allows a Game Boy (including Pocket, Color, and Advance versions) to connect to the Internet via a Teensy shield. The online waiting room software is called TCPoke which facilitates the Internetting of the Game Boys. From there, all you have to do is connect via the project’s wiki!
The TCPoke software is available on the project’s site. Also, be sure to check out the video below which shows a demonstration of how the software works. There is noticeable delay compared to a direct link between Game Boys, but it functions very well. We didn’t see this link system work for a battle, but it would be interesting to see if it is possible. If so, you might never have to go to a Pokemon League meeting again!
Continue reading “Use The Internet To Get Your Kadabra To Evolve”
[Bob] and [Aubrey] run the System Source Computer Museum a little north of Baltimore, Maryland. For an exhibit, they thought a visual representation of digital logic and came up with a two-bit binary adder. Yes, it’s just a full adder and exactly what you would find somewhere in the second or third chapter of any digital logic textbook. The way they’re illustrating how a full adder works is the killer feature here: they’re using EL wire for all of the wires connecting the gates.
The full adder is implemented with an Arduino Mega, but the interface is the real show here. On the left side of the display there are four illuminated toggle switches that show virtual electrons flowing through EL wires, through gates and finally out to a seven-segment display. The EL wires are controlled with an EL Escudo Dos shield – a good thing, since there are a lot of lines between switches, gates, and outputs.
You can check out [Aubrey]’s demo video that also shows off how they built it below. If you’re around Baltimore, you can check out the display at the museum.
Continue reading “Visualizing Digital Logic With EL Wire”
A while ago, [Steve] over at Big Mess ‘O Wires created a device that would emulate old Macintosh disk drives, storing all the data on an SD card. No, it’s not SCSI; the early Apples had a DB-19 connector for connecting 400 and 800kB disk drives. It’s a great piece of hardware for bootstrapping that old Mac you might have sitting around. Apple ][s, IIs, and //s use an extremely similar connector for their disk drives. A few rumors on some forums led [Steve] to experiment with some ancient bromide-stained boxes, and the results are interesting to say the least.
After pulling out an old //e and IIgs from storage, [Steve] found his Macintosh Floppy Emulator didn’t work with the Apples. This was due to the way Apples could daisy chain their disk drives. There’s an extra enable signal on the connector that either brings Drive 1 or Drive 2 into the circuit. Macs don’t care about this signal, but Apples do. Luckily the 800kB drives for the IIgs have an extra board that handles this daisy chain and drive eject circuitry.
After removing this extra board from a IIgs drive and connecting it to the Floppy Emu, everything worked beautifully. With schematics and a working circuit in hand, it’s now a piece of cake to build an adapter board for using the Macintosh Floppy Emu with Apples, or to build that circuit into a future revision of the Floppy Emulator.
Considering how much trouble [Steve] had bootstrapping these Apples without an SD card to Floppy drive emulator, we’re thinking this is great. The current way of making an Apple II useful is ADTPro, a program that uses audio to communicate with Apples over the cassette port. In case you haven’t noticed, microphone and headphone ports on laptops are inexplicably disappearing, making a hardware device like a SD card floppy emulator the best way to bring disk images to 30-year-old hardware.