17 users online:  blueribbonhighlife, braden09, Cappaque, Dilro_Lopes, El Cuh Fermin, h.carrell, Heitor Porfirio, Magi,  NinCollin, Poodloo, rafaelfutbal, RXDARK, Shroomz, SomeGuy712x, VLSkoot, Zav, Zavok - Guests: 79 - Bots: 226
Users: 65,641 (2,213 active)
Latest user: Shroomz

How to Use Mode 0 in SMW (for beginners)!



Hello all, my name is Anas and I'd like to teach you how to use Mode 0 in your levels. Don't worry, it won't be super complicated nor will you need any ASM knowledge whatsoever! It is assumed you're already fairly experienced with inserting sprites, patches, UberASM codes, and whatnot. Otherwise, you'll need to be acquainted with the tutorials on those things first! This tutorial is based on a SnesLab article I made in September 2019. However, I felt that it should be more accessible, longer-lasting and known to the public. So today I decided to bring it to SMWC!

What is Mode 0?

Mode 0 is the first mode on the SNES, characterized by its offer of four layers, as opposed to the normal three Mode 1 offers you. However, there are two significant drawbacks: you only have four colors (3 actual colors plus transparency) per palette, and the layer 3 tilemap is halved to make room for layer 4. However, the latter drawback can be circumvented by sacrificing GFX slots (citation needed).

Thankfully, the first drawback does not apply on the sprite layer, so you can freely use all 16 colors for each sprite palette!

Applications of Mode 0

When it comes to the SNES library of games, only a few have used Layer 4, such as Super Mario Kart, Super Mario World 2 - Yoshi's Island, S.O.S., and EarthBound.

More interestingly, in the field of Super Mario World hacking, a few hacks and contest levels have used it, such as An SMW Central Production, LMPuny's work-in-progress hack SUPER MARIO BROS. Returns, idol and Katrina's Chocolate Level Design Contest 2018 entry lightest, and my Power Mario Contest entry Pyro-Blue's Fort.

Palette and Tilemap Distribution

As mentioned in the previous heading, Mode 0 can only offer you four colors per palette, including transparency. Each layer takes up 8 four-color palettes distributed in two rows each. Layer 1 takes up rows 0-1, layer 2 rows 2-3, layer 3 rows 4-5, and layer 4 rows 6-7.

As for the tilemap, it is 2bpp, but the size must be 4 KB. However, the arrangement for the tilemap is doubled, meaning that in a graphics editor like YY-Chr, you can have eight rows' worth of
graphics instead of the usual four.

In Super Mario World, the tilemap distribution is different-- FG1 occupies tiles 0-FF, FG2 occupies tiles 100-1FF, BG1 occupies tiles 200-2FF, and FG3 occupies tiles 300-3FF.

To actually apply the graphics properly in the level in LM, you must put them in the FG1, FG2, and BG1 slots in the 'Super GFX Bypass' dialog and leave the FG3, BG2, and BG4 slots blank.

How to Use Mode 0 in Super Mario World

IMPORTANT NOTE: It is recommended to use a sprite status bar such as the DKCR-styled status bar or remove the vanilla one globally or on a per-level basis as the vanilla one's IRQ will make tiles around that area look horribly glitched!

IMPORTANT NOTE 2: To avoid getting layer 3 from getting cut off, make sure that the BG's destination is set to 'Start of Layer 3' ('Layer 3 ExGFX/Tilemap Bypass' dialog/Destination for File')

1. First of all, please use one of the given codes in a level using UberASMTool before proceeding:

Bugs so far:
- Layer 2 translucency doesn't work when set in LM. It must be done manually with this code by LMPuny under the init: label without an RTL at the end:

- Neither layer 3 translucency or priority over all other layers will also work when set in LM, thus one of the following two codes will be required for your needs. Kudos to LMPuny for part of the original code, I modified it to work with L3:

2. Press Ctrl+F7 on a level to change Lunar Magic's graphics viewer mode to 2bpp.

3. Use the following 2bpp-trimmed SMW tileset for your Layer 4 levels by me (includes most of SMW's important animations and graphics, such as the cave tileset, coins, question blocks, etc.):

First Tileset: Cave


(note that this also includes a template LT3 file that demonstrates where L3 and L4 are)

A GIF of the cave tileset as well as the animations

A picture of the Map16 data included in ''. Discolored tiles are from the ghost ship tileset

Second Tileset: Ghost Ship


A GIF of the tileset in action with all layers being shown individually later on in the GIF; recorded with LiceCAP on ZMZ

The map16 of the ghost ship tileset, now with the correct palette!

ExAnimation in Mode 0 levels

ExAnimation in Mode 0 levels is not really difficult once you adapt to it, but it may seem tricky at first glance. The main reason for this is that even in LM's 2bpp graphics viewing mode, ExAnimation tiles are still rendered in 4bpp, thus becoming garbled. Also the size of the frames to be animated is condensed into 8x8 tiles according to the following arrangement:

The recommended arrangement of ExAnimation frames for a better understanding of Mode 0 ExAnimation, in ExGFX405

The actual rendering of the tiles, starting from 0x780 to 0x7FF, in the 8x8 Tile Editor window. As explained earlier, the gaps from the above screenshot of ExGFX405 are gone

ExAnimation Tile Explanation

780-781, 790-791, 7A0-7A1, 7B0-7B1: ?-block

782-783, 792-793, 7A2-7A3, 7B2-7B3: Coin

784-785: Used brown block

794-795, 7A4-7A5, 7B4-7B5, 7C4-7C5: Turning turn block

786-787, 796-797: Boo animation 1

7A6-7A7, 7B6-7B7: Boo animation 2

7C0-7C1, 7D0-7D1, 7E0-7E1, 7F0-7F1: Note block

7CA-7CB, 7DA-7DB, 7EA-7EB, 7FA-7FB: Seaweed animation 1

7CC-7CD, 7DC-7DD: Muncher

7CE-7CF, 7DE-7DF, 7EE-7EF, 7FE-7FF: Seaweed animation 2

First Example for ExAnimation

We want to animate the ?-block. How will we do it?

1. First of all, before animating anything, there is one important point to keep in mind: the destination tile for your ExAnimation tile in the ExAnimation window must be divided by 2 in hex, otherwise the destination will not be as expected. So for example, if your destination tile is EA, it should be divided by 2 in hex in a calculator, like your computer's built-in one or something else, to get 75. Put 75 instead in the destination tile text box.

For our example, the ?-block's final destination is at (60/2=)30. If we were to put 60 instead, the final destination would be at (60*2=)C0, which is not what we want.

2. For the ?-block you might expect the animation type to be 4 8x8s: line, but that is completely wrong! Since the frames are condensed in 8x8 tiles under the 8x8 Tile Editor window, it should be 2 8x8s: line instead. Refer to the ExAnimation tile explanation section for the ?-block and the 8x8 Tile Editor. The correct tiles to be input in the ExAnimation window are 780, 790, 7A0, and 7B0 and the type should be 2 8x8s: line.

The result should be something like this:

As I said at the very beginning of this tutorial, Mode 0 may be confusing at first, but once you get used it, you'll realize how easy it is! Thanks for reading, and hope you understood my tutorial well!
My Mode 0 guide.

My Discord server. It has a lot of archived ASM stuff, so check that out!