Clean up a bit of the code that uses DISPCAPCNT. Also add some enums to replace some magic constants.

Inlined some for loop variables too.