Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 17 submissions in the queue.

Submission Preview

Link to Story

HD Emulation Mod Makes “Mode 7” SNES Games Look Like New

Accepted submission by upstart at 2019-04-17 22:16:55
/dev/random

████ This is a bot sub and needs many editing, ████

Submitted via IRC for AzumaHazuki

HD emulation mod makes “Mode 7” SNES games look like new [arstechnica.com]

Mode 7.5 — HD emulation mod makes “Mode 7” SNES games look like new Bsnes addition cleans up matrix math, rounding errors on original SNES hardware.

Kyle Orland [arstechnica.com] -

Gamers of a certain age probably remember being wowed by the quick, smooth scaling and rotation effects of the Super Nintendo's much-ballyhooed [youtube.com] "Mode 7" graphics. Looking back, though, those gamers might also notice how chunky and pixelated those background transformations could end up looking, especially when viewed on today's high-end screens.

Emulation to the rescue. A modder going by the handle DerKoun has released an "HD Mode 7" patch [reddit.com] for the accuracy-focused SNES emulator bsnes [arstechnica.com]. 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 above gallery and the below YouTube video, are practically miraculous. Pieces of Mode 7 maps that used to be boxy smears of color far in the distance are now sharp, straight lines with distinct borders and distinguishable features. It's like looking at 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 been modified" in the games since the project was just a proof of concept a month ago [reddit.com]. That makes this project different from upscaling emulation efforts for the N64 and other retro consoles, which often require hand-drawn HD texture packs [arstechnica.com] to make old art look good at higher resolutions.

How it works

Games that made use of the SNES "Graphics Mode 7" used backgrounds that were coded in the SNES memory [superfamicom.org] as a 128x128 grid of 256-color, 8x8 pixel tiles. That made for a 1024×1024 "map" that could be manipulated en masse by basic linear algebra affine transforms [mathworks.com] to rotate, scale, shear, and translate [youtube.com] the entire screen quickly [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 made use of an additional HDMA mode [superfamicom.org] (Horizontal-blanking Direct Memory Access) to fake a "3D" plane that stretches off into the horizon. These games would essentially draw every horizontal scanline [wikipedia.org] in a single SDTV frame at a different scale, making pieces lower in the image appear "closer" than ones far away.

It's a clever effect [youtube.com] but one that can make the underlying map data look especially smeary and blob-like, especially for parts of the map that are "far away." This smearing is exacerbated by the SNES' matrix math implementation, which uses trigonometric lookup tables and rounding to cut down on the time needed to perform all that linear algebra on '90s-era consumer hardware. Translating those transformation results back to SNES-scale tiles and a 420p SD screen leads to some problems on 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 fixes this problem by making use of modern computer hardware to perform its matrix math "at the output resolution," upscaling the original tiles before any transformations are done. This provides more accurate underlying "sub-pixel" data [resetera.com], which lets the emulator effectively use the HD display and fill in some of the spaces between those "boxy" scaled-up pixels.

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

Byuu, the lead coder on the bsnes project, says [twitter.com] DerKoun's HD Mode 7 mod will be integrated into the next major release of the emulator. Then the project will officially join the growing list of other emulation efforts that actually improve on the performance of the original hardware, including WideNES [arstechnica.com], RetroArch's LAGFIX [arstechnica.com] latency mitigation and 4K upscaling for PS3 [arstechnica.com] and Wii U games [arstechnica.com], to name just a few.

Listing image by DerKoun / FrameCompare [framecompare.com]

from the harder-better-faster-stronger...sharper? dept.


Original Submission