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”

Print Physical Buttons For Your Touch Screen

Modern handheld gaming hardware is great. The units are ergonomic powerhouses, yet many of us do all our portable gaming on a painfully rectangular smartphone. Their primary method of interaction is the index finger or thumbs, not a D-pad and buttons. Shoulder triggers have only existed on a few phones. Bluetooth gaming pads are affordable but they are either bulky or you have to find another way to hold your phone. Detachable shoulder buttons are a perfect compromise since they can fit in a coin purse and they’re cheap because you can make your own.

[ASCAS] explains how his levers work to translate a physical lever press into a capacitive touch response. The basic premise is that the contact point is always touching the screen, but until you pull the lever, which is covered in aluminum tape, the screen won’t sense anything there. It’s pretty clever, and the whole kit can be built with consumables usually stocked in hardware stores and hacker basements and it should work on any capacitive touch screen.

Physical buttons and phones don’t have to be estranged and full-fledged keyswitches aren’t exempt. Or maybe many capacitive touch switches are your forte.

Continue reading “Print Physical Buttons For Your Touch Screen”

Threat Meter Gauges Risk Of Creeper-Assisted Suicide

If you’ve played even just a few minutes of Minecraft, you know what a creeper is. For those not familiar with the wildly popular sandbox game, a creeper is a monster that creeps along silently until it’s close to a player, whereupon it self-destructs by exploding. Sometimes it kills the player outright, and other times the explosion blows them into lava or off a cliff, or off a cliff and then into lava. Creepers have no friends.

But now there’s a way to avoid creeper attacks, or at least get a little heads up that these green nasties are lurking about. With [John Allwine]’s creeper detector, Minecraft players can get a real-world indicator of the current in-game creeper threat. The hardware end is simple enough — it’s just a SparkFun RedBoard and a small strip of Neopixels in a laser-cut plywood case. The LEDs lie behind a piece of etched acrylic to diffuse their glow — extra points for the creeper pattern in the lens. The detector talks over USB to a Minecraft mod that [John] wrote to interface the game with the real world. The closer a creeper gets to the player, the brighter the light. — and when it flashes, watch out. See it in action in the video below, if you can stomach watching someone dig straight down. Never dig straight down.

If interfacing the Minecraft world and the real world sounds familiar, maybe it’s because we featured [John]’s SerialCraft mod a while back and admired the potential for using Minecraft as a gateway for getting kids into hardware hacking. We agree that this is a great project to work on with kids, but we may just order the parts to do it for our own Minecraft world. Creeper hate isn’t just for kids.

Continue reading “Threat Meter Gauges Risk Of Creeper-Assisted Suicide”

Image from official site catan.com

How Provably Loaded Dice Lead To Unprovable Cheating

Here’s a really interesting writeup by [Mike] that has two parts. He shows that not only is it possible to load wooden dice by placing them in a dish of water, but that when using these dice to get an unfair advantage in Settlers of Catan, observation of dice rolls within the game is insufficient to prove that the cheating is taking place.

[Mike] first proves that his pair of loaded dice do indeed result in a higher chance of totals above seven being rolled. He then shows how this knowledge can be exploited by a Settlers of Catan player to gain an average 5-15 additional resource cards in a typical game by taking actions that target the skewed distribution of the loaded dice.

The second part highlights shortcomings and common misunderstandings in current statistical analysis. While it’s possible to prove that the loaded dice do have a skewed distribution by rolling them an arbitrary number of times, as [Mike] and his wife do, it is not possible to detect this cheating in a game. How’s that? There are simply not enough die rolls in a game of Settlers to provide enough significant data to prove that dice distribution is skewed.

Our staff of statistics Ph.D.s would claim that [Mike] overstates his claims about shorcomings in the classical hypothesis testing framework, but the point remains that it’s possible to pass through any given statistical testing process by making the effect just small enough. And we still think it’s neat that he can cheat at Settlers by soaking wooden dice in water overnight.

This isn’t the first time we’ve seen Settlers of Catan at the center of some creative work. There’s this deluxe, hand-crafted reboot, and don’t forget the electroshock-enabled version.

[via Reddit; images from official Catan site]

Friday Hack Chat: Hardware Games

For this week’s Hack Chat, we’re talking all about hardware games. What’s a hardware game? Anything where we use hardware, electronics, or code for user interaction. This is a vast, vast topic and there are a lot of tips and tricks that go into making a unified experience that’s both valuable and can stand up to the rigors of any crowd.

Our guest for this week’s Hack Chat will be [Phoenix Perry], lecturer, CS PhD researcher, game company owner, artist, programmer, game designer, and activist. For every human-computer computer interaction to teaching computer science, [Phoenix] has had her hand in it. She founded Code Liberation Foundation, which teaches women to program games for free. She’s a lecturer in Physical Computing at Goldsmiths, University of London, she’s given talks at Hackaday conferences, she’s created low-poly trees,

For this Hack Chat, we’re going to be talking about integrating hardware into gaming, or turning the idea for a game into a reality with hardware. We’ll be discussing game design, hardware design for games (need to make it idiot-proof, after all), building communities, and educating others.

As usual with Hack Chats, we’re taking questions from the audience. If you have a question that simply must be answered, here’s a discussion sheet. Fill that out, and we might get around to your question

join-hack-chatOur Hack Chats are live community events on the Hackaday.io Hack Chat group messaging. This Hack Chat will be going down noon, Pacific time on Friday, October 6th. Wondering why the Brits were the first to settle on a single time zone when the US had a more extensive rail network and the longitude so time zones made sense? Here’s a time zone converter! Use that to ponder the mysteries of the universe.

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.

Simulating Snakes And Ladders For Fun, Not Profit

A great many of you will remember the game of Snakes and Ladders from your youth. It’s a simple game, which one grows to realise involves absolutely no skill – it’s purely the luck of the dice. [Alex Laratro] noticed that without player decisions to effect the outcome, the game was thus a prime candidate for simulation. 

[Alex] wanted to dive into the question of “Who is winning a game of Snakes and Ladders?” at any given point in the gameplay. A common approach would be to state “whoever is in front”, but the ladders might have something to say about that. [Alex] uses Markov analysis to investigate, coming to some interesting conclusions about how the game works, and how this compares to the design of more complex games like Mario Kart and Power Grid.

Overall, it’s a breakdown of a popular game that’s simple enough to really sink your teeth into, but has some incredibly interesting conclusions that are well worth considering for anyone designing their own board games. We love seeing math applied to novel and fun problems – and it can solve important problems, too.

33C3: Works For Me

The Chaos Communication Congress (CCC) is the largest German hacker convention by a wide margin, and it’s now in its thirty-third year, hence 33C3. The Congress is a techno-utopian-anarchist-rave with a social conscience and a strong underpinning of straight-up hacking. In short, there’s something for everyone, and that’s partly because a CCC is like a hacker Rorschach test: everyone brings what they want to the CCC, figuratively and literally. Somehow the contributions of 12,000 people all hang together, more or less. The first “C” does stand for chaos, after all.

What brings these disparate types to Hamburg are the intersections in the Venn diagrams. Social activists who may actually be subject to state surveillance are just as interested in secure messaging as the paranoid security geek or the hardcore crypto nerd who’s just in it for the algorithms. Technology, and how we use it to communicate and organize society, is a pretty broad topic. Blinking lights also seem to be in the intersection. But on top of that, we are all geeks. There’s a lot of skill, smarts, and know-how here, and geeks like sharing, teaching, and showing off their crazy creations.

Continue reading “33C3: Works For Me”