Using An FPGA To Navigate China’s Railroads

If you’re headed over to mainland China as a tourist, it’s possible to get to most of the country by rail. China is huge though, about the same size as the United States and more than twice the size of the European Union. Traveling that much area isn’t particularly easy. There are over 300 train terminals in China, and finding the quickest route somewhere is not obvious at all. This is an engineering challenge waiting to be solve, and luckily some of the students at Cornell Engineering have taken a stab at efficiently navigating China’s rail system using an FPGA.

The FPGA runs an algorithm for finding the shortest route between two points, called Dijkstra’s algorithm. With so many nodes this can get cumbersome for a computer to calculate, but the parallel processing of a dedicated FPGA speeds up the process significantly. The FPGA also includes something called a “hard processor system“, or HPS. This is not a soft-core, but dedicated computing hardware in the form of an ARM Cortex-A9. Testing showed that utilizing both the HPS and the FPGA can speed up the computation by up to ten times over a microcontroller alone.

This project goes into extreme detail on the methodology and the background of the math and coding involved, and is definitely worth a read if you’re interested in FPGAs or traveling salesman-esque problems. FPGAs aren’t the only dedicated hardware you can use to solve these kinds of problems though, if you have a big enough backpack while you’re traveling around China you could also use a different kind of computer.

Continue reading “Using An FPGA To Navigate China’s Railroads”

Final Fantasy Exploit Teaches 32-bit Integer Math

One of the fun things about old video games, besides their obvious nostalgia, is that some of the more popular games have been pried apart and tinkered with for years, leading to a lot of new “development” within the games. This often uncovers some hidden gems that gamers might not have had any knowledge of during the game’s heyday, like this coding oddity found in Final Fantasy 7 that illustrates a lot about how 32-bit processors do math.

The original PlayStation used a 32-bit RISC processor, but the most significant bit could be used for integer signing. This means that if you have an integer that has a value of 2,147,483,647 (01111111111111111111111111111111 in binary) and you add one, the value is suddenly negative 2147483648 because the most significant digit is also an indicator of the integer’s sign. In this situation, the integer is said to “overflow”. In Final Fantasy 7, if you can somehow get a character to deal 262,144 damage in one hit (much less than two billion, due to the way the game does damage calculations), the game has a little bit of a meltdown.

[4-8Productions] had to do a lot of work to show how this glitch can be exploited in the game as well. Usually damage in this game is limited to 9,999 but under certain configurations (admittedly obtained by using other exploits and tools available for FF7 like a savegame editor) two of the characters can deal more damage than this critical value, exposing the 32-bit processor’s weak spot.

Even though integer signing is a pretty basic concept for most of us, the video is definitely worth a watch especially if you’re fans of the classic game. Of course, Final Fantasy 7 isn’t the only classic that has been exploited and reverse-engineered to the extreme. You can use a Super Mario World level to implement a calculator now, too.

Continue reading “Final Fantasy Exploit Teaches 32-bit Integer Math”

Adding Upgrades To A Stock Motorcycle

In today’s world of over-the-air firmware upgrades in everything from cars to phones to refrigerators, it’s common for manufacturers of various things to lock out features in software and force you to pay for the upgrades. Even if the hardware is the same across all the models, you can still be on the hook if you want to unlock anything extra. And, it seems as though Suzuki might be following this trend as well, as [Sebastian] found out when he opened up his 2011 Vstrom motorcycle.

The main feature that was lacking on this bike was a gear indicator. Even though all the hardware was available in the gearbox, and the ECU was able to know the current gear in use, there was no indicator on the gauge cluster. By using an Arduino paired with an OBD reading tool (even motorcycles make use of OBD these days), [Sebastian] was able to wire an LED ring into the gauge cluster to show the current gear while he’s riding.

The build is very professionally done and is so well blended into the gauge cluster that even we had a hard time spotting it at first. While this feature might require some additional lighting on the gauge cluster for Suzuki to be able to offer this feature, we have seen other “missing” features in devices that could be unlocked with a laughably small amount of effort.

Continue reading “Adding Upgrades To A Stock Motorcycle”

Doing One Thing, Well: The UNIX Philosophy

The Unix operating system has been around for decades, and it and its lookalikes (mainly Linux) are a critical part of the computing world. Apple’s operating system, macOS, is Unix-based, as are Solaris and BSD. Even if you’ve never directly used one of these operating systems, at least two-thirds of all websites are served by Unix or Unix-like software. And, if you’ve ever picked up a smart phone, chances are it was running either a Unix variant or the Linux-driven Android. The core reason that Unix has been so ubiquitous isn’t its accessibility, or cost, or user interface design, although these things helped. The root cause of its success is its design philosophy.

Good design is crucial for success. Whether that’s good design of a piece of software, infrastructure like a railroad or power grid, or even something relatively simple like a flag, without good design your project is essentially doomed. Although you might be able to build a workable one-off electronics project that’s a rat’s nest of wires, or a prototype of something that gets the job done but isn’t user-friendly or scalable, for a large-scale project a set of good design principles from the start is key.

Continue reading “Doing One Thing, Well: The UNIX Philosophy”

Unmanned Sailboat Traverses The North Atlantic

Sailboats have been traversing the Atlantic Ocean since before 1592, sailing through sunshine, wind, and rain. The one thing that they’ve all had in common has been a captain to pilot the ship across this vast watery expanse, at least until now. A company called Offshore Sensing has sailed an unmanned vessel all the way from Canada to Ireland.

The ship, called the Sailbuoy, attempted the journey last year as well but only made it about halfway before the mission was abandoned. This year, however, the voyage was finally completed, and this craft is officially the first unmanned ship to cross the Atlantic Ocean. The journey took about 80 days using sails and a small set of solar panels to drive the control electronics.

Using this technology, the company can investigate wave activity in specific areas of the ocean without having to send out a manned vessel to install a permanent buoy. The sailbuoy simply uses its autonomy to stay in a particular patch of ocean. There have been other missions that the sailbuoy has been tasked with as well, such as investigating the aftermath of the Deepwater Horizon oil spill in the Gulf of Mexico. With a reliable craft like this, it becomes much easier, safer, and less expensive to explore the ocean’s surface.

Thanks to [Andy] for the tip!

Retro Console Upgrade Gives Atari Flair

If you’re desperate for a sense of nostalgia for video games of yore but don’t want to shell out the big bucks for an NES classic, you can always grab a single arcade-style game that’ll plug straight into your TV. Of course it’s no longer 1980, and playing Space Invaders or Asteroids can get old after a while. When that happens, just replace the internals for an upgraded retro Atari 2600 with all the games from that system instead of just one.

As expected for something that has to fit in such a tiny package, this upgrade is based on a Raspberry Pi Zero. It’s not quite as simple as throwing RetroPi on it and calling it a day, though. For one, [Blue Okiris] is still using the original two-button controller/joystick that came with the Ms. Pac-Man game this build is based on, and that added its own set of challenges. For another, RetroPi didn’t have everything he needed so he switched to another OS called Recalbox. It also includes Kodi so it could be used as a media center as well.

The build looks like a hack in the truest sense of the word. The circuit board sticks out the bottom a little bit, but this is more of a feature than a bug because that’s where some extra buttons and the power switch are. Overall, it’s a great Retro Atari system that has all the true classics that should keep [Blue Okiris] entertained until Atari releases an official system one day. If you’d like to go a little deeper in the Atari world, though, you could always restore one instead.

Continue reading “Retro Console Upgrade Gives Atari Flair”

Power Steering Pump Repurposed For Great Speed

Electric bikes are getting a lot of attention lately. Pretty much anyone can buy a kit online and get a perfectly street legal ride with plenty of range. But if you don’t want to take the kit route, and you’d rather take a tack that will get you noticed more around these parts, take some notes from [Jule553648]’s recent build that definitely isn’t using any parts from a kit.

The motor from the build is an electric power steering pump from a junkyard car. This gets mounted on a one-off rear bike rack and drives the rear tire with help from some gears from a pocket bike gearbox from eBay. A lot of the parts in this build were designed and built using CAD and a machine shop, and the parts for the battery and the power controller were sourced via China to save on cost.

The whole build has a homemade vibe that we find irresistible. The bike can go 35 km/h on level ground without breaking a sweat and has about 40 km of range which is nothing to scoff at. It might even be street legal depending on the wattage of the motor and whether or not you live in Europe (where throttles are generally not allowed on electric bikes). If you’re lacking a machine shop, though, we featured a very well-built kit ebike a while back that you could use as a model to get your feet wet.

Continue reading “Power Steering Pump Repurposed For Great Speed”