In The Legend of Zelda: Breath of the Wild Guardians are a primitive form of sentry turret that tracks the player with a watchful eye. Inspired by this, [npentrel] decided to whip up one of his own in the real world.
The build relies on a Raspberry Pi kitted out with its usual camera for machine vision purposes. It uses the Viam robot toolkit, which runs a machine learning model to detect pets and humans on the camera feed. The guardian then tracks any pets or humans that show up by turning its head, and thus the camera, with a servo controlled by a PWM signal via the Raspberry Pi’s GPIO pins. It’s all wrapped up in a nicely-decorated 3D printed model that really does look like something straight out of Breath of the Wild.
Sentry projects are a great way to learn about electronics, mechanics, and image processing techniques. It’s funny to see how advanced and complicated these projects were fifteen years ago, compared to how easy they are today with modern machine learning libraries. How times change!
Finding a device or app that isn’t a web browser doesn’t seem easy. These days, it is either connected to the web (looking at you ESP32) or is just a web browser pretending to be something else (a la electron, PWAs, or React Native). So, of course, it is on us to create more and more exciting things to browse. [Connor Clark] is one of those people, and he brought Zelda Classic to the browser.
Zelda Classic (ZC) isn’t an official Zelda game. Instead, it’s an old engine designed to run the world in the OG Legend of Zelda and be easily modified to support hundreds of different games. To date, there are over 600 games submitted by a large community. ZC is an Allegro-based Windows-only game, so the first step was to bust out Emscripten to start tweaking the C++ code to support a web environment. Rather than completely port the huge codebase over from Allegro, [Connor] made the jump from Allegro 4 to 5. Allegro 5 has SDL as a backend and adds support for Emscripten.
Unfortunately, the 4 to 5 wasn’t as simple as changing the dependency. The API was wholly re-written, and there is a handy adapter known as Allegro Legacy to help transition a project from one to another. After squashing a multitude of bugs, it was a relatively painless procedure. After a quick detour getting music and level data working, [Connor] faced his next challenge: multi-threading. Efforts to move the main loop off of the browser thread and into a web worker ran into issues with having to yield in loops, deadlocks, and recursive mutexes. Finally, he added music and gamepad support after fixing several bugs in SDL and Allegro.
It’s an incredible journey with many tips and tricks for debugging seemingly intractable bugs. The code is up on GitHub, or jump in and start playing if you’re interested. Why not check out this browser-based OpenSCAD as well?
Keeping source code to programs closed is something that is generally frowned upon here for plenty of reasons. Closed source code is less secure and less customizable, but unfortunately we won’t be able to convince everyone of the merits of open source code any time soon. On the other hand, it is possible to decompile some of those programs whose source remains behind locked doors in an attempt to better understand that code, and one of the more impressive examples of that of late is this project which has fully decompiled The Ocarina of Time.
To get started with the code for this project, one simply needs to clone the Git repository and then use a certain set of software tools (depending on the user’s operating system) to compile the ROM from the source code. From there, though, the world is your rupee-filled jar. Like we’ve seen from other decompiled games, any number of enhancements to the original game can be made including increasing the frame rate, improving the graphics, or otherwise adding flourishes that wouldn’t otherwise be there.
The creators of this project do point out that this is still a work-in-progress as only one of the 18 versions have been completed, but the fact that the source code they have been able to decompile builds a fully-working game when recompiled speaks to how far along it’s come. We’ve seen similar processes used for other games before that also help to illustrate how much improvement is possible when re-writing old games from their source code.
Thanks to [Lazarus] for the tip!
Continue reading “The Legend Of Zelda: Decompiled”
The Zelda series of games are known for their exciting gameplay, compelling story, but also their soundtracks. From fast-paced boss battles, to scenes of emotional turmoil, these tunes have been pumped out millions of Nintendo consoles over the years. [Tyler Barnes] has been a fan for a long time, and decided to produce a compilation of some of these tracks – delivering it on cartridge, of course.
The music was created using the Music Macro Language, and encoded into the NSF format ready to play on the Nintendo Entertainment System. [Tyler] has coded a menu system that allows the user to pick which tracks they wish to listen to. There’s some pretty parallax animations as well, along with an easter egg for those who know the games well enough to unlock it.
[Tyler] hopes to burn a few EEPROMs and send out some custom carts, either using donor carts or fresh builds. If you’re a fan of NES music but need your C64 fix as well, there’s a solution for that too. Video after the break.
Continue reading “A Zelda Compilation Album On A Cartridge”
For many of us, being given a big old DIP ROM from nearly thirty years ago and being told to retrieve its contents would be a straightforward enough task. We’d simply do what we would have done in the 1980s, and hook up its address lines to a set of ports, pull its chip select line high, and harvest what came out of the data lines for each address.
But imagine for a minute that an old-fashioned parallel ROM is a component you aren’t familiar with, as [Brad Dettmer] did with the ROM from a SNES Zelda cartridge. We’ve seen plenty of reverse engineering stories with ancient computing gear as their subject, but perhaps it’s time to accept that some of the formerly ubiquitous devices are edging towards that sort of status.
So [Brad] takes us through the process of using the Saleae logic analyser to interrogate the chip while an Arduino stepped through its address lines, and the lesson is probably that while it seems like a sledgehammer to crack a nut it is important to factor in that unfamilarity. If you’d never worked with a 1980s ROM, it would make sense to use the tool you are familiar with, wouldn’t it?
Anyway, all’s well that ends well. While we’re on the subject of Nintendo ROMs, have a read about extracting the boot ROM from a cloned Game Boy.
It might not be enough to make you the Hero of Time, but this piece of Hylian interactive art would still be a worthy addition to your game room. [Jeremy Cook] writes in to tell us about how he put together this 8-bit style heart display, and goes into enough detail on the hardware and software sides of things that you shouldn’t have any problem adapting his design for your own purposes.
The build is pretty simple overall but it does assume you have a CNC to cut the basic shape out of MDF. You could cut the shape by hand if you had to, but if you don’t have a CNC the next best thing might be to 3D print the case. You’d potentially have to print it in two parts right down the center though, depending on how big your bed is. Whichever way you create the case, you’ll then need to cut the shape out of a piece of acrylic to make the face.
In any event, once the pieces are cut out [Jeremy] adds in a Wemos D1 Mini, a power supply, and some red LED strips. He provides a wiring diagram, but it’s fairly straightforward stuff. With a couple of 2N2222 transistors he controls the LED strips right from the digital pins of the ESP8266.
The software side is setup to be controlled via IFTTT by way of Adafruit.io. When IFTTT sees one of the keywords on Twitter, it passes a message to Adafruit.io which ultimately talks to the ESP8266 and gets the heart going. The software supports three states (on, off, and half) and gives a good example of a basic IoT implementation on the ESP8266 if you’re looking for some inspiration.
This hack seems like it would fit in perfectly with the Zelda home automation project we covered last year.
Voice recognition is this year’s model for home automation, but aside from feeling like you’re onboard the Aries 1b arguing with HAL 9000, it just doesn’t do it for our geeky selves. So what’s even geekier? How about carrying around an ocarina in your pocket so that you can get a Raspberry Pi to unlock the door for you? (YouTube video, embedded below.) Yeah, that’ll do.
[Sufficiently Advanced]’s video gets us 90% of the way toward replicating this build. There’s a tube with a microphone and a Raspberry Pi inside. There are a bunch of ESP8266-powered gadgets scattered around the house that take care of such things as turning on and off the heater, watering plants, and even pressing a (spare) car remote with a servo.
We’d love to know what pitch- or song-recognition software the Raspberry Pi is running. We’ve wanted to implement a whistling-based home automation interface since seeing the whistled. We can hold a tune just fine, but we don’t always start out on the same exact pitch, which is a degree of freedom that [Sufficiently Advanced]’s system doesn’t have to worry about, assuming it only responds to one ocarina.
If you’re questioning the security of locking and unlocking your actual apartment by playing “Zelda’s Lullaby” from outside your window, you either overestimate the common thief or you just don’t get the joke. The use case of calling (and hopefully finding) a cell phone is reason enough for us to carry a bulky ocarina around everywhere we go!
Continue reading “Zelda And The Ocarina Of Things”