Mosaic: Difference between revisions
(note on Mode 7 EXTBG) |
(→References: linkify anomie's doc) |
||
Line 74: | Line 74: | ||
* https://problemkaputt.de/fullsnes.htm#snesppubgcontrol | * https://problemkaputt.de/fullsnes.htm#snesppubgcontrol | ||
* [3] https://board.zsnes.com/phpBB3/viewtopic.php?p=204966#p204966 | * [3] https://board.zsnes.com/phpBB3/viewtopic.php?p=204966#p204966 | ||
* [4] anomie's register doc | * [4] [https://www.romhacking.net/documents/196 anomie's register doc] | ||
[[Category:Video]] | [[Category:Video]] |
Revision as of 05:29, 10 July 2023
Mosaic is a screen pixellation effect. The mosaic register is located at 2106h, and it can be enabled or disabled on a per-background basis via bits 0-3. When enabled for a given background, the output background color (which will then be fed to the compositor and combined with all the other possibly mosaicized backgrounds) of the pixel at screen position (H,V) is:
output_color(H,V) = input_color(floor(H/size)*size, floor(V/size)*size)
where size is the value of bits 4-7 of 2106h plus one. Thus, for each mosaicized background, the shaded output consists of a grid of solid-colored squares where each entire square's color matches that of its top-leftmost input pixel.
The first mosaic square's location is always (0,0). Sprites are unaffected by the mosaic filter.
The mosaic filter has a horizontal and vertical subsystem. The horizontal mosaic latches remember the color of the top-leftmost pixel of each mosaicized block. The vertical mosaic latch remembers what the value of the PPU vertical scanline counter was at the top of each mosaicized block. [3] On Mode 7's EXTBG, vertical mosaic is enabled when bit 0 of the mosaic register is set, and horizontal mosaic is enabled when bit 1 is set. [4]
Examples
Game Name | Mosaic Usage | Animated GIF |
---|---|---|
Axelay | when the Stage 3 boss' final form takes damage | |
Final Fantasy III (US) | when trying to select a disabled menu option and upon entering a battle | |
Final Fantasy Mystic Quest | upon entering battles and before/after loading new sections of the map | |
The Magical Quest Starring Mickey Mouse | when the final boss takes damage, and on the walls of that same battle | |
Star Ocean | upon entering every battle | |
Super Mario World | after selecting and entering a level |
Apparent Resolution
This table describes how many complete mosaicized blocks appear on each axis when the mosaic filter is applied (the "apparent" screen resolution, in other words) disregarding overscan. The number of spare pixels off to the right and/or bottom of the screen that make up the last incomplete blocks when the block size does not evenly divide the screen is also given.
References
- setting example: page 2-4-1 of Book I of the official Super Nintendo development manual
- bit-by-bit breakdown of the mosaic register: page 2-27-3 lbid
- display example of mosaic effect: Appendix A-7 lbid
- https://problemkaputt.de/fullsnes.htm#snesppubgcontrol
- [3] https://board.zsnes.com/phpBB3/viewtopic.php?p=204966#p204966
- [4] anomie's register doc