16x16 BG tiles

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
Post Reply
User avatar
beneficii
Posts: 127
Joined: Tue Jul 12, 2005 4:37 pm

16x16 BG tiles

Post by beneficii » Sat Jan 27, 2018 3:22 pm

I set $2105 to make the BG1 tiles 16x16, but I'm running into problems. It displays fine when I use, for example, tile $00 or tile $02, but when I set it to tile $20, all I get is a blank space. This is despite the fact I have drawn tiles going all the way up to $3b (which would be used as part of tile $2a).

So how are you supposed to select tiles when you set $2105 to 16x16 BG tiles? The development manual said only that if you choose $00, the upper left will be $00, the top right will be $01, the bottom left will be $10, and the bottom right will be $11.

So what am I doing wrong?

lidnariq
Posts: 8785
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

Re: 16x16 BG tiles

Post by lidnariq » Sat Jan 27, 2018 3:53 pm

FullSNES § SNES PPU Video Memory (VRAM) wrote: 16x16 (and bigger) Tiles
BG tiles can be up to 16x16 pixels in size, and OBJs up to 64x64. In both cases, the big tiles are combined of multiple 8x8 pixel tiles, whereas VRAM is organized as "two-dimensional" array of 16x64 BG Tiles and 16x32 OBJ Tiles:
The BG Map or OAM entry contain the Tile number (N) for the upper-left 8x8 tile. The tile(s) right of that tile are N+1 (and N+2, N+3, etc). The tile(s) under that tile are N+10h (and N+20h, N+30h, etc).

* 32x32 pixel OBJ Tile 000h
* Tile000h, Tile001h, Tile002h, Tile003h
* Tile010h, Tile011h, Tile012h, Tile013h
* Tile020h, Tile021h, Tile022h, Tile023h
* Tile030h, Tile031h, Tile032h, Tile033h

The hex-tile numbers could be thus thought of as "Yyxh", with "x" being the 4bit x-index, and "Yy" being the y-index in the array. For OBJ tiles, the are no carry-outs from "x+1" to "y", nor from "y+1" to "Y". Whilst BG tiles are processing carry-outs.
For example:

Code: Select all

16x16 BG Tile 1FFh     16x16 OBJ Tile 1FFh
Tile1ffh Tile200h      Tile1ffh Tile1f0h
Tile20fh Tile210h      Tile10fh Tile100h

psycopathicteen
Posts: 2904
Joined: Wed May 19, 2010 6:12 pm

Re: 16x16 BG tiles

Post by psycopathicteen » Sat Jan 27, 2018 4:35 pm

What graphics mode are you using? Does it work properly with 8x8 mode?

User avatar
beneficii
Posts: 127
Joined: Tue Jul 12, 2005 4:37 pm

Re: 16x16 BG tiles

Post by beneficii » Sat Jan 27, 2018 4:48 pm

OK. I fixed it. The problem was that only the $0400 bytes were being loaded, which apparently does only the first row. I had a lot more load, and it works now.

Unfortunately, I now have other problems, but I'll post these in another thread.

And I'm using BG mode 1.

Post Reply