4.2 How to write real CGB compatible Code


For being compatible to the real Gameboy you should use this order when coding:

- Disable LCD, Disable Interrupts (see 1.3 and 2.1)
- Identify if the Gameboy you are currently running on is a CGB (see 1.2)
- Transfer color palettes (see 1.2)
- Transfer VRAM (video-memory) (see 1.1)
- Transfer attributes to Bank1 (see 1.1 and 1.2)
- Transfer tilesoffsets to Bank0 (BF CHR Code Transfer) (see 1.1)
- Enable LCD Display (see 1.3)
- Go on with your normal code....