Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Mode 7
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Overview== {{Unreferenced section|date=May 2023}} The Super NES console has eight graphics modes, numbered from 0 to 7, for displaying background layers. The last one (background mode 7) has a single layer that can be scaled and rotated. Two-dimensional affine transformations can produce any combination of [[translation (geometry)|translation]], [[scaling (geometry)|scaling]], [[reflection (mathematics)|reflection]], [[rotation (mathematics)|rotation]], and [[Shear mapping|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 to background coordinates using an [[affine transformation]] and sampling the corresponding background color. The 2D affine transformation is specified for each scanline by 6 parameters: <math> a </math>, <math> b </math>, <math> c </math>, and <math> d </math> ( which together define the matrix <math> \mathbf{M} </math>), and <math> x_0 </math> and <math> y_0 </math> (which define the vector <math> \mathbf{r}_0 </math>, the origin). Specifically, screen coordinate <math> \mathbf{r} </math> is translated to the origin coordinate system, the matrix is applied, and the result is translated back to the original coordinate system to obtain <math> \mathbf{r}^\prime </math>. In 2D matrix notation: <math> \mathbf{r}^\prime = \mathbf{M} (\mathbf{r} - \mathbf{r}_0) + \mathbf{r}_0 </math> <math> \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} </math>. 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)