63

This effect is seen in many SNES games, including Super Mario World. The effect pixelates the screen, and makes the pixels larger, then smaller again when it switches to another scene.

It is done so often in many SNES games, and in such a similar way, that it leads me to believe it is some kind of built in effect, or code shared a lot between developers.

I’ve tried looking this up, but I’ve only found results of how to achieve something similar on other platforms.

How is this done? Any assembly language examples?

2
  • 4
    I vaguely recall this was covered in one of the many videos Retro Game Mechanics Explained did about SNES graphics.
    – qwr
    Feb 2 at 9:36
  • 1
    I love that series, and I found it. It looks like it mentions it, but not specifics to how to implement it. I could be wrong. youtu.be/uRjf8ZP6rs8 at 3:29. Feb 2 at 17:44

1 Answer 1

80

Believe it or not, it's a dedicated hardware feature of the Super Nintendo — it's the mosaic register, at address $2106. The programmer can pick a pixellation value from 1 to 16, which will cause the picture processing unit to change the output colour only every 1st to 16th pixel.

So:

  • ramp the value in that register up from 0 to 15;
  • change your current tile map;
  • ramp it back down from 15 to 0.
4
  • 9
    I believe it's a dedicated hardware feature, but it's amazing to think it cost $2,106 even back in 1991. Feb 4 at 12:58
  • 10
    @PaulD.Waite - that is a memory address, not a price. Feb 4 at 15:09
  • @theTrueMikeBrown: ohhhhhhhhh Feb 4 at 15:17
  • 5
    @PaulD.Waite: You may be wondering why there's a dollar sign. Assembly syntax for some CPUs, including many 8-bit micros, uses $ to indicate hex (as opposed to decimal) for numeric literals. Exactly the same way C, GAS, and NASM use 0x, with a bare number being decimal. (A prefix also solves the problem of the first digit being alphabetic, where syntaxes that use a trailing-h need an extra leading zero like 0DEADBEEFh) Feb 5 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.