Tiles displaced vertically

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Tiles displaced vertically
by on (#52901)
I'm having a weird problem where tiles in certain columns are drawn 10-15 tile rows below where they should be. I don't have the ROM on this computer so I don't have an actual screenshot, but I made a mockup in paint to illustrate what I'm talking about:

Image

I'm using mode 2 and draw on BG0. I tried displaying a picture across the entire screen and it worked fine, but when I try to draw text on individual rows this keep happening. It doesn't matter if I copy the tile data in a loop or using DMA. The setup code is taken from the SNES Programming wiki, and it should reset the scrolling regs (like I said, I've filled the entire BG with a picture using the same code and there weren't any problems then).

Have any of you seen this or have a hunch about what the problem might be?

by on (#52902)
Mode 2 has an "offset per tile" ability.
http://www.neviksti.com/wiki/Hardware_Registers#Mode_2

That's the only thing I know of that can shift things vertically like that.

by on (#52903)
Ah, how silly of me to just pick a mode with 16-color BGs at random. I guess I'll use mode 1 or mode 3 instead.