Neural Nets And Game Boy Cameras

Released in 1998, the Game Boy camera was perhaps the first digital camera many young hackers got their hands on. Around the time Sony Mavica cameras were shoving VGA resolution pictures onto floppy drives, the Game Boy camera was snapping 256×224 resolution pictures and displaying them on a 190×144 resolution display. The picture quality was terrible, but [Roland Meertens] recently had an idea. Why not use neural networks to turn these Game Boy Camera pictures into photorealistic images?

Neural networks, deep learning, machine learning, or whatever other buzzwords we’re using require training data. In this case, the training data would be a picture from a Game Boy Camera and a full-color, high-resolution image of the same scene. This dataset obviously does not exist so [Roland] took a few close up head shots of celebrities and reduced the color to four shades of gray.

[Roland]'s face captured with the Game Boy Camera (left), and turned into a photorealistic image (right)
[Roland]’s face captured with the Game Boy Camera (left), and turned into a photorealistic image (right)
For the deep machine artificial neural learning part of this experiment, [Roland] turned to a few papers on converting photographs to sketches and back again, real-time style transfer. After some work, this neural network turned the test data back into images reasonably similar to the original images. This is what you would expect from a trained neural network, but [Roland] also sent a few pics from the Game Boy Camera through this deep machine artificial learning minsky. These images turned out surprisingly well – a bit washed out, but nearly lomographic in character.

We’ve seen a lot of hacks with the Game Boy Camera over the years. Everything from dumping the raw images with a microcontroller to turning the sensor into a camcorder has been done. Although [Roland]’s technique will only work on faces, it is an excellent example of what neural networks can do.

Anti-Emulation Tricks on GBA-Ported NES Games

Emulation is a difficult thing to do, particularly when you’re trying to emulate a complex platform like a game console, with little to no public documentation available. Often, you’ll have to figure things out by brute force and dumb luck, and from time to time everything will come unstuck when a random piece of software throws up an edge case that brings everything screeching to a halt.

The Classic NES series was a handful of Nintendo Entertainment System games ported to the Game Boy Advance in the early 2000s. What makes them unique is a series of deliberately obtuse programming decisions that make them operate very differently from other titles. These tricks utilize advanced knowledge of the way the Game Boy Advance hardware operates and appear to have been used to make the games difficult to copy or emulate.

The games use a variety of techniques to confuse and bamboozle — from “mirrored memory” techniques that exploit addressing anomalies, to putting executable code in video RAM and writing to the audio buffers in unusual manners.

Even more confusingly, these techniques only appear to have been used in the Classic NES series of games, and not other Game Boy Advance titles. It’s not obvious why Nintendo went to special effort to protect these ports over other titles; perhaps the techniques used were for other reasons than just an attempt at copy protection. Speculate amongst yourselves in the comments.

This isn’t the first time we’ve discussed emulation of Nintendo systems — check out this effort to reverse engineer the Sony Pocketstation.

[Thanks to [[[Codifies]]] for sending this in!]

Pi Zero Transforms to Game Boy

[GreatScott] bought a Game Boy case. Normally, you’d assume you wanted this to repair a damaged Game Boy, but in this case [GreatScott] used a Pi Zero and some 3D printing to build a game system into the tiny box. You can see some videos, below.

Two interesting parts of the project are the source of the LCD display (a rearview camera screen) and the selection of batteries. Lithium ion batteries are all the rage. But if you watch the news, you know there are some safety issues with using the batteries, especially if you use them improperly. [GreatScott] decided to go with nickel metal hydride cells which still need a protection circuit, but are typically less of a danger than the newer technology cells.

Continue reading “Pi Zero Transforms to Game Boy”

DIY Coprocessors For The Game Boy Color

Back in the olden days, when video games still came on cartridges, the engineers and programmers making these carts had a lot of options. One of the most inventive, brilliant, and interesting cartridges to come out of the 90s was Star Fox for the Super Nintendo. Star Fox featured a coprocessor chip, the Super FX, that was effectively a GPU used to draw polygons in the frame buffer. Without this, Star Fox wouldn’t be 3D, Yoshi’s Island wouldn’t be as cute, and there wouldn’t be an always-on processor in your computer with the potential to spy on everything you do.

gameboy-coprocessor-cartridgeThe Super FX chip, the Capcom-developed Cx4 coprocessor, and the Nintendo DSP all lived in a cartridge, but the technology to put a better computer in a cartridge never made it to Nintendo’s handheld devices. Cheap, powerful microcontrollers are everywhere now, and it’s not that hard to make a board with card edge connectors, leading [Anders] to build a Super FX for the Game Boy Color.

Game Boy cartridges are simple — just a memory controller and some memory is all you need. Drop in a microcontroller, and you have a Game Boy coprocessor. This cartridge features the MBC1 memory bank controller, 512kB of Flash, and 8KB SRAM. These are fairly standard parts, but there’s one last trick up the sleeve of this board: a KE04 from NXP, an ARM Cortex-M0+ microcontroller running at 48MHz . This microcontroller is, effectively, the GPU for the Game Boy.

This ARM-powered coprocessor is able to convert the framebuffer into tiles in just 2ms, giving the system plenty of time for image processing and rendering. Due to the limitations of the Game Boy, the best resolution offered by this coprocessor is either 160×96 or 128×128 pixels, short of the complete 160×144 pixel display in the Game Boy Color.

Even though [Anders] is still working on programming this thing to show off the power of his Game Boy coprocessor, he has a few demos to show off. The most impressive is a Wolfenstein-like clone. That’s extremely impressive and categorically impossible on a stock Game Boy Color.

Continue reading “DIY Coprocessors For The Game Boy Color”

Emulating a GameBoy Advance Inside of a Gameboy Advance

[Ryzee119]’s GBA might not look so different at first glance. The screen is way better than you remember, but that may just be your memory playing tricks on you. The sound comes out of the speakers. It feels the right weight. It runs off AA batteries. Heck, even the buttons feel right.

emulating-gba-inside-gbaIt’s not until you notice that it really shouldn’t be playing any games without a cartridge inserted that you know something is not right in the Mushroom Kingdom. When you look inside you see the edge of a Raspberry Pi Zero instead of the card edge connector you expected.

It took a lot of work for [Ryzee119] to convert a dead, water damaged, GBA to a thriving emulation station based around a Pi Zero. The first step was desolder the components he couldn’t find anywhere else. The LR buttons, the potentiometer, and even the headphone jack. The famously hard to see screen, of course, had to go.  It was replaced by a nice TFT. Also, the original speaker was too corroded from the water and he sourced a replacement.

Custom replacement PCB
Custom replacement PCB

Next he took a good photo of the GBA’s circuit board. We wonder if he used the scanner method mentioned in the comments of this article? He spent a lot of time in Dassault’s DraftSight, a 2D CAD program, outlining the board. Then, after thoroughly verifying the size of the board for the Nth time he imported the outlines to EagleCAD.

He managed to cram quite a bit onto the board while remaining inside the GBA’s original envelope. The switches, potentiometer, and jack went back to their original locations. Impressively, he made his own pad traces for the A, B, and D-Pad buttons. The mod even handles slowly decreasing battery voltages better than the original.

In the end it all snaps together nicely. He’s configured it to boot into the emulator right at start-up. If you’d like one for yourself, all his files are open source. 

Simple Game Boy iPhone Mod Is Simple

We’ve featured the work of [Modpurist] before, but his latest hack is wonderful in its simplicity. He wanted to create a more authentic Game Boy feel on his iPhone, so he printed out and stuck a skin on the front that makes it look like a Game Boy. Or rather, a Phone Boy, as the form factor is a bit different.

By measuring out the on-screen buttons and using light photo paper, he was able to have buttons on the skin as well: the touch screen still works through it.  You can download his printable templates… and the finishing touch is a similar print for the back of the phone to gives that genuine Game Boy feel. Okay, feel is not the right term since the classic d-pad and red buttons are still just capacitive and have no throw. But this is a clever step in a fun direction.

Check out his other hacks while you are at it, including the Game Boy Fridge.

Continue reading “Simple Game Boy iPhone Mod Is Simple”

Game Pie Advance Brings Retro Gaming To Your Fingertips

We love our Game Boy and RetroPie mods here at Hackaday because the Raspberry Pi Zero has made it easier than ever to carry a pocket full of classic games. [Ed Mandy] continues this great tradition by turning a matte black Game Boy Advance into a RetroPie handheld.

Details are scant on how [Mandy] built his Game Pi Advance, but we can glean a few details from the blog post and video. A Raspberry Pi Zero running RetroPie appears to be piggybacking on a custom PCB that slots neatly into the GBA case. This provides easy access to the Pi Zero’s USB and micro HDMI via the cartridge slot to connect to an external screen, as well as a second controller to get some co-op NES and SNES action on. It’s worth noting here that [Mandy] has foregone adding X and Y buttons in the current version.

Continue reading “Game Pie Advance Brings Retro Gaming To Your Fingertips”