Game Graphics: Rasterization

Last time, I talked about racing the beam, a type of graphics used when memory was scarce. Now it’s time to step into the future with more memory and talk about what modern 2D games still do to this day: rasterization.

Just in time Memory

Continuing the trend set by racing the beam, rasterized graphics are also on a grid, just a much tinier one. Though not unique to rasterized, the “frame buffer” is the logical conclusion of bitmap mode fidelity: enough memory is allocated so that every pixel can have its own color. What’s different about a frame buffer is that everything is drawn before it is shown and, crucially, this doesn’t have to happen in the same order as the pixels are displayed. Rasterization draws entire shapes — triangles, lines and rectangles — into the frame buffer and the screen is typically updated all at once. Continue reading “Game Graphics: Rasterization”

Photoshop image of the NES game Metroid on a Super Nintendo cartridge.

NES Classic Metroid Ported To Equally Classic Super Nintendo

There was a time early in the development of the Super Nintendo (SNES) where the new console was to feature backwards compatibility with NES games. The solution would have required a cumbersome cartridge adapter and a hard switch on every console to flip the CPU into 8-bit mode. Unfortunately, it was not meant to be — outside of the first public demo of the console, little evidence exists to suggest the gamers would have been able to supercharge their old NES carts on their Super Nintendo.

But thanks to the impressive port of Metroid to the SNES by [infidelity], we can imagine what such a capability might have been like. There’s more on offer here than reduced sprite flicker. There are additional frames of animation compared to the original, so now Samus’ arm cannon stays consistent rather than magically switching arms when turning around. A complete save game system from the Famicom Disk System version has also been implemented as well, with the traditional three slots. Although purists can still utilize the password system if they so choose.

Ultimately the most impressive inclusion of [infidelity]’s work is the MSU-1 enhancement chip implementation. Fun video intro sequences lead into the main menu where players can select the accompanying soundtrack. There’s the original 8-bit music remapped onto the SNES sound chip, the expanded 8-bit version from the Famicom Disk System, the reimagined sound of Metroid Zero Mission, or a full orchestral score. It really is the sort of situation where there are no wrong answers.

While you’re here, check out this post about bringing Poke’mon ROM hacks into physical cartridge form.

Continue reading “NES Classic Metroid Ported To Equally Classic Super Nintendo”

Reverse-Engineering The Stadia Controller Bluetooth Switching Procedure

Ever since the demise of Google’s Stadia game streaming service, the associated Stadia controllers have found themselves in limbo, with the only way to switch them from the proprietary WiFi mode to Bluetooth by connecting to a special Google website. Yet as [Gary] found out, all this website does is flash a firmware file via WebUSB and WebHID over the original Stadia firmware with a generic Bluetooth controller firmware image. This is the reason why it’s a one-way process, but this wasn’t to [Gary]’s liking, so he figured out how to flash the controller himself, with the option to flash the original Stadia firmware or something else on it later, too.

[Gary]’s stadiatool follows the same procedure as the Google Stadia website, just implemented in Python and outside the control of Google. Although Google has recently announced that it will keep the Bluetooth switching website online one year longer – until December 31st 2024 – at some point this service will go away and only projects like [Gary]’s together with squirreled away firmware images can still save any stray Stadia controllers that will inevitably discovered in the back of a warehouse in the future.

Although we reported on the demise of Stadia when it happened in January of 2023, as Ars Technica notes it was common in 2022 to buy into Stadia and get a controller manufactured in the 2019 launch year, suggesting massive overproduction.

1D LED PONG, Arduino-Style

Maybe it’s just us, but isn’t it kind of amazing that in a world of pretty darn realistic games, PONG is still thrilling to play? This 1D implementation by [newsonator] is about as exciting as it gets.

It works like you’d probably expect — the light moves back and forth between the two players. Keep it in the green and you have a nice, gentle volley going. Let it hit your red LED and you’ve lost a point. But if you can push your button while your yellow LED is lit, the light speeds up tremendously until the next button press in the green.

Our only wish is that subsequent yellow-light button presses would make it speed up even more. But there are really just the two speeds with the current programming.

Inside the cool laser-cut box is an Arduino Uno and a 9V battery, plus a current-limiting resistor and the all-important buzzer. We like how [newsonator] wired up the LEDs to the Arduino by soldering them to a row of header pins and sticking that into the Arduino so it can be used in other projects down the line. We also like how [newsonator] shoved a couple of dowels through the box to ultimately support the two buttons.

Check out the intro video after the break for the overall details. The build is done over a few different short videos which follow.

Although this is pretty small, it isn’t quite the minimum viable.

Continue reading “1D LED PONG, Arduino-Style”

Hilarious Security Flaw In Counter Strike 2 Is Now Patched

Normally, when we talk about video games having bugs, it’s some kind of item duplication glitch or a hilarious failure in the jacket equip code of some tedious first-person-shooter online wardrobe simulator. Counter-Strike 2 has had a more embarrassing faux-pas, however, with a security hole allowing bad actors to theoretically capture the IPs of their fellow players in a server. You won’t believe how this came to happen.

The exploit has already been making its way around the forums, with one [Crouch9706] raising the alarm. It’s all down to the way Counter-Strike 2 renders the names that players have entered in their Steam gaming profiles. In certain menus and other parts of the UI, the game will actually parse HTML in a player’s name. Typically, the way to trigger it is to join a game and vote to kick yourself. This brings up a dialog for other players that shows them your player name and parses the HTML. The only limitation is you only get 32 characters for your HTML.

There’s a nifty little extra trick to this, though, in that you can use this technique to snag another player’s IP. By putting in HTML that links to your own server, you can log any player IPs that connect to the server seeking an image, for example.

Of course, it’s not the biggest risk, with many players being behind ISPs that use CGNAT, making the harvested IPs rather useless. However, this sort of unexpected code injection is really not acceptable from a security standpoint. At the very least, it has the potential to expose players to nasty imagery.

Word on the street (Nitter) is that the exploit has now been patched. Meanwhile, if you’re working on a game that for some mad reason, executes code based on player names or any other such data, consider patching your work ASAP. If you find similar exploits in the wild, don’t hesitate to hit up our tipsline—and notify the developers, too!

Fail Of The Week: [Mark] Makes An Atari Cartridge

Part of the magic of the movies is that the actors always know what will happen next. There never has to be a scene where James Bond orders wine, and the sommelier has to correct his pronunciation, or he miscounts his hand at baccarat. Real life is rarely as smooth. Of course, YouTube is more akin to a movie than real life, and we always wonder how many flawlessly executed projects you see on YouTube really went that well. [Mark Fixes Stuff] left no scenes on the cutting room floor, though, in his realistic portrayal of his quest to build a nice-looking Atairi 2600 cartridge. Watch it below.

Spoiler alert: In the end, it all worked out. But getting there was a series of misadventures. Starting out with [Parker Dillman’s] PCB, he put together the insides of the cartridge, including a socket for the EPROM. He then resin-printed a case. Like many of our own projects, the first run wasn’t quite the size he expected. It was probably close enough, though, but then he realized the socket made the board too tall to fit in the enclosure.

Continue reading “Fail Of The Week: [Mark] Makes An Atari Cartridge”

Operate Your Own Nuclear Reactor, Virtually

If you’ve ever wanted to operate your own nuclear reactor, you probably aren’t going to get one in your backyard shop. However, thanks to the University of Manchester, you can get a simulated one in your browser. The pressurized water reactor looks realistic and gives you controls that — we are fairly sure — are greatly simplified compared to the real thing.

We suggest you start with the tour before you start unless, you know, you’ve operated a reactor before. You have to balance the control rods, the coolant pumping, and the steam output to produce as much power as possible without melting the core.

If the reactor were real, the pressure vessel would weigh as much as two 747 jets! Despite the high-tech, the business end is a conventional steam generator. The only difference is that the steam is made by the heat of the nuclear reaction instead of by burning coal or gas.

To operate the reactor, you’ll turn on the coolant pumps and wait for the high-pressure liquid to reach 290 C. In real life, this takes about 8 hours, but lucky for us, the simulation is sped up. Once you reach the right temperature, you can lift the control rods to start generating heat. This will let you adjust the steam output to try to match the demand at any given time. But if you go out of bounds, the reactor will helpfully shut down. Of course, that doesn’t help your score.

We don’t know how realistic it is, but we do know Homer Simpson probably has fewer shutdowns than we do. There are different types of reactors, of course. Operating them may be difficult, but creating fuel for them is no simple task, either. Just maybe put out your candles before you start playing.