DCPU-16 running Pac-Man

If you’ve been trying to think of stuff you can do with the DCPU-16 this may inspire you to write a clone of  a classic game.

This version of Pac-Man was written using a sprite system with a 16 color pallette. It runs in an HTML-based emulator, so you can even monkey around with the assembly code to help you figure out how it works. But if you’re not into writing code that is this machine-close, you can just click the ‘run’ button and use your keyboard arrows to play through a level or two. You’ll notice there’s only one game board available so far and some things are still missing like that familiar waka-waka as he gobbles up the dots. Let us know if you mange to extend the features of this version.

In case you missed it, this emulator is running the DCPU-16 spec from Notch’s new game, 0x10c (. We have no idea how that’s going to shape up, but getting in on the game early will pay off it turns out to be as popular as Minecraft.

JTAG dongle pushes code to FPGA after bootup

This gnarly beast has near-magical qualities. [Sprite_TM] patched it together as a dongle which attaches to a JTAG header (we’re fairly certain this is not a standard footprint for that interface though). He uses it to push code to an FPGA after that device boots. Why? Well, there’s several reason, but the most generic answer is that some boards will not boot unless there is a chain of trust that validates the code which will be running.

In this case, [Sprite_TM] is using a knock-off board he acquired from a Chinese supplier. It’s a hardware network terminal (thin client), and as you can see in the video after the break, it works just fine. But that’s pretty boring and he wanted to use it for his own purposes. When he plugs in the dongle and powers up the board the network terminal is nowhere to be found, replaced with the code to play Pac-Man as if were a full arcade cabinet.

The dongle is simply a female DIL header, an ATtiny85, and a flash memory chip. The AVR has a software UART that speaks XSVF, the protocol used to push data to the FPGA. The data to be written is stored in the memory chip, and with that header in place reprogramming the AVR is just a matter of connecting an ISP programmer. Brilliant!

[Read more…]