]> git.sur5r.net Git - cc65/blob - asminc/atari_antic.inc
goto.c warning fix for implicit truncation
[cc65] / asminc / atari_antic.inc
1 ;-------------------------------------------------------------------------
2 ; ANTIC Address Equates
3 ;-------------------------------------------------------------------------
4
5 ; Read Addresses
6
7 VCOUNT  = ANTIC + $0B         ;vertical line counter
8 PENH    = ANTIC + $0C         ;light pen horizontal position
9 PENV    = ANTIC + $0D         ;light pen vertical position
10 NMIST   = ANTIC + $0F         ;NMI interrupt status
11
12 ; Write Addresses
13
14 DMACTL  = ANTIC + $00         ;DMA control
15 CHACTL  = ANTIC + $01         ;character control
16 DLISTL  = ANTIC + $02         ;low display list address
17 DLISTH  = ANTIC + $03         ;high display list address
18 HSCROL  = ANTIC + $04         ;horizontal scroll
19 VSCROL  = ANTIC + $05         ;vertical scroll
20 PMBASE  = ANTIC + $07         ;player-missile base address
21 CHBASE  = ANTIC + $09         ;character base address
22 WSYNC   = ANTIC + $0A         ;wait for HBLANK synchronization
23 NMIEN   = ANTIC + $0E         ;NMI enable
24 NMIRES  = ANTIC + $0F         ;NMI interrupt reset
25
26
27 ;-------------------------------------------------------------------------
28 ; Antic opcodes
29 ;-------------------------------------------------------------------------
30
31 ; usage example:
32 ;
33 ; ScreenDL:
34 ; .byte DL_BLK8
35 ; .byte DL_BLK8
36 ; .byte DL_CHR40x8x1 | DL_LMS | DL_DLI
37 ; .word ScreenAlignment
38 ; .byte DL_BLK1 | DL_DLI
39 ; .byte DL_MAP320x1x1 | DL_LMS
40 ; .word Screen
41 ;
42 ; .repeat 99
43 ; .byte DL_MAP320x1x1
44 ; .endrepeat
45 ; .byte DL_MAP320x1x1 | DL_LMS
46 ; .word Screen + 40 * 100       ; 100 lines a 40 byte, 'Screen' has to be aligned correctly!
47 ; .repeat 92
48 ; .byte DL_MAP320x1x1
49 ; .endrepeat
50 ;
51 ; .byte DL_JVB
52
53 ; absolute instructions (non mode lines)
54
55 DL_JMP  = 1
56 DL_JVB  = 65
57
58 ; DL_BLKn display n empty lines (just background)
59
60 DL_BLK1  = 0
61 DL_BLK2  = 16
62 DL_BLK3  = 32
63 DL_BLK4  = 48
64 DL_BLK5  = 64
65 DL_BLK6  = 80
66 DL_BLK7  = 96
67 DL_BLK8  = 112
68
69 ; absolute instructions (mode lines)
70
71 DL_CHR40x8x1  = 2               ; monochrome, 40 character & 8 scanlines per mode line (GR. 0)
72 DL_CHR40x10x1 = 3               ; monochrome, 40 character & 10 scanlines per mode line
73 DL_CHR40x8x4  = 4               ; colour, 40 character & 8 scanlines per mode line (GR. 12)
74 DL_CHR40x16x4 = 5               ; colour, 40 character & 16 scanlines per mode line (GR. 13)
75 DL_CHR20x8x2  = 6               ; colour (duochrome per character), 20 character & 8 scanlines per mode line (GR. 1)
76 DL_CHR20x16x2 = 7               ; colour (duochrome per character), 20 character & 16 scanlines per mode line (GR. 2)
77
78 DL_MAP40x8x4  = 8               ; colour, 40 pixel & 8 scanlines per mode line (GR. 3)
79 DL_MAP80x4x2  = 9               ; 'duochrome', 80 pixel & 4 scanlines per mode line (GR.4) 
80 DL_MAP80x4x4  = 10              ; colour, 80 pixel & 4 scanlines per mode line (GR.5) 
81 DL_MAP160x2x2 = 11              ; 'duochrome', 160 pixel & 2 scanlines per mode line (GR.6) 
82 DL_MAP160x1x2 = 12              ; 'duochrome', 160 pixel & 1 scanline per mode line (GR.14) 
83 DL_MAP160x2x4 = 13              ; 4 colours, 160 pixel & 2 scanlines per mode line (GR.7) 
84 DL_MAP160x1x4 = 14              ; 4 colours, 160 pixel & 1 scanline per mode line (GR.15) 
85 DL_MAP320x1x1 = 15              ; monochrome, 320 pixel & 1 scanline per mode line (GR.8) 
86
87 ; modifiers on mode lines...
88
89 DL_HSCROL = 16
90 DL_VSCROL = 32
91 DL_LMS    = 64
92
93 ; general modifier...
94
95 DL_DLI    = 128