Mode 7
≈ 6 min read
Names in other languages
- DeutschMode 7
- EnglishMode 7
- EspañolModo 7
- fiMode 7
- FrançaisMode 7
- NederlandsMode 7
- PolskiMode 7
- العربيةمود 7
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
demo uses Mode 7 for a faux 3D perspective view. Mode 7 is a graphics mode on the Super Nintendo Entertainment System (Super NES) video game console that allows a background layer to be rotated and scaled, which may be done on a scanline-by-scanline basis to create many different depth effects. It also supports wrapping effects such as translation and reflection. The most famous of these effects is the application of a perspective effect (Figure 1) on a background layer by adjusting the layer's scale each scanline. This transforms the background layer into a two-dimensional (2D) horizontal texture-mapped plane that trades height for depth, achieving an impression of three-dimensional (3D) graphics. Mode 7 was one of Nintendo's prominent selling points for the Super NES platform in publications such as Nintendo Power and Super NES Player's Guide. Similar faux 3D techniques have been presented on a few 2D systems other than the Super NES, in select peripherals and games.
demo uses Mode 7 for a faux 3D perspective view. Mode 7 is a graphics mode on the Super Nintendo Entertainment System (Super NES) video game console that allows a background layer to be rotated and scaled, which may be done on a scanline-by-scanline basis to create many different depth effects. It also supports wrapping effects such as translation and reflection. The most famous of these effects is the application of a perspective effect (Figure 1) on a background layer by adjusting the layer's scale each scanline. This transforms the background layer into a two-dimensional (2D) horizontal texture-mapped plane that trades height for depth, achieving an impression of three-dimensional (3D) graphics. Mode 7 was one of Nintendo's prominent selling points for the Super NES platform in publications such as Nintendo Power and Super NES Player's Guide. Similar faux 3D techniques have been presented on a few 2D systems other than the Super NES, in select peripherals and games.
Overview
The Super NES console has eight graphics modes, numbered from 0 to 7, for displaying background layers. The last one ("BG Mode-7") has a single layer that can be scaled and rotated. 2D affine transformations can produce any combination of translation, scaling, reflection, rotation, and shearing. However, many games create additional effects by setting a different transformation matrix for each scanline. In this way, pseudo-perspective, curved surface, and distortion effects can be achieved. Mode 7 graphics are generated for each pixel by mapping screen coordinates x and y (which together form the vector \mathbf{r} ) to background layer coordinates x^\prime and y^\prime (the vector \mathbf{r}^\prime ) using an affine transformation and sampling the corresponding background color at \mathbf{r}^\prime without interpolation. The 2D affine transformation is specified for each scanline by 6 parameters: a , b , c , and d (which together define the matrix \mathbf{M} ), and x_0 and y_0 (which define the origin vector \mathbf{r}_0 ). The following matrix equation compactly represents that the 2D screen coordinate vector \mathbf{r} is translated to the origin coordinate system, the affine transform matrix is applied, and the result is translated back to the original coordinate system to obtain the background layer coordinate vector \mathbf{r}^\prime : \begin{aligned} \mathbf{r}^\prime &= \mathbf{M} (\mathbf{r} - \mathbf{r}_0) + \mathbf{r}_0 \\ \begin{bmatrix} x' \\ y' \end{bmatrix} &= \begin{bmatrix} a & b \\ c & d \end{bmatrix} \left( \begin{bmatrix} x \\ y \end{bmatrix} - \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} \right) + \begin{bmatrix} x_0 \\ y_0 \end{bmatrix} . \end{aligned} All arithmetic is carried out on 16-bit signed fixed point numbers, while all offsets are limited to 13 bits. The radix point is between bits 7 and 8. Note: the Game Boy Advance's background mode 1 and 2 also perform hardware affine transformations to create effects like Mode 7, and a 3D faux perspective can be simulated using trigonometry to calculate the affine matrix's parameters.
Selection of Mode 7 games
Games using Mode 7 include: 7th Saga The ActRaiser series Aero the Acro-Bat Ace o Nerae! Accele Brid Al Unser Jr.'s Road to the Top Axelay Bastard!! Batman Returns The Brainies Brett Hull Hockey 95 Carrier Aces Contra III: The Alien Wars Chrono Trigger D-Force Demon's Crest DinoCity Exhaust Heat F-Zero Flying Hero: Bugyuru no Daibouken Final Fantasy IV Final Fantasy V Final Fantasy VI The Ganbare Goemon series HyperZone Illusion of Gaia Jurassic Park Kat's Run: Zen-Nippon K Car Senshuken Kirby Super Star Legend The Legend of Zelda: A Link to the Past Lufia II: Rise of the Sinistrals The Magical Quest Starring Mickey Mouse MechWarrior Mega Man 7 Mohawk & Headphone Jack Mr. Nutz NCAA Basketball NHL Stanley Cup Pilotwings Power Rangers Zeo: Battle Racers Psycho Dream Rendering Ranger: R2 RoboCop 3 Romance of the Three Kingdoms IV: Wall of Fire R-Type III: The Third Lightning Run Saber Secret of Evermore Secret of Mana and Trials of Mana Skyblazer SOS Space Megaforce Star Ocean Stargate Street Racer Super Adventure Island Super Air Diver Lock On Super Castlevania IV Super Ghouls 'n Ghosts Super Mario Kart Super Mario RPG: Legend of the Seven Stars Super Mario World Super Mario World 2: Yoshi's Island Super Metroid The Super Robot Wars series Super Scope 6 The Super Star Wars series Super Tennis The Super Turrican series Tales of Phantasia Teenage Mutant Ninja Turtles IV: Turtles in Time Terranigma Tony Meola's Sidekicks Soccer Virtual Bart Wing Commander Sky Mission Wings 2: Aces High or Blazing Skies Yoshi's Safari Zoku: The Legend of Bishin
See also
Ray casting
References
Text derived from https://en.wikipedia.org/w/index.php?oldid=1373438206 under CC BY-SA 4.0; modifications have been made.