AVGA 2.0 changes

Here I will try to explain the changes I made in the original code do the AVGA 2.0 for Retrowiz. For those not familiar with AVGA platform, please see the original 2008 pages. Most of the API remains the same as before. But the driver itself was rewritten - to achieve four cycles per pixel for higher resolution. In order to accomplish this, some limitations were adopted:

 

  1. Video standard is not configurable. AVGA 2.0 makes VGA only.
  2. Crystal frequency is no longer arbitrary. The AVR simply must run at 32 MHz.
  3. Screen resolution and on-screen viewport position is no longer configurable (resolution is fixed to 168*200 pixels)
  4. Video output port is now on the low nibble of VIDEO_PORT instead of high nibble. As a consequence, all the on-chip graphics has switched nibbles now.
  5. The entire video generation is now written in assembler, including window management, keyboard driver, potential synthesizer and the ISR routine handlers.
  6. Horizontal sync macro is not needed anymore.
  7. Number of RAM blocks for overlay can be only a multiple of 8.
  8. Driver needs about 25 bytes more of STACK.
  9. WINDOW_INDIVIDUAL_TILESET is always on.