Mode 7
From Wikipedia, the free encyclopedia
The term Mode 7 originated on the Super NES video game console, on which it describes a simple texture mapping graphics mode that allows a background layer to be rotated and scaled. By modifying the scaling and positioning of the layer on a scanline-by-scanline basis a simple perspective effect can be applied, transforming the layer into a 2D horizontal texture-mapped plane that trades height for depth.
Contents |
[edit] Usage
Mode 7-style rendering is generally used on systems with strong 2D capabilities but no dedicated 3D support. Classic Mode 7 games include the Super NES titles Terranigma, Pilotwings, Super Castlevania IV, Secret of Mana, Final Fantasy VI, F-Zero, Super Mario Kart, Super Mario RPG , Super Star Wars and Chrono Trigger. The effect was later revisited in Game Boy Advance incarnations of F-Zero, Super Mario Kart and Driver.
[edit] Function
The Super NES console has eight modes, numbered from 0 to 7, for displaying background layers, the last one (background mode 7) having a single layer that can be scaled and rotated. The Game Boy Advance and Nintendo DS 2D graphics hardware have scaling and rotation for traditional tiled backgrounds in its modes 1 and 2 and scaling and rotation for bitmaps in modes 3 through 5 (used less often on the GBA because of technical limitations).[1] On each machine supporting this effect, it is possible to change the scaling/rotation values during the horizontal blanking period of each scanline in order to draw a flat plane in a perspective projection; this became thought of as the characteristic "Mode 7" effect. More complex effects such as fuzz are possible by using other equations for the position, scaling, and rotation of each line. This graphical method is not only suited to racing games, it is also used extensively for the overworld sections of roleplaying games such as Square's popular 1994 hit Final Fantasy VI. The effect enables developers to create the impression of sprawling worlds that continue forever in the distance. Mode 7 is also heavily used in other Square RPGs for magical spells.
On the Super NES, a variation of Mode 7 allows pixels of the background layer to be in front of sprites. Examples are Contra III: The Alien Wars (stage 2) and Tiny Toon Adventures (intro screen). The GBA can make the same effect by using mode 2, which provides two "Mode 7" layers, and putting the sprites between the layers.
Many PC games, most notably Wacky Wheels, have a Mode 7 effect made by a completely software-based method. In addition, there is a Mode 7 extension for the software authoring program Multimedia Fusion which allows creators to make semi-3D games.
During the days of the Super NES, Mode 7 was one of Nintendo's favorite selling points (Nintendo Power, SNES Player's Guide). For example, when the game Teenage Mutant Ninja Turtles: Turtles in Time was ported from the arcade to the SNES, a level was changed from side-scrolling to Mode 7.
[edit] Limitations
It is worth noting that Mode 7 can only work on backgrounds, not sprites; therefore, any object that does not rotate/scale with the background must be a sprite — even items that would normally be part of the "background" such as fixed platforms. The game developer must create a sprite with the same appearance as that object. For instance, in Super Castlevania IV, battles in which a boss rotates, like Koranot, have the mobile boss — which would typically be thought of as a sprite — as the background, and the blocks to stand on are sprites. With the obvious enhancements, this is similar to how some NES games featured battles against a giant movable boss without the slowdown and flicker inherent in a large sprite set -- by making the boss the background and then moving and animating it. Both systems' examples only must apply to objects within the horizontal plane of the moving object. For instance, a floor, ceiling, or scoreboard can remain part of a background in both the NES and SNES examples, if they are completely "above" or "below" the field of gameplay; they can also be turned into sprites if the whole screen is needed, but this can cause slowdown.
The fact that Mode 7 cannot be used on sprites means that each "size" of an "approaching" sprite for a given distance has to be pre-drawn, meaning that one would see sprites "jump" between a limited number of sizes when "approaching" them. This can be seen in Super Mario Kart and HyperZone whenever an object approaches, or when walking vertically on the Final Fantasy VI map with an airship in view.
Sprite "rotations," similarly, have to be handled through pre-drawing, unless done with the Super FX 2 chip as with Yoshi's Island. An example of such "rotations" is the second boss battle in Contra 3' and the battles against Morton, Ludwig, Roy, and Bowser in Super Mario World: the boss is a "background" and therefore rotates through Mode 7, and the scoreboard, which is "above" the field of play, is also a background, but the floor of battle's cracks are, like the players and gunfire, "sprites," which are redrawn under various rotations as the player rotates.
One exception to Mode 7-esque effects on sprites handled neither by pre-drawing nor by external chips occurs in Tales of Phantasia and Star Ocean, where re-rendering of sprites on the fly is done entirely by the software. In ToP, the player sprite vertically stretches upon walking onto a save spot, and in Star Ocean, items "squash" upon "popping out of" an open treasure chest. Due to the extra tiles needed for such rendering and the other high system demands throughout those games (both used a form of streaming audio to circumvent the SPC700's limited capacity, and like most high-end SNES RPGs used a variable width font), such rendering was limited to those few scenes.
The Sega Mega Drive/Sega Genesis has no comparable hardware-native feature to Mode 7, although the Sega CD add-on added such a feature; it is used prominently in the Special Stages of Sonic CD, for example. However, like in ToP and SO's sprite effect add-ins, some comparable technical feats could be programmed straight into a game by the developers, resulting in similar effects seen in games such as Castlevania: Bloodlines, Adventures of Batman and Robin, or Contra: Hard Corps. The Sega 32X has 2D and basic 3D capabilities, so scaling and rotation effects are common in primarily 2D games like Knuckles' Chaotix, which also features the first game in the Sonic universe with a polygonal special stage.
The Mode 7 Engine formula has now been ported to Adobe Flash and is currently helping to deliver some of the first flash 3D games, the first fully playable working model is 3D Rally Racing in 2007. This new 3D environment is set to be the next step for flash games with work already underway in making the 3D terrain have height and depth using Flash 9.
The effect has been added to the Wii Opera SDK for Javascript game development on the Nintendo Wii Internet Channel. A demonstration of a simple 3D spinning room shows the effect applied as multiple wall tiles.
[edit] Hardware
The two PPU (picture-processing unit) chips of the SNES use two 8-bit 64-kilobyte RAM chips. One PPU can access the tile map (128 x 128 tiles) and the other PPU can access the tile set (256 tiles, 8x8 pixels in 256 colors) in a single cycle. (See anomie's romhacking.net/docs/regs.txt for more information.)
[edit] See also
[edit] References
- ^ Korth, Martin, GBATEK: LCD I/O Display Control. Retrieved on September 8, 2007.

