Teensy Script Plays Nintendo Switch, Strikes Out

The most recent of the Zelda franchise, Breath of the Wild, is known for its many, many puzzles.  One of the more frustrating ones involved bowling with a giant snowball at the top of a hillside.  [Bertrand] did not like this, so he cheated the system hacked the Nintendo Switch so that he “genuinely earned” a strike every time he played.  He achieved this by writing a script for a Teensy module that got him those sweet rupees.

The Teensy houses an Atmel 90USB1286 microcontroller.  When paired with LUFA software, it can emulate numerous controllers including keyboards, joysticks, etc.  It also handily has a Mini-B USB connector located on its rear, allowing it to communicate to the Switch with ease.  After confirming the hardware was compatible, [Bertrand] looked towards the software side noticing the similarity between what already existed and what he was attempting to accomplish.  He happened upon this in a Splatoon 2 fork that allows players to draw posts. 

In essence, it takes image files as input and emulates the controls and buttons to draw a 1-bit version of the image automatically.  This takes care of syncing the hardware as well as how to simulate the button presses.  But instead of reading an image file, it needed to take a custom script as the input.  This required starting from scratch.  The first logical step — of course — was to create a language similar to Logo, a name that surely brings back memories of the time of big hair and shoulder pads.  He only needed a handful of simple commands to control Link:

typedef enum {
	UP,
	DOWN,
	LEFT,
	RIGHT,
	X,
	Y,
	A,
	B,
	L,
	R,
	THROW,
	NOTHING,
	TRIGGERS
} Buttons_t;

Continue reading “Teensy Script Plays Nintendo Switch, Strikes Out”

FPGA Metastability Solutions

Gisselquist Technology recently posted a good blog article about metastability and common solutions. If you are trying to learn FPGAs, you’ll want to read it. If you know a lot about FPGAs already, you might still pick up some interesting tidbits in the post.

Don’t let the word metastability scare you. It is just a fancy way of saying that a flip flop can go crazy if the inputs are not stable for a certain amount of time before the clock edge and remain stable for a certain amount of time after the clock edge. These times are the setup and hold times, respectively.

Normally, your design tool will warn you about possible problems if you are using a single clock. However, any time your design generates a signal with one clock and then uses it somewhere with another clock, metastability is a possible problem. Even if you only have one clock, any inputs from the outside world that don’t reference your clock — or, perhaps, any clock at all — introduce the possibility of metastability. Continue reading “FPGA Metastability Solutions”

Imperial Rocker For Stopping Tiny Rebel Scum

Some of the luckiest kids in the world have to be the ones with hackers and makers as parents. While normal kids are stuck playing with cookie cutter mass produced toys, these kids get one-off gadgets and creations that will be the envy of the playground. Frankly, some of the stuff ends up being so cool that it’ll get the adults wishing they could go back in time and play with it.

One such parent, and one such project, is the Imperial Rocker by [Matthew Regonini]. Hoping to instill an obsession with a galaxy far, far, away on his offspring, [Matthew] designed this AT-AT rocking horse piece by piece in Illustrator, and then cut it all out of birch using his XCarve CNC router. Each piece was then meticulously glued together to produce a final 3D effect from the individual cutouts.

With a liberal application of spring clamps to hold it all together while it dried, all that was left to do was painstakingly sand all the parts so the edges of the laminated construction would be smooth. Dowels were then added for the handlebars and foot pegs, and a few coats of polyurethane seal up the plywood while bringing out a natural look.

[Matthew] notes some issues here and there, notably quite a bit of blowout in some of the detail cuts and a couple miscalculated dimensions. But he reasons that the rocker is going to live a pretty hard life anyway, so best not to sweat the small stuff.

While the Imperial Rocker has that quaint old-school charm, we wonder how long it will be before [Matthew’s] little Stormtrooper starts yearning for the blinking lights and buttons that youngsters just can’t get enough of.

Continue reading “Imperial Rocker For Stopping Tiny Rebel Scum”

DUHK: Don’t Use Hard-Coded Keys

The title reads like the name of a lecture in cryptography 101 or the first rule of Crypto Club. ‘DUHK‘ is in fact neither of those but the name of a recently disclosed vulnerability in a pseudorandom number generating algorithm (PNRG) that was until recently part of the federal standard X9.31.

Random numbers are essential to viable cryptography. They are also hard to obtain leading to solutions like using the physical properties of semiconductors or decaying matter, that are governed by quantum effects. The next best solution is to log events that are hard to predict like the timing of strokes on a keyboard. The weakest source of randomness is math, which makes sense, because one of maths most popular features is its predictability. Mathematical solutions have the one redeeming quality of being able to produce a lot of numbers that look random to a human in a short time.

PNRGs require a starting point from which they begin to produce their output. Once this seed is known the produced sequence becomes predictable.

The X9.31 PNRG is an algorithm that is used in various cryptographic algorithms and has been certified in the Federal Information Processing Standards for decades until it was dropped from the list of approved standards in 2016. The researchers behind DUHK found out that the standard allowed the seed to be stored in the source code of its implementation. The next step was to look for software that did this and they found X9.31 in an older version of FortiOS running on VPN gateways.

Should I be Worried?

Probably, maybe not. The analysis (PDF) published by the team behind DUHK notes that the vulnerability is limited to legacy implementations and doesn’t allow to takeover the device running them, only to eavesdrop on ‘secure’ connections. The scope of this is much more limited than exploits like remote code execution via bluetooth. It is on the other hand providing a strong case for handling standards and technical certifications with extreme scrutiny. The teams conduct also gives insight into the best practises for white-hat hacking which are frequently discussed around here. And they have a great theme song.

Hackaday Prize Entry: CNC Mill Lets Kids Engrave on the Fly

The manufacturing revolution has already begun, and there are 3D printers, CNC machines, and laser cutters popping up in garages and workspaces all around the world. The trouble with these machines is that they’re fiddly to use, and you don’t want a kid playing around with them.

[moritz.messerschmidt]’s Hackaday Prize entry is a desktop Badgemaker that engraves acrylic name badges for kids. Under the hood, an Arduino with a custom-built shield with 3 SilentStepStick stepper drivers on it operates the three NEMA-11 motors. Meanwhile, the kids interact with a 7” touchscreen powered by a Raspberry Pi.

Once the kid selects what to engrave, motors move the piece of acrylic against a rotary tool’s milling bit, carving the acrylic as instructed. These cards are then equipped with watch batteries and LEDs to light up.

The touch screen is key. Bummed out by basic CNC machines that were difficult to use — like hobbyist 3D printers with a newbie-befuddling interface — [moritz.messerschmidt] went out of his way to make the interface kid-friendly, with just a simple set of choices necessary for creating one’s own name badge.

Is this a feature-packed CNC machine with all the bells and whistles? No, but that’s not the point. The purpose of the Badgemaker is to introduce a new generation to personal fabrication technology. It’s a toy, but that’s the point: a CNC machine that’s so easy to use, even a child can do it.

Hyperspectral Imaging – Seeing the Unseeable

They say that a picture is worth a thousand words. But what is a picture exactly? One definition would be a perfect reflection of what we see, like one taken with a basic camera. Our view of the natural world is constrained to a bandwidth of 400 to 700 nanometers within the electromagnetic spectrum, so our cameras produce images within this same bandwidth.

Image via Cosmos Magazine.

For example, if I take a picture of a yellow flower with my phone, the image will look just about how I saw it with my own eyes. But what if we could see the flower from a different part of the electromagnetic spectrum? What if we could see less than 400 nm or greater than 700 nm? A bee, like many other insects, can see in the ultraviolet part of the spectrum which occupies the area below 400 nm. This “yellow” flower looks drastically different to us versus a bee.

In this article, we’re going to explore how images can be produced to show spectral information outside of our limited visual capacity, and take a look at the multi-spectral cameras used to make them.  We’ll find that while it may be true that an image is worth a thousand words, it is also true that an image taken with a hyperspectral camera can be worth hundreds of thousands, if not millions, of useful data points. Continue reading “Hyperspectral Imaging – Seeing the Unseeable”

Friday Hack Chat: DMX512 Gon’ Give It To Ya

DMX512 is the standard for theatrical lighting, and it’s best described as, ‘MIDI for lights’. It’s been around since the 80s, and in the decades since it’s been used, abused, and shoved into just about everything imaginable.

For this week’s Hack Chat, we’re talking all about DMX512. What is DMX512? How does it work? What can you control with DMX512? What Open Source projects use it? There’s a wealth of information out there, and a lot of very cool tricks you can pull with this ubiquitous lighting protocol.

Our guest for this week’s Hack Chat is [Martin Searancke], owner of Dream Solutions Ltd. [Martin] was contacted early on in the development of Coca-Cola’s impressive 3D Times Square advertisement to see if Dream Solution’s LightFactory software could be used to drive this 3D screen. This software has pixel mapping and media playback capabilities and was used for the prototypes for the project. A subset of this product made it into the final installation, and is now driving a gargantuan display above Times Square in New York City.

This is a community Hack Chat, and of course we’re taking questions from the community. If you have a question you’d like to ask [Martin], add it to the discussion sheet.

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. Our Hack Chats usually take place at noon, Pacific time on Friday, but this week is different. [Martin] is in New Zealand, so this Hack Chat is happening at 2pm Pacific, Friday, October 27th. Is that too hard for you? Here’s a time zone converter!

Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io.

You don’t have to wait until Friday; join whenever you want and you can see what the community is talking about.

We’re also looking for new Hack Chat hosts! If you’ve built something cool, you’re working on an interesting project, or you’re about to introduce a really cool product, hit us up! Email our wonderful community managers, and we’ll see if we can slot you in.