The FPGA Chronicles: Exploring The Tang Nano 20K

FPGAs used to be mysterious, expensive devices, but these days you can buy surprisingly capable boards for very little money. Some years ago, I did an FPGA Bootcamp over on Hackaday.io. Much of that material still applies, but the hardware is dated. So I decided it was time to update it, using the inexpensive Tang Nano 20K and its GOWIN GW2AR-18 FPGA as the main platform, with perhaps a few excursions into other FPGAs.

History and Motivation

Once upon a time, if you wanted to have a custom IC, you went with a wheelbarrow full of money to a semiconductor company. However, some smart person at a semiconductor fab eventually realized they could make a chip with a lot of uncommitted blocks on it and then, for a custom chip, only design the wiring that connected them together. This still required a wheelbarrow full of money, but it was a smaller wheelbarrow.

Then one day, someone realized they could do the same thing but make the electrical connections between the blocks configurable. Maybe have fuses you can blow, or use EEPROM or RAM cells to remember which blocks are connected to which. It is complicated, sure, but then you can make many of these chips and sell them to people who could, in theory, make their own custom chips without your help.

When do you need an FPGA? A classic classroom exercise for an FPGA, for example, is a traffic light because it shows off how to do state machines, which are important for some kinds of FPGA designs. But other than as a learning example, why would you do this? Even a simple 8-bit CPU can handle a traffic light.

Suppose instead that you have hundreds of digital sensors on a rocket, and any one of them must raise an alarm within a few microseconds. A processor has to sample inputs in groups, service interrupts, or rely on extra hardware. An FPGA can simply implement the equivalent of one enormous OR gate. It watches every input continuously, and unrelated logic elsewhere in the FPGA does not steal execution time from it. Can you do it with a microcontroller? Probably, but not easily. For some classes of problems, an FPGA is the better answer.

Of course, you can also build a CPU on your FPGA and some FPGAs have CPUs in the same package. This is often a sweet spot because then things that are easy to do in software, you do in software. Things that are easier to do in hardware, you do in the FPGA.

Continue reading “The FPGA Chronicles: Exploring The Tang Nano 20K” →

Using The SNES Super FX Chip To Run Super Mario 64

Although the Nintendo 64 was the first to bring real 3D graphics to the table in 1996, the Super Nintendo had an ace up its sleeve in the form of the Super FX chip. One major advantage of using cartridge-based games is that you have the option to add wild features such as a 3D graphics chip to your SNES, something that got used to make games like Star Fox, and as [Tobi] demonstrates in a recent video, can also totally run Super Mario 64 if you squint a lot.

While there’s a rumor that Nintendo was looking to release a ‘Super Mario FX’ game for the SNES, there’s no evidence for such a project. Fortunately these days we got hobbyists prepared to give it a shake to see what a determined group of SNES game developers could have accomplished back then.

The pleasant surprise here is that although a new engine was needed, the SM64 assets could be used with this ‘SMFX’ game and it runs fairly well. There is still room for performance improvement, and the 2 MB memory limit is a problem that may require some culling of parts of levels.

Frames are painted back to front since there’s no advanced Z-culling or similar features, but it shows just how capable the Super FX chip is. [Tobi] has said that he’ll look at releasing the project in some form once he’s happy with how it works and runs, which is definitely something that we’ll look forward to.

Continue reading “Using The SNES Super FX Chip To Run Super Mario 64“ →

An IR Blaster Project, In A Nutshell

The speed that computers have gotten smaller is a bit mind-bending. Most of us now walk around with computers in our pockets that would have rivaled the supercomputers from a few decades ago. And, although it seems like the speed at which things are getting smaller and faster has slowed a bit compared to the rapid pace of the 90s and 00s, some truly minuscule computers are accessible nowadays. So much so that it’s possible to do useful computing inside a walnut shell.

The first step in this build is to crack into a walnut. Most have a natural seam that separates two hemispheres, so splitting it open, enjoying a small snack, and then adding some small neodymium magnets on the inside of that seam to close up the shell is not too difficult. From there, some LEDs were installed at various points in the shell, with an ESP32-C3 installed in the middle to control everything and oriented so that its USB port is still accessible.

Although putting a small microcontroller in a nutshell might seem like a novelty, [JSK-koubou] is actually using the LEDs to perform a useful task. The walnut sits in his living room and connects to a home automation system through the ESP32, and when it receives a command it uses the LEDs to send infrared signals to non-connected devices. Hiding projects in unexpected places is a fun pastime, like this Meshtastic node hidden in a landscape light.

Continue reading “An IR Blaster Project, In A Nutshell” →

Hackaday Links Column Banner

Hackaday Links: September 27, 2026

It isn’t quite hailing frequencies open, but researchers from Harvard claim they’ve picked up a radio signal directly from a nearby exoplanet. Before you get too excited, planets in our solar system also emit RF, so no one credible is claiming these are extraterrestrial reruns of their version of I Love Lucy, but it is the first time they’ve localized a radio signal to an exoplanet, in this case, Beta Pictoris B.

Speaking of space, the asteroid formerly known as 1981 EC26 is now sporting a new moniker: (14331) Alyankovic. If you think that sounds like (Weird) Al Yankovic, you aren’t wrong. The Tucson Star reports that, thanks to the efforts of several planetary scientists who are also Weird Al fans, the International Astronomical Union made the name official. Apparently, another asteroid now bears a name in honor of Weird Al’s predecessor, Tom Lehrer.

The postmarketOS — er — Nura logo.

If you follow open mobile phone software, you probably know the name postmarketOS, a Linux distribution based on Alpine aimed at mobile phones and tablets. Well, now you can forget it. The project announced a name change, so we’re now talking about Nura. Why Nura? According to the team, it is a shortened form of Nuraghe, some granite structures in Sardinia that are over 5,000 years old. The FAQ mentions that postmarketOS was hard to remember. We aren’t sure Nura is that much more memorable. Perhaps they should have pivoted to Phonz OS.

Continue reading “Hackaday Links: September 27, 2026” →

Center-Pivot System Modified To Mow Lawn

When flying over the United States, Australia, and a few other vast and relatively empty parts of the world, strange circular formations can be spotted. These are typically center-pivot irrigation systems, an effective way to irrigate crops if efficient use of space is not too big of a priority. Keeping these massive machines in a straight line is an interesting engineering problem, though, and [rctestflight] built a miniature version of his that works on the same principle but mows his lawn instead.

These systems work as semi-independent sections that are flexibly coupled at either end. The control scheme initially used here was to drive the outermost set of wheels at a constant speed, and then use limit switches at each coupling inside of that to drive inner sets of wheels once the outer set passes a setpoint. Eventually a potentiometer-based proportional controller was installed in place of the limit switches. With some other drivetrain issues sorted out it was on to building the mower attachment. This uses a pair of pivoting precision knives mounted to motors that ride along a carriage attached to any one of the linkages of the center-pivot system. Limit switches keep the carriage riding back and forth cutting the lawn as it traverses the grass.

With the system in place, [rctestflight] set out to optimize it mostly out of a desire to tinker with a thing that he had built. The challenge for him is that his location in the Pacific Northwest is generally very damp, so in addition to corrosion and other water damage on various parts, there were also issues of mud complicating the way the wheels navigated the terrain, as well as the plant growth being fairly rapid and often impeding the process of the robot as well. One of the perks, though, was that the circular area was already largely carved out thanks to some of his earlier projects testing the durability of RC cars.

Continue reading “Center-Pivot System Modified To Mow Lawn” →

Going On A Tangent With The Intel 8087’s Hybrid CORDIC Algorithm

Continuing their reverse-engineering of Intel’s 8087 FPU, [Ken Shirriff] and friends took a look at one of the trigonometric functions, specifically FPTAN.  The most exciting part with such reverse-engineering is probably figuring out which algorithm was used in the implementation, while trying to determine the reasoning behind the final hardware design.

If you’re running a simple MCU or MPU like the 6502 or Z80 without hardware functions you’d likely use an algorithm such as CORDIC or similar, as this requires only basic hardware features like addition, subtraction, bitshift, and look-up tables. One can also use polynomial approximation if there’s hardware support for a potential speed-up, or as is the case in the 8087, create a hybrid approach that targets speed and accuracy.

In the article the exact implementation to get to 64 bits of accuracy is detailed, starting with the 16 bits calculated using CORDIC before switching to the Padé approximant technique involving the ratio of two polynomials. Since after calculating the brunt of the final value with CORDIC the remainder is a fairly small value, this polynomial approximation is not just very accurate but also fast.

This approach allows the FPTAN and similar trigonometric functions in this FPU to hit a very high level of accuracy and not require the look-up table sizes and additional time required to work through the remaining bits with CORDIC. For those who want to see the full algorithm Intel’s engineers used, [Ken] has the full microcode listing with comments in the article as well.

As for the exact speed-up from this approach, [Ken] calculates for one value that FPTAN would spend 33% on CORDIC pseudo-division, 47% on CORDIC pseudo-multiplication and a mere 15% on the polynomial approximation along with about 5% overhead.

With the Pentium series of CPUs Intel moved completely away from CORDIC, as it’s clear that as accurate as it may be, it’s hard to scale to a significant number of bits without incurring significant time penalties. With the introduction of SIMD instructions the x87 ISA has further seen its functionality reduced, but this analysis shows once again why the 8087 made such an impact when it was released.

A digital map is shown with a series of red waypoints making a roughly C-shaped curve. A smaller group of green waypoints stays stationary near one of the corners of the map.

Defeating Satellite Spoofing With Galileo’s Encryption

Considering how important it is for everything from navigation to keeping clocks in sync, satellite navigation systems are surprisingly vulnerable to a variety of attacks, ranging from simple jamming to more sophisticated spoofing attacks. This may be changing, though, as Galileo, Europe’s GNSS, recently demonstrated its first cryptographically-secured position fix under spoofing conditions.

Most GNSS systems, including GPS, have no verification measures to keep an adversary from transmitting a false signal at a higher power and hijacking a receiver; since GNSS signals are extremely weak by the time they reach the ground, this presents no great difficulty to a moderately well-equipped attacker.

Galileo’s Signal Authentication System (SAS) aims to fix this. The Galileo ground station pre-selects signal spreading codes, which it then encrypts with a regularly-changing secret key and publishes. A receiver which anticipates needing a verified signal can then download these encrypted codes ahead of time and store them. Galileo satellites then transmit on the E6-C pilot signal, and the receiver records the signal. After transmitting a message block, it then transmits the decryption key on a separate signal, which the receiver uses to recover the spreading codes. The receiver then correlates these spreading codes with the recorded signal to find the satellite’s pseudorange.

It’s a rather complicated system, but it works: earlier this month in Andøya, Norway, the annual Jammertest GNSS testing event took place. For one week, a wide range of organizations tested the resilience of their GNSS systems against various attacks, including jamming, delayed retransmission, and spoofing. Using five Galileo satellites, the European Space Agency was able to obtain a stable lock on their receiver even during spoofing.

In principle, this method could be extended to other GNSS systems. There’s certainly motivation to do so; very large-scale attacks have been demonstrated recently.