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:
- Video standard is not configurable. AVGA 2.0 makes VGA only.
- Crystal frequency is no longer arbitrary. The AVR simply must run at 32 MHz.
- Screen resolution and on-screen viewport position is no longer configurable (resolution is fixed to 168*200 pixels)
- 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.
- The entire video generation is now written in assembler, including window management, keyboard driver, potential synthesizer and the ISR routine handlers.
- Horizontal sync macro is not needed anymore.
- Number of RAM blocks for overlay can be only a multiple of 8.
- Driver needs about 25 bytes more of STACK.
- WINDOW_INDIVIDUAL_TILESET is always on.