]> git.sur5r.net Git - cc65/blobdiff - doc/atari.sgml
Merge pull request #623 from blackystardust/master
[cc65] / doc / atari.sgml
index a0dbe2f471a4f9c84cdcc99cc8f8ce96071d7869..459e8e7453e9a8a6c6be7c1987d93884a6aea451 100644 (file)
@@ -317,6 +317,49 @@ chip registers.
 
 </descrip><p>
 
+<sect1>Display lists<p>
+
+A major feature of the Atari graphics chip "ANTIC" is to
+process instructions for the display generation.
+cc65 supports constructing these display lists by offering defines
+for the instructions. In conjunction with the "void"-variable extension
+of cc65, display lists can be created quite comfortable:
+
+<verb>
+...
+unsigned char ScreenMemory[100];
+
+void DisplayList =
+{
+       DL_BLK8,
+       DL_BLK8,
+       DL_BLK8,
+       DL_LMS(DL_CHR20x8x2),
+       ScreenMemory,
+       DL_CHR20x8x2,
+       DL_CHR20x8x2,
+       DL_CHR20x8x2,
+       DL_BLK4,
+       DL_CHR20x8x2,
+       DL_JVB
+};
+...
+POKEW(560,(unsigned int)&amp;DisplayList);             // SDLSTL
+...
+</verb>
+
+Please inspect the <tt/_antic.h/ header file to detemine the supported
+instruction names. Modifiers on instructions can be nested without need
+for an order:
+
+<tt/DL_LMS(DL_HSCROL(DL_VSCROL(DL_DLI(DL_MAP80x4x2))))/
+
+Please mind that ANTIC has memory alignment requirements for "player
+missile graphics"-data, font data, display lists and screen memory. Creation
+of a special linker configuration with appropriate aligned segments and
+switching to that segment in the c-code is usually neccessary. A more memory
+hungry solution consists in using the "<tt/posix_memalign()/" function in
+conjunction with copying your data to the allocated memory.
 
 <sect1>Character mapping<p>
 
@@ -351,7 +394,7 @@ under different mappings, defining remapped strings works only flawlessly
 with static array initialization:
 
 <verb>
-#include &lt;atari\_screen\_charmap.h&gt;
+#include &lt;atari_screen_charmap.h&gt;
 char pcScreenMappingString[] = "Hello Atari!";
 
 #include &lt;atari_atascii_charmap.h&gt;