Wed. Sep 28th, 2022

Gamers of a certain age probably remember being impressed by the fast, smooth scaling and rotation effects of the Super Nintendo’s much-discussed “Mode 7” graphics. Looking back, though, those gamers might also notice how thick and grainy those background transformations could look, especially when viewed on today’s high-end screens.

Emulation to the rescue. A mud at the handle DerKoun has released an “HD Mode 7” patch for the accuracy-focused SNES emulator bsnes. In their own words, the patch performs “Mode 7 transformations… at up to 4 times the horizontal and vertical resolution” of the original hardware.

The results, as you can see in the gallery above and the YouTube video below, are practically miraculous. Pieces of Mode 7 cards that were far off boxy smears of color are now sharp, straight lines with clear edges and recognizable features. It’s like watching a brand new game.

Perhaps the most impressive thing about these effects is that they take place on original SNES ROM and graphics files; DerKoun has said that “no artwork has changed” in the games, as the project was just a proof of concept a month ago. That sets this project apart from scaling up emulation efforts for the N64 and other retro consoles, which often require hand-drawn HD texture packs to make old art look good at higher resolutions.

How it works

Games that used the SNES “Graphics Mode 7” used wallpapers encoded in SNES memory as a 128×128 grid of 256-color, 8×8-pixel tiles. That created a 1024×1024 “map” that could be massively manipulated by basic linear algebra-affine transformations to quickly rotate, scale, shear and translate the entire screen. [Update: The original version of this story misstated the tileset and resolution for Mode 7 backgrounds. Ars regrets the error]†

Some Mode 7 games also took advantage of an additional HDMA (Horizontal-blanking Direct Memory Access) mode to fake a “3D” plane extending to the horizon. These games would essentially draw every horizontal scanline in a single SDTV frame at a different scale, making pieces lower in the image appear “closer” than those far away.

It’s a smart effect, but it can make the underlying map data look very grubby and blob-like, especially for parts of the map that are ‘far away’. This smearing is compounded by the matrix math implementation of the SNES, which uses trigonometric lookup tables and rounding to reduce the time it takes to run all that linear algebra on ’90s consumer hardware. to SNES-scale tiles and a 420p SD screen leads to some issues at the edges of objects, which can look lumpy and “off” by a pixel or two at certain points on the screen.

The HD Mode 7 mod solves this problem by using modern computer hardware to perform the matrix calculation “at the output resolution”, scaling up the original tiles before performing any transformations. This allows for more accurate underlying “subpixel” data, allowing the emulator to effectively use the HD display and fill in some of the spaces between those “boxy” upscaled pixels.

For those tilt-shifted HDMA Mode 7 games, the HD mod also eliminates “some limitations of the integer math used by the SNES… through more aggressive averaging,” DerKoun says. This removes those rounding errors from the actual SNES hardware, straightening out lines and positioning tilted background tiles more accurately.

Byuu, the lead coder of the bsnes project, say DerKoun’s HD Mode 7 mod will be integrated in the next major release of the emulator. Then the project will officially join the growing list of other emulation efforts that actually improve the performance of the original hardware, including WideNES, RetroArch’s LAGFIX latency throttling, and 4K upscaling for PS3 and Wii U games, just to name a few. to name.

List image by DerKoun / FrameCompare

By akfire1

Leave a Reply

Your email address will not be published.