The Game Boy As A Midi Synthesiser

In the world of chiptune music there are many platforms to choose from, each with their own special flavour tot heir sound. The Game Boy has a particular following, but it differs from some of its contemporary platforms in having a custom sound chip built into the same silicon as its processor. You can’t crank open a Game Boy and lift out the sound chip for your own synth project, instead you must talk to it through the Game Boy’s Z80 processor. This is something [Adil Soubki] knows well, as he’s completed a project that turns the handheld console into a MIDI synthesiser.

A Game Boy was designed to play games and not as a developer’s toy, so it doesn’t exactly roll out the red carpet for the hacker. He’s got under the console’s skin by mapping a section of its memory address map to the pins on a Teensy microcontroller board, and running some Game Boy code that reads the vaues there and uses them to configure the sound hardware. The Teensy handles the translation between MIDI and these byte values, turning the whole into a MIDI synthesiser. It’s a succesful technique, as can be seen in the video below the break. Best of all, the code is available, so you can have a go for yourself.

We’ve featured Game Boy synths before here at Hackaday, but usually they have been of the more conventional variety.

Continue reading “The Game Boy As A Midi Synthesiser”

Comparing Bare Silicon On Two Game Boy Audio Chips

We always look forward to a new blog post by [Ken Shirriff] and this latest one didn’t cure us of that. His topic this time? Comparing two Game Boy audio chips. People have noticed before that the Game Boy Color sounds very different than a classic Game Boy, and he wanted to find out why. If you know his work, you won’t be surprised to find out the comparison included stripping the die out of the IC packaging.

[Ken’s] explanation of how transistors, resistors, and capacitors appear on the die are helpfully illustrated with photomicrographs. He points out how resistors are notoriously hard to build accurately on a production IC. Many differences can affect the absolute value, so designs try not to count on exact values or, if they do, resort to things like laser trimming or other tricks.

Capacitors, however, are different. The exact value of a capacitor may be hard to guess beforehand, but the ratio of two or more capacitor values on the same chip will be very precise. This is because the dielectric — the oxide layer of the chip — will be very uniform and the photographic process controls the planar area of the capacitor plates with great precision.

We’ve decapsulated chips before, and we have to say that if you are just starting to look at chips at the die level, these big chips with bipolar transistors are much easier to deal with than the fine and dense geometries you’d find even in something like a CPU from the 1980s.

We always enjoy checking in with [Ken]. Sometime’s he’s taking apart nuclear missiles. Sometimes he is repairing an old computer. But it is always interesting.

Nintendo’s GBA Dev Board Could Pass For Modern DIY

When the Game Boy Advance came on the scene in 2001, it was a pretty big deal. The 32-bit handheld represented the single biggest upgrade the iconic Game Boy line had ever received, not only in terms of raw processing power, but overall design. It would set the state-of-the-art in portable gaming for years, and Nintendo was eager to get developers on board.

Which could explain why the official GBA development kit, recently shown off by [Hard4Games], looks like something that was built in a hackerspace. It’s pretty common for console development systems to look more like boxy 1990s computers than the sleek injection molded units that eventually take up residence under your television, but they don’t often come in the form of a bare PCB. It seems that Nintendo was in such a rush to get an early version of their latest handheld’s guts out to developers that they couldn’t even take the time to get a sheet metal case stamped out for it.

The development board doesn’t like later GBA games.

All of the principle parts of the final GBA are here, and as demonstrated in the video after the break, the board even plays commercially released games. Though [Hard4Games] did find that some titles from the later part of the handheld’s life had unusual graphical glitches; hinting that there are likely some low-level differences that don’t manifest themselves unless the developer was really digging deep to squeeze out all the performance they could.

The board also lacks support for Game Boy and Game Boy Color games, though this is not wholly surprising. When an older game was inserted into a GBA, the cartridge would physically depress a switch that enabled a special 8080-based coprocessor that existed solely for backwards compatibility. Adding that hardware to a development board would have made it more expensive and added no practical benefit. That said, [Hard4Games] does point out that there appears to be a unpopulated area of the board where the backwards compatibility switch could have been mounted.

Hackers have always been enamored with the Game Boy, so it’s fitting to see that the official development kit for the final entry into that storied line of handhelds looked a lot like something they could build themselves. If anyone feels inclined to build their own “deconstructed” GBA in this style, you know where to find us.

Continue reading “Nintendo’s GBA Dev Board Could Pass For Modern DIY”

The Nintendo Game Boy Color Is An Aircon Remote

Those of you who are familiar with 1990s handheld consoles may recall that Nintendo’s Game Boy Color had an infra-red receiver and transmitter. The thought of a handheld computer with infra-red capabilities interested [jg], who immediately set about converting it into a remote control for an air conditioner.

The Game Boy doesn’t have dedicated infra-red remote control hardware, instead the IR diodes appear to be connected to I/O lines. Thus the bitstream bas to be bit-banged, and takes the processor’s entire attention when transmitting. The software is neatly placed on a reprogrammed bootleg cartridge.

It’s an interesting read in terms of the approach to reverse engineering, for example finding the parameters of 37 kHz infra-red remote control by trial and error rather than by a quick read up on the subject, or searching for information on National air conditioners and finding nothing, but not searching the National brand itself to find that a search on Panasonic air conditioners would likely give all the information needed. But the end result operates the appliance, so it’s good to record a success.

This isn’t the first time we’ve seen a Game Boy control something, though we can’t recall seeing another using the IR. Need a brilliant overview of the Game Boy?  We’ve got you covered.

Thanks [Roel] for the tip.

Header image: Evan-Amos / Public domain.

Snakes And Ladders: Game Boy Emulator In Python

If a Game Boy was a part of your childhood, you were probably more than once dreaming of spending your entire school day with it. Well, they had to wait a few more years for that, but eventually in 2015, [Asger], [baekalfen], and [troelsy] made that dream reality when they created a Game Boy emulator in Python for a university project. However, it didn’t stop there, and the emulator has since grown into a full-blown open source project, PyBoy, which just reached the version 1.0 release.

Since it started out as an academic project, the three of them had to do their research accordingly, so the background and theory about the Game Boy’s internal functionality and the emulator they wrote is summarized in a report published along with the source code. There is still some work to be done, and sadly there is no sound support implemented yet, but for the most part it’s fully functional and let’s you successfully play your own extracted cartridges, or any ROM file you happen to have in your possession.

Being an emulator, you can also inspect its inner life when run in debug mode, and watch the sprites, tiles, and data as you play, plus do cool things like play the emulation in reverse as shown in the clip below. Even more so, you can just load the instance in your own Python scripts, and start writing your own bots for your games — something’s we’ve seen in action for the NES before. And if you want to dive really deep into the world of the Game Boy, you should definitely watch the 33c3 talk about it.

Continue reading “Snakes And Ladders: Game Boy Emulator In Python”

There Really Was A Sewing Machine Controlled By A Game Boy

These days, high-quality displays and powerful microcontrollers are cheap and plentiful. That wasn’t the case a couple of decades ago, and so engineers sometimes had to get creative. The result of this is products like the Jaguar nu.yell sewing machine, as covered by [Kelsey Lewin].

The later nuotto model was capable of more advanced embroidery patterns. A Mario character cartridge was sold, while a later Kirby edition was scrapped before release.

The Japanese market product eschewed the typical mechanical controls of the era, to instead interface with a Nintendo Game Boy. The sewing machine would hook up to the handheld console via the Link Port, while the user ran a special cartridge containing the control software. This would allow the user to select different stitch types, or embroider letters. Very much a product of its time, the nu yell mimics the then-cutting edge industrial design of the first-generation Apple iMac. The technology was later licensed to Singer, who brought it to the US under the name IZEK. Sales were poor, and the later Jaguar nuotto didn’t get a similar rebranding stateside.

Back in the late 90s, the Game Boy was likely an attractive package to engineers. Packing a Z80 processor, buttons, and a screen, it could act as a simple human interface in lieu of designing one from the ground up.  Aprilia even used them to diagnose motorbike ECUs, and we’ve seen Game Boy parts used in medical hardware from the era, too. Video after the break.

Continue reading “There Really Was A Sewing Machine Controlled By A Game Boy”

Scott Shawcroft Is Programming Game Boys With CircuitPython

Some people like to do things the hard way. Maybe they drive a manual transmission, or they bust out the wire wrap tool instead of a soldering iron, or they code in assembly to stay close to the machine. Doing things the hard way certainly has its merits, and we are not here to argue about that. Scott Shawcroft — project lead for CircuitPython — on the other hand, makes a great case for doing things the easy way in his talk at the 2019 Hackaday Superconference.

In fact, he proved how easy it is right off the bat. There he stood at the podium, presenting in front of a room full of people, poised at an unfamiliar laptop with only the stock text editor. Yet with a single keystroke and a file save operation, Scott was able make the LEDs on his Adafruit Edge Badge — one of the other pieces of hackable hardware in the Supercon swag bag — go from off to battery-draining bright.

Code + Community

As Scott explains, CircuitPython prides itself on being equal parts code and community. In other words, it’s friendly and inviting all the way around. Developing in CircuitPython is easy because the entire environment — the code, toolchain, and the devices — are all extremely portable. Interacting with sensors and other doodads is easy because of the import and library mechanics Python is known for, both of which are growing within the CircuitPython ecosystem all the time.

CircuitPython is so friendly that it can even talk to old hardware relatively easily without devolving into a generational battle. To demonstrate this point, Scott whipped out an original Nintendo Game Boy and a custom cartridge, which he can use to play fun sounds via the Game Boy’s CPU.

Now You’re Playing With Python

It’s interesting to see the platforms on which Scott has used the power of CircuitPython. The Game Boy brings the hardware for sound and pixel generation along with some logic, but he says it’s the code on the cartridge that does the interesting stuff.

The CPU communicates with carts at a rate of 1MHz. As long as you can keep this rate up and the CPU understands your instructions, you can get it to do anything you want.

Scott’s custom cart has a 120MHz SAMD51. He spends a second explaining how he gets from Python libraries down to the wire that goes to the Game Boy’s brain — basically, the C code underneath CircuitPython accesses direct structs defined within the SAMD to do Direct Memory Access (DMA), which allows for jitter-free communication at 1MHz.

He’s using the chip’s lookup tables to generate a 1MHz signal out of clock, read, and A15 in order to send music-playing instructions to the sound register of the Game Boy’s CPU. It sounds like a lot of work, but CircuitPython helps to smooth over the dirty details, leaving behind a simpler interface.

If you want easy access to hardware no matter how new or nostalgic, the message is clear: snake your way in there with CircuitPython.

Continue reading “Scott Shawcroft Is Programming Game Boys With CircuitPython”