Teardown 2019: A Festival Of Hacking, Art, And FPGAs

As hackers approached the dramatic stone entrance of Portland’s Pacific Northwest College of Arts, a group of acolytes belonging to The Church of Robotron beckoned them over, inviting them to attempt to earn the title of Mutant Saviour. The church uses hazardous environments, religious indoctrination, a 1980s arcade game and some seriously funny low tech hacks to test your abilities to save humanity. This offbeat welcome was a pretty good way to set the tone for Teardown 2019: an annual Crowd Supply event for engineers and artists who love hardware. Teardown is halfway between a conference and a party, with plenty of weird adventures to be had over the course of the weekend. Praise the Mutant! Embrace Futility! Rejoice in Error!

For those of us who failed to become the Mutant Saviour, there were plenty of consolation prizes. Kate Temkin and Mikaela Szekely’s talk on accessible USB tools was spectacular, and I loved following Sophi Kravitz’s journey as she made a remote-controlled blimp. Upstairs in the demo room, we had great fun playing with a pneumatic donut sprinkle pick and place machine from tinkrmind and Russell Senior’s hacked IBM daisywheel typewriter that prints ASCII art and runs a text-based Star Trek adventure game.

It wouldn’t be much of a hardware party if the end of the talks, demos and workshops meant the end of each day’s activities, but the Teardown team organised dinner and an afterparty in a different locations every night: Portland’s hackerspace ^H PDX, the swishy AutoDesk offices, and the vintage arcade game bar Ground Kontrol. There also was a raucous and hotly-contested scavenger hunt across the city, with codes to crack, locks to pick and bartenders to sweet talk into giving you the next clue (tip: tip).

Join me below for my favorite highlights of this three day (and night) festival.

Continue reading “Teardown 2019: A Festival Of Hacking, Art, And FPGAs”

School’s In Session With Arduboy Curriculum

It’s hard not to be impressed by the Arduboy. In just a few short years, [Kevin Bates] went from proof of concept to a successful commercial product without compromising on his original open source goals. Today, anyone can develop a game for the Arduboy and have it distributed to owners all over the world for free. If you’ve ever dreamt of being a game developer, the Arduboy community is for you.

Realizing the low-cost hardware and open source software of the Arduboy makes it an excellent way to learn programming, [Kevin] is now trying to turn his creation into a legitimate teaching tool. He’s kicking off this new chapter in the Arduboy’s life with a generous offer: giving out free hardware to educators all over the world. Anyone who wants to be considered for the program just needs to write-up a few paragraphs on how they’d utilize the handheld game system in their class.

[Kevin] already knows the Arduboy has been used to teach programming, but those have all been one-off endeavours. They relied on a teacher that was passionate enough about the Arduboy to put in their own time and effort to create a lesson plan around it. So one of the main goals right now is getting an official curriculum put together so educators won’t have to start from scratch. The community has already developed 16 free lessons, but they’re looking for help in creating more and translating them into other languages.

While the details are still up in the air, [Kevin] also plans to travel to schools personally and help them get their Arduboy classes off the ground. He’s especially interested in developing countries and other areas that are disadvantaged educationally. Believing that the Arduboy is as much a way to teach effective leadership and teambuilding as it is programming, he thinks this program can truly make a difference.

Since [Kevin] first Rickrolled us with his prototype in 2014, we’ve seen the Arduboy project spread like wildfire through the hacker community. From figuring out how to play its games on other gadgets to developing an expansion cartridge for the real thing, the Arduboy has already done its fair share of inspiring. Here’s hoping it has just as much of an impact on the next generation of hackers once they get their hands on it.

The ArduBoy Community Rolled Their Own Cartridge

The Arduboy, as you might have guessed from the name, was designed as a love letter to the Nintendo Game Boy that many a hacker spent their formative years squinting at. While the open source handheld is far smaller than the classic DMG-01, it retains the same general form factor, monochromatic display, and even the iconic red LED to the left of the screen. But one thing it didn’t inherit from the original was the concept of removable game cartridges. That is, until now.

Over the last year, [Mr.Blinky] and a group of dedicated Arduboy owners have been working on adding a removable cartridge to the diminutive handheld. On paper it seemed easy enough, just hang an external SPI flash chip off of the test pads that were already present on the Arduboy PCB, but to turn that idea into a practical cartridge required an immense amount of work and discussion. The thread on the Arduboy community forums covers everything from the ergonomics of the physical cartridge design to the development of a new bootloader that could handle loading multiple games.

Early cartridge prototypes.

The first problem the group had to address was how small the Arduboy is: there’s simply no room in the back to add in a cartridge slot. So a large amount of time is spent proposing different ways of actually getting the theoretical cartridge attached to the system. There was some talk of entirely redesigning the case so it could take the cartridge internally (like the real Game Boy), but this eventually lost out for a less invasive approach that simply replaced the rear of the Arduboy with a 3D printed plate that gave the modders enough room to add a male header along the top edge of the system.

As an added bonus, the cartridge connector doubles as an expansion port for the Arduboy. While perfecting the design, various forum users have chimed in with different gadgets that make use of the new port, from WS2812B LEDs to additional input devices like joysticks or a full QWERTY keyboard. Even if you aren’t interested in expanding the storage space on your Arduboy, being able to plug in new hardware modules certainly opens up some interesting possibilities.

In fact, the project so impressed Arduboy creator [Kevin Bates] that he chimed in on the topic last month to announce he would start looking into integrating the community’s cartridge modification into the production hardware. If all goes well, pretty soon there might be an official upgrade path for those who want to expand what this tiny nostalgia machine is capable of.

Continue reading “The ArduBoy Community Rolled Their Own Cartridge”

Circuit-Level Game Boy: Upping Emulation Ante By Simulating Every Cycle

Usually when writing emulation software for a system like the Game Boy, one makes sure to take as many shortcuts as possible in order to reduce the resources required for the emulation. This has however the unfortunate side-effect that it reduces the overall accuracy of the emulation and with it the compatibility with games on the system.

This is the basic reasoning behind projects which seek to abandon simplistic abstractions in favor of cycle-accurate, full compatibility approaches, of which MetroBoy is probably the most extreme one. Instead of abstracting away the hardware, it instead does the emulation at the circuit level. As with such other projects, this means that the emulator requires a lot more CPU cycles to get things just right. On the bright side, one can likely still run this emulator on any modern system.

As the MetroBoy author explains, he implemented code in C++ which allowed him to construct circuits in an HDL-style manner, which should theoretically also allow him to generate a Verilog (or VHDL) softcore out of the project. As a demonstration of implementing HDL in C++ it’s decidedly interesting.

An approach like this is pretty much the exact opposite of a project like the UltraHLE (ultra high-level emulator) Nintendo 64 emulator, which used the knowledge that Nintendo 64 games are written in C as a first step to creating libraries that the code in the Nintendo 64 ROMs would call instead of the native (Nintendo) libraries. This allowed N64 games to directly run on the target system, with the graphic and system calls translated by UltraHLE into native OS calls, using the 3dfx Glide API for accelerated graphics.

While an approach like UltraHLE took allows for the most minimal use of system resources by essentially foregoing emulation completely, for retro systems like the Game Boy where games were implemented in assembly on bare hardware, using this circuit-level emulation ensures that one gets the most accurate match with the original handheld console experience.

As a word of caution to those who are now itching to try out MetroBoy, its Github site notes that it currently lacks support for game saves, uses a mixture of original Game Boy (DMG) and Game Boy Advance SP (AGS) hardware that confuses some games and has rather buggy sound support.

If playing around with software-defined Game Boy circuits isn’t enough and would like to literally look inside a real Game Boy, the X-ray image from the top of the article is something Chris over at Elektronaut pulled off several years ago.

Clock Mod Brings Super Game Boy To Competitive Arena

For one time small window between 1994 and 1998, you could play Game Boy games in color with a Super Game Boy. This was a cartridge that plugged into a Super Nintendo, and using proprietary Lock-On™ technology, you could play Game Boy games on the big screen. Inside the Super Game Boy was the guts of a real Game Boy. This was, and still is, the best way to experience everything from Kirby’s Dream Land or the Pokemon of Kanto.

Unfortunately, the Super Game Boy doesn’t exactly replicate the Game Boy experience. The crystal in the Super Game Boy means that games and sound run between 2 and 4% faster. The Super Game Boy is out for competitive speed running, and if you’re using Little Sound DJ, you’ll be out of tune with the rest of the band. The Super Game Boy doesn’t have link cable support, either.

Now, [qwertymodo] over on Tindie has the solution to the faster Super Game Boy. It’s a clock mod, but it’s not just swapping a crystal. This is a board that solders to existing pads, and still allows you to access the speed up and slow down functions available from the Commander controller from Hori. It’s a slightly impressive bit of PCB art, and certainly something that deserves notice.

This mod fixes the 2-4% speedup of the Super Game Boy, but then there’s still one feature missing: the link cable. Well, hold on to your butts, because there’s a mod for this one too. The Super Game Boy Link Port is a small little breakout board that requires fly wires to the main chip in the Super Game Boy. The installation isn’t quite as clean as the crystal hack, but if you’re fixing the clock, you might as well add the link cable port while you’re in there.

[qwertymodo] has a comparison test of the Super Game Boy running Pokemon Red, and this thing is dead on. It runs at exactly the same speed as an original Game Boy, only in color, on a TV. You can check that out below.

Continue reading “Clock Mod Brings Super Game Boy To Competitive Arena”

Game Boy Recreated In Verilog

With the wide availability of Raspberry Pi hardware and pre-baked Linux distros with emulators ready to go, making a retro handheld is easier than ever. Emulation isn’t the only way to go about playing old games however. [Wenting Zhang] decided to instead recreate the Nintendo Game Boy in Verilog, and has documented the effort.

The project runs on a Spartan 6 FPGA. [Wenting] first developed the hardware to use a DualShock controller for input, and output video to a regular LCD monitor. However, work is now underway to produce a handheld VerilogBoy. This will feature a 320×320 LCD screen, with pixels being quadrupled from the original Game Boy 160×144 resolution, with some pixels to spare. [Wenting] is also looking at porting the code to some Pano Logic units, which we’ve discussed before. The thin clients pack FPGA hardware and lots of IO ports that make them perfect for such a project.

Code is available on Github for the curious tinkerers out there. While there are easier ways to play old handheld games, the amount of learning value of such a project should not be underestimated. We’ve seen FPGAs used for other Nintendo hijinx, too – like this NES cart that packs some serious muscle. Video after the break.

Continue reading “Game Boy Recreated In Verilog”

A Game Boy Supercomputer For AI Research

Reinforcement learning has been a hot-button area of research into artificial intelligence. This is a method where software agents make decisions and refine these over time based on analyzing resulting outcomes. [Kamil Rocki] had been exploring this field, but needed some more powerful tools. As it turned out, a cluster of emulated Game Boys running at a billion FPS was just the ticket.

The trick to efficient development of reinforcement learning systems is to be able to run things quickly. If it takes an AI one thousand attempts to clear level 1 of Super Mario Bros., you’d better hope you’re not running that in real time. [Kamil] started by coding a Game Boy emulator in C. By then implementing it in Verilog, [Kamil] was able to create a cluster of emulated Game Boys that enabled games to be run at breakneck speed, greatly speeding the training and development process.

[Kamil] goes into detail about how the work came to revolve around the Game Boy platform. After initial work with the Atari 2600, which is somewhat of a defacto standard in RL circles, [Kamil] began to explore further. It was desired to have an environment with a well-documented CPU,  a simple display to cut down on the preprocessing required, and a wide selection of games.

The goal of the project is to allow [Kamil] to explore the transfer of knowledge from one game to another in RL systems. The aim is to determine whether for an AI, skills at Metroid can help in Prince of Persia, for example. This is arguably true for human players, but it remains to be seen if this can be carried over for RL systems.

It’s rather advanced work, on both a hardware emulation level and in terms of AI research. Similar work has been done, training a computer to play Super Mario through monitoring score and world values. We can’t wait to see where this research leads in years to come.