What precautions should I use when doing HDMA on a GBC ?

- If you initiate an HDMA from a ROM bank ($4000-$7fff) to VRAM you can not change the ROM bank until the HDMA has completed. (You can change ROM banks during HDMA ONLY if you are not using a ROM bank as a source for the HDMA data being transferred.)

- If you initiate an HDMA from a RAM bank ($d000-$dfff) to VRAM you can not change the RAM bank until the HDMA has completed. (You can change RAM banks during HDMA ONLY if you are not using a RAM bank as a source for the HDMA data being transferred.)

- Once you initiate an HDMA you can not change the Video RAM bank ($8000-$9fff) until HDMA has completed.

- Source & destination addresses of the HDMA must be 16 byte aligned. (i.e. Source & destination addresses must have a hex value of $xxx0. )

- It will not work if the screen is off. Nothing will happen.

- It will not work if you use the assembly command HALT in your main loop.

- It will not work properly if you try to set up another send while it is still sending the last one. HDMA only takes place during H-blank on screen lines 1-144 (lines 0-143 if using LY numbering system). During other times (including V-blank) HDMA is paused.

- Make sure your transfer length is correct. (i.e. HDMA5 [$ff55]: $80 = 16 bytes, $81 = 32 bytes, .... , $ff = 2048 bytes)