-
Notifications
You must be signed in to change notification settings - Fork 0
/
atari.def
143 lines (124 loc) · 4.08 KB
/
atari.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
;* some memory addresses and definitions
;//---------------------------------------------------------------------------------------------
.def DOSVEC = $000A
.def RTCLOK = $0012 ; Real Time Clock
.def VDSLST = $0200 ; Display List Interrupt Vector
.def VVBLKI = $0222 ; Vertical Blank Immediate (VBI) Register
.def SDMCTL = $022F ; Shadow Direct Memory Access Control address
.def SDLSTL = $0230
.def PADDL0 = $0270 ; Shadow registers for Paddles
.def PADDL1 = $0271
.def PADDL2 = $0272
.def PADDL3 = $0273
.def PADDL4 = $0274
.def PADDL5 = $0275
.def PADDL6 = $0276
.def PADDL7 = $0277
.def COLOR0 = $02C4
.def COLOR1 = $02C5
.def COLOR2 = $02C6
.def COLOR3 = $02C7
.def COLOR4 = $02C8
.def CH1 = $02F2
.def CH = $02FC
.def HPOSP0 = $D000 ; HORIZONTAL POSITION P0
.def HPOSP1 = $D001 ; HORIZONTAL POSITION P1
.def HPOSP2 = $D002 ; HORIZONTAL POSITION P2
.def HPOSP3 = $D003 ; HORIZONTAL POSITION P3
.def HPOSM0 = $D004 ; HORIZONTAL POSITION M0
.def HPOSM1 = $D005 ; HORIZONTAL POSITION M1
.def HPOSM2 = $D006 ; HORIZONTAL POSITION M2
.def HPOSM3 = $D007 ; HORIZONTAL POSITION M3
.def SIZEP0 = $D008 ; SIZE P0
.def M0PL = $D008 ; Missile 0 to Player Collisions
.def SIZEP1 = $D009 ; SIZE P0
.def M1PL = $D009 ; Missile 1 to Player Collisions
.def SIZEP2 = $D00A ; SIZE P0
.def M2PL = $D00A ; Missile 2 to Player Collisions
.def SIZEP3 = $D00B ; SIZE P0
.def M3PL = $D00B ; Missile 3 to Player Collisions
.def SIZEM = $D00C ; SIZE M
.def GRAFP0 = $D00D
.def GRAFP1 = $D00E
.def GRAFP2 = $D00F
.def GRAFP3 = $D010
.def TRIG0 = $D010
.def GRAFM = $D011
.def COLPM0 = $D012 ; COLOR P0/M0
.def COLPM1 = $D013 ; COLOR P1/M1
.def COLPM2 = $D014 ; COLOR P2/M2
.def NTSCPAL = $D014
.def COLPM3 = $D015 ; COLOR P3/M3
.def COLPF0 = $D016
.def COLPF1 = $D017
.def COLPF2 = $D018
.def COLPF3 = $D019
.def COLBK = $D01A
.def GPRIOR = $D01B
.def GRACTL = $D01D
.def HITCLR = $D01E ; Write to clear collisions
.def POKEY = $D200
.def POT0 = $D200 ; Paddles registers, read to return the values needed
.def POT1 = $D201
.def POT2 = $D202
.def POT3 = $D203
.def POT4 = $D204
.def POT5 = $D205
.def POT6 = $D206
.def POT7 = $D207
.def KBCODE = $D209
.def RANDOM = $D20A
.def POTGO = $D20B ; reset paddles for new input to read
.def IRQEN = $D20E
.def IRQST = $D20E
.def SKCTL = $D20F
.def SKSTAT = $D20F
.def PORTA = $D300
.def PORTB = $D301
.def DMACTL = $D400
.def CHACTL = $D401
.def DLISTL = $D402
.def DLISTH = $D403
.def HSCROL = $D404
.def VSCROL = $D405
.def PMBASE = $D407 ; STARTING ADRESS PLAYER MISSILE GRAPHICS
.def CHBASE = $D409
.def WSYNC = $D40A
.def VCOUNT = $D40B
.def NMIEN = $D40E
.def NMIST = $D40F
.def NMIRES = $D40F
.def NMI = $FFFA
.def RESET = $FFFC
.def IRQ = $FFFE
;//---------------------------------------------------------------------------------------------
.MACRO CHECK_NTSCPAL
lda NTSCPAL
cmp #1
.ENDM
.MACRO SETBKCOL COLVAL
.ifdef DEBUG_COLOR
lda #:COLVAL
sta COLBK
.endif
.ENDM
.MACRO KIL
dta 2
.ENDM
;//---------------------------------------------------------------------------------------------
.def LMS = 64
.def HS = 16
.def MODE4 = 4
.def MODED = $0D
.def MODEE = $0E
.def MODEF = $0F
.def BLANK8 = $70
.def DLI = 128
.def DLIJUMP = $41 ; jump + wait vsync
.def DL_JUMP = $1 ; jump
.def PFSIZE_DISABLED = 0
.def PFSIZE_NARROW = 1
.def PFSIZE_NORMAL = 2
.def PFSIZE_WIDE = 3
.def GRACTL_PDMA = 1<<1
.def GRACTL_MDMA = 1<<0