Alright, I'll start from first principles.
TILE MODE ON THE X16 The Tile A tile is a graphical object that is 8x8, 8x16, 16x8, or 16x16 pixels. All your tiles are stored in a contiguous block of memory in VRAM.
Each pixel in a tile requires 2, 4, or 8 bits in the tile data, based on the color depth of the tile map. The memory required for each tile depends on the color depth and tile size:
2 color, 8x8 = 16 bytes per tile
16 color, 8x8 = 32 bytes "
256 color, 8x8 = 64 bytes "
2 color, 8x16 = 32 bytes per tile
16 color, 8x16 = 64 bytes "
256 color, 8x16 = 128 bytes "
16x8 has the same memory requirements as 8x16
2 color, 16x16 = 64 bytes per tile
16 color, 16x16 = 128 bytes "
256 color, 16x16 = 256 bytes "
In this respect, tiles are just like small sprites.
Set the Tile Base Address to point to the start of your tile data.
The Tile Map A tile map is a list of tile entries. A tile entry has a one-byte tile index, a palette offset, and "flip" bits. Note that this means you can have up to 256 unique tiles in a map.
Note that the color index in each tile is modified by the palette offset in the tile entry using the following logic:
Color index 0 (transparent) and 16-255 are unmodified.
Color index 1-15 is modified by adding 16 x palette offset.
Set the Tile Map Address to point to the start of your tile map list.