Skip to content

Commit

Permalink
chore(*): add few information about BG size
Browse files Browse the repository at this point in the history
  • Loading branch information
alekmaul committed Feb 23, 2024
1 parent f59d7e7 commit edeec71
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions wiki/Backgrounds.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,18 @@ A tile’s colors are defined by the tile’s color palette.

At least, a palette is a collection of either 4, 16 or 256 colors.

In order to render background, you has to set few things for each background, remember to set this for every background you want to render :
In order to render background, you has to set few things for each background, remember to set this for every background you want to render.

## Background Mode (affects number of planes, bitdepth)

Size of tile (8×8 or 16×16)
Size of background in tile representation (32×32 to 64×64)
Set background map
Set background tileset
Background modes
The SNES has 8 background modes.
- Named Mode 0-7
- Mode 1 has a variation mode
- Mode 7 has a submode called Mode 7 Ext. BG
- Each mode has a different amount of background planes available
- Each mode has a different amount of colors for the available background planes for that mode
- Each mode has slightly different rendering properties
- For all modes and for all graphics planes, color index 0 for any subpalette is the transparency color.

```
Mode # Colors for BG
Expand All @@ -39,6 +41,22 @@ Mode # Colors for BG
In all modes and for all BGs, color 0 in any palette is considered transparent.

## Background sizes

In VRAM there is a two-dimensional array that is a map of the tiles on the screen. Depending on the setting of registers $2107 to $210A, this map may be 32x32, 32x64, 64x32 or 64x64 tiles in size.

All tilemaps are 32x32, bits 0-1 simply select the number of 32x32 tilemaps and how they're laid out in memory.

```
00 32x32 AA
AA
01 64x32 AB
AB
10 32x64 AA
BB
11 64x64 AB
CD
```

## Background in VRAM
## Backgrounds with PVSnesLib
## Converting with gfx4snes
Expand Down

0 comments on commit edeec71

Please sign in to comment.