It is currently Sat Oct 20, 2018 11:52 am

All times are UTC - 7 hours



Forum rules





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: 16x16 BG tiles
PostPosted: Sat Jan 27, 2018 3:22 pm 
Offline
User avatar

Joined: Tue Jul 12, 2005 4:37 pm
Posts: 127
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?


Top
 Profile  
 
 Post subject: Re: 16x16 BG tiles
PostPosted: Sat Jan 27, 2018 3:53 pm 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 7672
Location: Seattle
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:
16x16 BG Tile 1FFh     16x16 OBJ Tile 1FFh
Tile1ffh Tile200h      Tile1ffh Tile1f0h
Tile20fh Tile210h      Tile10fh Tile100h


Top
 Profile  
 
 Post subject: Re: 16x16 BG tiles
PostPosted: Sat Jan 27, 2018 4:35 pm 
Offline

Joined: Wed May 19, 2010 6:12 pm
Posts: 2760
What graphics mode are you using? Does it work properly with 8x8 mode?


Top
 Profile  
 
 Post subject: Re: 16x16 BG tiles
PostPosted: Sat Jan 27, 2018 4:48 pm 
Offline
User avatar

Joined: Tue Jul 12, 2005 4:37 pm
Posts: 127
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group