from the harder-better-faster-stronger...sharper? dept.
Submitted via IRC for AzumaHazuki
HD emulation mod makes "Mode 7" SNES games look like new
Gamers of a certain age probably remember being wowed by the quick, smooth scaling and rotation effects of the Super Nintendo's much-ballyhooed "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 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.
[...] Games that made use of the SNES "Graphics Mode 7" used backgrounds that were coded in the SNES memory 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 to rotate, scale, shear, and translate the entire screen quickly.
Some Mode 7 games also made use of an additional HDMA mode (Horizontal-blanking Direct Memory Access) to fake a "3D" plane that stretches off into 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 ones far away.
It's a clever effect 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, which lets the emulator effectively use the HD display and fill in some of the spaces between those "boxy" scaled-up pixels.
Related Stories
Nintendo's recent lawsuit against Switch emulator maker Yuzu seems written like it was designed to strike fear into the heart of the entire emulation community. But despite legal arguments that sometimes cut at the very idea of emulation itself, members of the emulation development community I talked to didn't seem very worried about coming under a Yuzu-style legal threat from Nintendo or other console makers. Indeed, those developers told me they've long taken numerous precautions against that very outcome and said they feel they have good reasons to believe they can avoid Yuzu's fate.
[...]
"This lawsuit is not introducing any new element that people in the emulation community have not known of for a long time," said Parsifal, a hobbyist developer who has written emulators for the Apple II, Space Invaders, and the CHIP-8 virtual machine. "Emulation is fine as long as you don't infringe on copyright and trademarks."
[...]
And others feel operating internationally protects them from the worst of the DMCA and other US copyright laws. "I have written an NES emulator and I am working on a Game Boy emulator... anyway I'm not a US citizen and Nintendo can kiss my ass," said emulator developer ZJoyKiller, who didn't provide his specific country of residence.
[...]
Chief among those differences is the fact that Yuzu emulates a Switch console that is still actively selling millions of hardware and software units every year. Most current emulator development focuses on older, discontinued consoles that the developers I talked to seemed convinced were much less liable to draw legal fire.
Neural SuperSampling Is a Hardware Agnostic DLSS Alternative by Facebook
A new paper published by Facebook researchers just ahead of SIGGRAPH 2020 introduces neural supersampling, a machine learning-based upsampling approach not too dissimilar from NVIDIA's Deep Learning Super Sampling. However, neural supersampling does not require any proprietary hardware or software to run and its results are quite impressive as you can see in the example images, with researchers comparing them to the quality we've come to expect from DLSS.
Video examples on Facebook's blog post.
The researchers use some extremely low-fi upscales to make their point, but you could also imagine scaling from a resolution like 1080p straight to 8K. Upscaling could be combined with eye tracking and foveated rendering to reduce rendering times even further.
Also at UploadVR and VentureBeat.
Journal Reference:
Lei Xiao, Salah Nouri, Matt Chapman, Alexander Fix, Douglas Lanman, Anton Kaplanyan,Neural Supersampling for Real-time Rendering - Facebook Research, (DOI: https://research.fb.com/publications/neural-supersampling-for-real-time-rendering/)
Related: With Google's RAISR, Images Can be Up to 75% Smaller Without Losing Detail
Nvidia's Turing GPU Pricing and Performance "Poorly Received"
HD Emulation Mod Makes "Mode 7" SNES Games Look Like New
Neural Networks Upscale Film From 1896 to 4K, Make It Look Like It Was Shot on a Modern Smartphone
Apple Goes on an Acquisition Spree, Turns Attention to NextVR
(Score: 4, Insightful) by jmorris on Thursday April 18 2019, @05:25AM (6 children)
So this is basically like playing the same game with an upgraded video card. Nice use of modern overkill powered CPUs to make old games look better than they looked on the real hardware.
(Score: 2, Insightful) by Anonymous Coward on Thursday April 18 2019, @07:05AM (5 children)
Having grown up through that era, my mind has a hard time processing the fact that all that detail was already there, just clipped off by the bad math. As someone mentioned in the comments on Reddit, this is basically giving a bunch of games on the SNES an HD remaster for free.
(Score: 2) by Tara Li on Thursday April 18 2019, @09:29AM
Damned straight. Remember how crappy those overworlds were in the mid Final Fantasy series? I looked at some of the samples, and ... WHOA!
(Score: 2) by ledow on Thursday April 18 2019, @10:16AM (1 child)
It had to be - the SNES didn't have the memory to hold multiple mipmaps (multiple bitmaps of textures at various resolutions to save memory/processing when distant, but look good close-up) of everything.
So it had one high-res "texture" and just cherry-picked what it needed from it. It's not at all difficult to only take every second pixel, for example, when you're drawing it in the far distance. Cheap, easy to compute, only one copy of everything in memory, but looks good when you are made to scale it "close up". The Mode 7 had a primitive, quick, blocky-scaler which in this case has just been improved by using a completely different scaler. No different to when people use modern OpenGL to render Mario64 in an emulator and use the card's anti-aliasing etc. features to make it look better.
With modern hardware (and zsnes used to do something very similar), you just always choose to render from the full bitmap rather than skip parts, but it's not something the SNES could ever have done.
Modern games actually contain several copies of almost every texture in a variety of sizes for such purposes - even if they are created at texture-load time from a single hi-res source texture. They can afford not only to create them on the fly from the original, select and switch between multiple of them quickly, but also have them all loaded into memory at the same time. The SNES didn't have that luxury.
I'd be more surprised if the SNES didn't work from one single, fixed-in-memory (cartridges, remember!) texture/bitmap and then had a clever-trick of just skipping every other pixel and doing real-primitive scaling in between. We're talking about a 3.5Mhz machine here, with 128KBytes of RAM (plus a bit more for special purposes, etc.).
(Score: 0) by Anonymous Coward on Thursday April 18 2019, @10:41PM
Oh, I get that it was there on a technical level. I'm talking from the phenomenological perspective. I remember how low detail the graphics were, and that was (in some respects) made worse by the CRT televisions, which smeared and introduced other artifacts on its own.
Of course, there are also some examples where my memory looks more like the new "version" because my brain extrapolated the necessary detail, which is helped by the way CRTs softened images. In those cases, I can't understand how the graphics looked so bad!
(Score: 2) by takyon on Thursday April 18 2019, @05:55PM (1 child)
The Link to the Past and Dragon Quest III overworld maps look particularly better with this enhancement. Good job to the modder.
[SIG] 10/28/2017: Soylent Upgrade v14 [soylentnews.org]
(Score: 0) by Anonymous Coward on Thursday April 18 2019, @10:44PM
Makes me wonder what Castlevania IV and a couple later games look like. Some of the effects there were achieved by making the "background" part of the foreground and the object or whatever in question was really the mode 7 background that had transforms done to it.