I'm having trouble calculating the offset in the tilemap rom at which I need to start.
Here's what I'm assuming:
The X-scroll is 16bit (0 - 0xffff)
The last 5 bits are used to scroll part of a tile (since bg tiles are 32x32)
The rest should be used to pick which column to start,
- this works out to be 0x10000 / 0x20 -> 0x800 -> 2048 (which is the number of tiles in the X), it also works out that:
2048 * 8 * 2 -> 0x8000 -> the size of the tilemap rom
so I would think it would work out to be:
(xscroll >> 5)
now, each column is 8 * 2 bytes, so that should work out to
(scroll >> 5) << 4
The thing is, I can scroll through the entire tilemap and it looks correct, but when I try to use the scroll the actual game
provides, it isn't correct (in most instances).
I could definitely use that help Treb.