Hi, I've been trying to add color support to my GB emulator. DMG compatibility is very high now (some window issues mostly), but I'm having a hard time with color GB.
I already emulated the palette registers for bg and obj, but I can't draw anything yet.
This document for example (http://gbdev.gg8.se/wiki/articles/Video_Display
BG Map Attributes (CGB Mode only)
In CGB Mode, an additional map of 32x32 bytes is stored in VRAM Bank 1 (each byte defines attributes for the corresponding tile-number map entry in VRAM Bank 0):
Bit 0-2 Background Palette number (BGP0-7)
Bit 3 Tile VRAM Bank number (0=Bank 0, 1=Bank 1)
Bit 4 Not used
Bit 5 Horizontal Flip (0=Normal, 1=Mirror horizontally)
Bit 6 Vertical Flip (0=Normal, 1=Mirror vertically)
Bit 7 BG-to-OAM Priority (0=Use OAM priority bit, 1=BG Priority)
I've just reached a tile in vram bank 1, which has a value of 0x08, that would be bit 3, but I can't get the meaning of "Tile VRAM Bank Number". What should I do with this bit ? If it's ON, it's bank 1, but I don't understand what should I do with it.
So I have my VRAM bank 0, which I guess is exactly the same as the DMG one, and this new VRAM bank 1 which has just attributes (metadata) for all the bank 0 tiles ?
What am I missing here ?