Copy Link
Add to Bookmark
Report
GP32 and HBLANK Emulation
Following text describes basic principles for CPU friendly HBLANK emulation. Basically HBLANK allows you to do raster effects on each raster line without busy-wait polling/waiting for certain raster line position. There are actually two different approaches how to achieve one raster line granularity on GP32 LCD manipulation. Either you use Timer Interrupts or Timer Synchronized DMA. The DMA is very clever and elegant as a solution and works on background without any "maintenance". Interrupts allow more flexibility but on the other hand have larger CPU cycle penalty due interrupt latencies and mandatory interrupt handling code.
Remember the number 1784! It's a magic number for HBLANK raster effects.