|ANTIC, GTIA and timing info|
First the links to the chip info: ANTIC,
Note: Most of this info was gathered/tested on PAL equipment. There may be significant differences on NTSC systems. I'll try to note where are the main diffs.
How is the video generatedANTIC does all the screen processing for programmer (unlike 2600, where programmer had to push all the graphics info on the fly to the TIA). It takes the playfield data, player missile data (PMG), display list data from the main bus on the speed of the cpu using DMA. For each byte ANTIC reads from the bus causes main CPU to stop - this is called cycle stealing. ANTIC also does the DRAM refresh, this is also performed as a DMA task and steals the cycles too.
The playfield data is then sent to GTIA on three bit ANx bus on the double speed. GTIA colors the bits, adds PM graphics, evaluates the collisions and outputs some analog data (sync and color info) and some digital data (luminance info).
Vertical events descriptionScanlines, from the top of the screen:
Horizontal events descriptionColor clocks, from the left of the screen, same for PAL/NTSC:
Cycle counting - DLISTEach byte of display list takes one cycle. First byte is taken on cclock 0, two optional ones on cclocks 10 & 12.
Cycle counting - PMGMissile takes one byte on scanline (cclock 226). Players take 4 cycles on scanline (cclocks 2-8). It doesn't matter if one or two lines resolution is on, DMA is done on every line anyway. If player DMA is on, missile DMA is turned on automatically. There's 240 cycles per frame taken. GTIA 'knows' (probably from ANx bus communication) when the scanline begins, so it counts the cycles and then grabs the content of the data bus for PMG data. If GRACTL is 'on' but PMG DMA is off, the flickering happens, that is nothing else but the content of the data bus (which looks random).
Cycle counting - refreshOn most lines, 9 cycles of refresh are taken. Only in hires text modes the refresh cycles are preempted by the playfield dma, so only 1 refresh cycle occurs, with the exception of narrow mode, where 2 refresh cycles occur.
Cycle counting - playfieldFor graphics modes, all bytes are fetched on first line once and then repeated on succeding lines.
For text modes, on first scanline the character codes and graphics data are fetched, on succeding lines only the graphics data are fetched.
Cycle counting - VSCROLTODO
Cycle counting - HSCROLTODO
Cycle counting - exampleGraphics 0 screen:
See the attached picture for better info: gr.0 (15 KB PNG)
In hi-res graphics modes are 1xx states understood as 2 pixels.