Mosaic: Difference between revisions
(→Apparent Resolution: 14x14 checkerboard) |
(→Examples: Animaniacs) |
||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
'''Mosaic''' is a screen pixellation effect. | '''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 (called the '''mosaic mode select'''). 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: | ||
<code> | <code> | ||
Line 6: | Line 6: | ||
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. | 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 first mosaic square's location is always (0,0) so that the upper-left corner of the square is coincident with the upper-left corner of the screen, disregarding overscan. [[Sprite (hardware)|Sprites]] are unaffected by the mosaic filter. All [[background modes]] support mosaic.<sup>[7]</sup> | ||
The mosaic filter has a horizontal and vertical subsystem | 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.<sup>[3]</sup> | |||
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. <sup>[4]</sup> | |||
=== Examples === | === Examples === | ||
Line 15: | Line 18: | ||
|- | |- | ||
! Game Name !! Mosaic Usage !! Animated GIF | ! Game Name !! Mosaic Usage !! Animated GIF | ||
|+ | |||
| ''Animaniacs'' || upon opening a door || | |||
|+ | |+ | ||
| ''Axelay'' || when the Stage 3 boss' final form takes damage || | | ''Axelay'' || when the Stage 3 boss' final form takes damage || | ||
|+ | |+ | ||
| ''Final Fantasy III (US)'' || when trying to select a disabled menu option || [[File:mosaic FF3.gif]] | | ''Final Fantasy III (US)'' || when trying to select a disabled menu option and upon entering a battle || [[File:mosaic FF3.gif]] [[File:FF3 mosaic battle.gif]] | ||
|+ | |+ | ||
| ''[[Final Fantasy Mystic Quest]]'' || upon entering battles and before/after loading new sections of the map || [[File:mosaic_FFMQ.gif]] | | ''[[Final Fantasy Mystic Quest]]'' || upon entering battles and before/after loading new sections of the map || [[File:mosaic_FFMQ.gif]] | ||
|+ | |||
| ''[[The Legend of Zelda: A Link to the Past]]'' || | |||
* upon entering/exiting the [https://zelda.fandom.com/wiki/Lost_Woods Lost Woods] | |||
* when trying to slash [https://zelda.fandom.com/wiki/Agahnim Agahnim] with the [https://zelda.fandom.com/wiki/Master_Sword Master Sword] | |||
* when being shocked by a [https://www.zeldadungeon.net/wiki/Bari_(A_Link_to_the_Past) bari] | |||
* upon entering/exiting a [https://zelda.fandom.com/wiki/Whirlpool_Waterway whirlpool waterway] or dungeon warp tile | |||
|| | |||
|+ | |+ | ||
| ''The Magical Quest Starring Mickey Mouse'' || when the final boss takes damage, and on the walls of that same battle || | | ''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 || | | ''Star Ocean'' || upon entering every battle || | ||
|+ | |||
| ''Street Fighter II'' || on the title screen logo || [[File:Street_Fighter_II_(USA)_title_mosaic.gif]] | |||
|+ | |+ | ||
| ''[[Super Mario World]]'' || after selecting and entering a level || [[File:mosaic_SMW.gif]] | | ''[[Super Mario World]]'' || after selecting and entering a level || [[File:mosaic_SMW.gif]] | ||
Line 33: | Line 47: | ||
{| class="wikitable" | {| class="wikitable" | ||
! $2106.4-7 !! Mosaic Block Size !! # of rows of complete blocks !! # of columns of complete blocks !! # of rows of spare pixels !! # of columns of spare pixels | ! $2106.4-7 !! Mosaic Block Size !! Image !! # of rows of complete blocks !! # of columns of complete blocks !! # of rows of spare pixels !! # of columns of spare pixels | ||
|- | |- | ||
| 0 || 1 || 224 || 256 || 0 || 0 | | 0 || 1 || [[File:mosaic 1x1.png]] || 224 || 256 || 0 || 0 | ||
|- | |- | ||
| 1 || 2 || 112 || 128 || 0 || 0 | | 1 || 2 || [[File:mosaic 2x2.png]] || 112 || 128 || 0 || 0 | ||
|- | |- | ||
| 2 || 3 || 74 || 85 || 2 || 1 | | 2 || 3 || [[File:mosaic 3x3.png]] || 74 || 85 || 2 || 1 | ||
|- | |- | ||
| 3 || 4 || 56 || 64 || 0 || 0 | | 3 || 4 || [[File:mosaic 4x4.png]] || 56 || 64 || 0 || 0 | ||
|- | |- | ||
| 4 || 5 || 44 || 51 || 4 || 1 | | 4 || 5 || [[File:mosaic 5x5.png]] || 44 || 51 || 4 || 1 | ||
|- | |- | ||
| 5 || 6 || 37 || 42 || 2 || 4 | | 5 || 6 || [[File:mosaic 6x6.png]] || 37 || 42 || 2 || 4 | ||
|- | |- | ||
| 6 || 7 || 32 || 36 || 0 || 4 | | 6 || 7 || [[File:mosaic 7x7.png]] || 32 || 36 || 0 || 4 | ||
|- | |- | ||
| 7 || 8 || 28 || 32 || 0 || 0 | | 7 || 8 || [[File:mosaic 8x8.png]] || 28 || 32 || 0 || 0 | ||
|- | |- | ||
| 8 || 9 || 24 || 28 || 8 || 4 | | 8 || 9 || [[File:mosaic 9x9.png]] || 24 || 28 || 8 || 4 | ||
|- | |- | ||
| 9 || 10 || 22 || 25 || 4 || 6 | | 9 || 10 || [[File:mosaic 10x10.png]] || 22 || 25 || 4 || 6 | ||
|- | |- | ||
| 10 || 11 || 20 || 23 || 4 || 3 | | 10 || 11 || [[File:mosaic 11x11.png]] || 20 || 23 || 4 || 3 | ||
|- | |- | ||
| 11 || 12 || 18 || 21 || 8 || 4 | | 11 || 12 || [[File:mosaic 12x12.png]] || 18 || 21 || 8 || 4 | ||
|- | |- | ||
| 12 || 13 || 17 || 19 || 3 || 9 | | 12 || 13 || [[File:mosaic 13x13.png]] || 17 || 19 || 3 || 9 | ||
|- | |- | ||
| 13 || 14 || 16 || 18 || 0 || 4 | | 13 || 14 || [[File:mosaic 14x14.png]] || 16 || 18 || 0 || 4 | ||
|- | |- | ||
| 14 || 15 || 14 || 17 || 14 || 1 | | 14 || 15 || [[File:mosaic 15x15.png]] || 14 || 17 || 14 || 1 | ||
|- | |- | ||
| 15 || 16 || 14 || 16 || 0 || 0 | | 15 || 16 || [[File:mosaic 16x16.png]] || 14 || 16 || 0 || 0 | ||
|} | |} | ||
Anomie mentions these two mosaic block patterns for Mode 7 EXTBG: | |||
[[File:mosaic 16x1.png]] | |||
[[File:mosaic 1x16.png]] | |||
=== See Also === | |||
* [[Offset Change Mode]] | |||
=== External Links === | |||
* https://emudev.de/q00-snes/mosaic-effect | |||
=== References === | === References === | ||
# setting example: [https://archive.org/details/SNESDevManual/book1/page/n64 page 2-4-1 of Book I] of the official Super Nintendo development manual | |||
# https://problemkaputt.de/fullsnes.htm#snesppubgcontrol | |||
# https://board.zsnes.com/phpBB3/viewtopic.php?p=204966#p204966 | |||
# [https://www.romhacking.net/documents/196 anomie's register doc] | |||
# bit-by-bit breakdown of the mosaic register: [https://archive.org/details/SNESDevManual/book1/page/n116 page 2-27-3] lbid | |||
# display example of mosaic effect: [https://archive.org/details/SNESDevManual/book1/page/n201 Appendix A-7] lbid | |||
# [https://archive.org/details/SNESDevManual/book1/page/n199 Appendix A-5] lbid | |||
[[Category:Video]] | [[Category:Video]] | ||
[[Category:Registers]] |
Latest revision as of 07:58, 13 December 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 (called the mosaic mode select). 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) so that the upper-left corner of the square is coincident with the upper-left corner of the screen, disregarding overscan. Sprites are unaffected by the mosaic filter. All background modes support mosaic.[7]
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 |
---|---|---|
Animaniacs | upon opening a door | |
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 Legend of Zelda: A Link to the Past |
|
|
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 | |
Street Fighter II | on the title screen logo | |
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.
Anomie mentions these two mosaic block patterns for Mode 7 EXTBG:
See Also
External Links
References
- setting example: page 2-4-1 of Book I of the official Super Nintendo development manual
- https://problemkaputt.de/fullsnes.htm#snesppubgcontrol
- https://board.zsnes.com/phpBB3/viewtopic.php?p=204966#p204966
- anomie's register doc
- bit-by-bit breakdown of the mosaic register: page 2-27-3 lbid
- display example of mosaic effect: Appendix A-7 lbid
- Appendix A-5 lbid