-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSNDCMN.MAC
204 lines (194 loc) · 5 KB
/
SNDCMN.MAC
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
.SBTTL SNDCMN
.SBTTL DOCUMENTATION
.ENABLE AMA
.CSECT
.RADIX 16
.LIST MEB
.NLIST BYTE
;========================= STAR WARS =========================
;
; Copyright 1983 ATARI. Unauthorized reproduction, adapta-
; tion, distribution, performance or display of this computer
; program or the associated audiovisual work is strictly pro-
; hibited.
;
;DATE INITIATED: JAN 83 (STAR WARS OVERFLOW)
;
;PROJECT CHARGE: 279XX
;
;HARDWARE:
; AUX SOUND BOARD HAS
; 6809
; FOUR POKEYS
; VIBRATO/AMBIENCE SUPER STEREO
; SPEECH CHIP
;
;LINK COMMAND STRING:
.COPY SNDAUX.LNK ;<<<<<<<<<<<
;
;============================================================
.PAGE
;---
;DATA BIT CONSTANTS
BT0=1
BT1=2
BT2=4
BT3=8
BT4=10
BT5=20
BT6=40
BT7=80
;---
;
;STAR WARS SOUND BOARD SPEECH TEST PROGRAM
;
;ENGINEER: JED MARGOLIN
;DATE: 2/4/83
;
;
;MEMORY MAP FOR STAR WARS SOUND BOARD
;A15 IS A DON'T CARE, SO ALL ADDRESSES ARE DOUBLE MAPPED
;
;SOUT W 0000 WRITE SOUND DATA LATCH TO BE READ BY MAIN
; PROCESSOR (SETS SOUND FLAG)
;SIN R 0800 READ MAIN DATA LATCH, WRITTEN BY MAIN PROCESSOR
; (RESETS MAIN FLAG)
;PRAM R/W 1000-107F 6532 RAM, 128 BYTES
;PAD R/W 1080 6532, PORT A, DATA
; PA0 OUT WS-NOT, SPEECH SYNTHESIZER WRITE STROBE
; PA1 OUT RS-NOT, SPEECH SYNTHESIZER READ STROBE
; PA2 IN RDY-NOT,SPEECH SYNTHESIZER READY FLAG
; PA3 OUT FM-NOT, FM CONTROL FOR SHIFT REGISTER CLOCK
; PA4 IN SOUND BOARD DIAGNOSTIC SWITCH, 1=OFF
; PA5 OUT POWER CONTROL FOR 5220, 1=OFF
; PA6 IN SOUNDFLAG, A 1 MEANS THE MAIN PROCESSOR HAS
; NOT READ THE DATA LATCH WRITTEN INTO BY THE
; SOUND PROCESSOR
; PA7 IN MAINFLAG, A 1 MEANS THE MAIN PROCESSOR HAS
; WRITTEN INTO ITS DATA LATCH WHICH IS NOW
; READY TO BE READ BY THE SOUND PROCESSOR
;PADD R/W 1081 6532, PORT A, DIRECTION
;PBD R/W 1082 6532, PORT B, DATA (SPEECH DATA)
;PBDD R/W 1083 6532, PORT B, DIRECTION
;DINED W 1084 6532, DISABLE PA7 INTERRUPTS, NEGATIVE EDGE DETECT
;DIPED W 1085 6532, DISABLE PA7 INTERRUPTS, POSITIVE EDGE DETECTS
;EINED W 1086 6532, ENABLE PA7 INTERRUPTS, NEGATIVE EDGE DETECTS
;EIPED W 1087 6532, ENABLE PA7 INTERRUPTS, POSITIVE EDGE DETECTS
;RTDI R 1084 6532, READ TIMER, DISABLE TIMER INTERRUPT
;RTEI R 108C 6532, READ TIMER, ENABLE TIMER INTERRUPT
;RIF R 1085 6532, READ INTERRUPT FLAG, D7=TIMER FLAG, D6=PA7 FLAG
; , RESETS PA7 FLAG
;D1T W 1094 6532, WRITE TO TIMER 1T, DISABLE TIMER INTERRUPT
;D8T W 1095 6532, WRITE TO TIMER 8T, DISABLE TIMER INTERRUPT
;D64T W 1096 6532, WRITE TO TIMER 64T, DISABLE TIMER INTERRUPT
;D1024T W 1097 6532, WRITE TO TIMER 1024T, DISABLE TIMER INTERRUPT
;E1T W 109C 6532, WRITE TO TIMER 1T, ENABLE TIMER INTERRUPT
;E8T W 109D 6532, WRITE TO TIMER 8T, ENABLE TIMER INTERRUPT
;E64T W 109E 6532, WRITE TO TIMER 64T, ENABLE TIMER INTERRUPT
;E1024T W 109F 6532, WRITE TO TIMER 1024T, ENABLE TIMER INTERRUPT
;
;1800-1807 R/W POKEY0 0-7
;1808-180F R/W POKEY1 0-7
;1810-1817 R/W POKEY2 0-7
;1818-181F R/W POKEY3 0-7
;
;1820-1827 R/W POKEY0 8-F
;1828-182F R/W POKEY1 8-F
;1830-1837 R/W POKEY2 8-F
;1838-183F R/W POKEY3 8-F
;
;
;2000-27FF R/W RAM (2K)
;
;
;4000-7FFF W ROM (16K)
;
;
;
SOUT =0000
SIN =0800
;
;
;6532 ADDRESSES
PAD =1080
PADD =1081
PBD =1082
PBDD =1083
DINED =1084
DIPED =1085
EINED =1086
EIPED =1087
RTDI =1084
RTEI =108C
RIF =1085
TESTSW ==PAD
TESTBT ==10
;
D1T =1094
D8T =1095
D64T =1096
D1024T =1097
;
E1T =109C
E8T =109D
E64T =109E
E1024T =109F
;
PROG ==4000
ROM0 ==PROG
ROM1 ==PROG+2000
DPRAM ==1000 ;DPAGE IN 6532 FOR FAST INT PROCESSING
DPRAMZ ==1080
RAM ==2000
TSTRAM ==2000 ;TEST RAM IN LOWEST PAGE
AUDRAM ==2100 ;AUDIO RAM
PMRAM ==2200 ;POKEY MUSIC RAM
SPKRAM ==2300 ;SPEECH RAM
RAMZ ==2800
;===
.DPAGE DPRAM/100 ;EVERYONE USES DPRAM FOR D-PAGE
;===
.SBTTL MACROS
;===
.MACRO .ARRAY A1,A2,A3
.IF NB,<'A3'>
'A1''A2'=<'A3'>
.ENDC
.ARRAZ='A1''A2'
.ENDM
.MACRO .ARRAG A1,A2,A3
.IF NB,<'A3'>
'A1''A2'==<'A3'> ;GLOBAL
.ENDC
.ARRAZ='A1''A2'
.ENDM
.MACRO .PAGEG A1
HLL69F ;CHECK FOR PROPER STRUCTURE
.PAGE
.PAGES=.PAGES+1
.ARRAG .PG'A1',\.PAGES,.
.ENDM
.PAGES=2 ;CURRENT PAGE NUMBER
;===
;TEMPORARY D-PAGE
.MACRO TEMP .A,.B .C,.D .E,.F .G,.H
TEMP0=1 ;START OF TEMP ARRAY
.IIF NB,.A,TEMPDO .A,.B
.IIF NB,.C,TEMPDO .C,.D
.IIF NB,.E,TEMPDO .E,.F
.IIF NB,.G,TEMPDO .G,.H
.IIF GT,TEMP0-9.,.ERROR TEMP0 ;TEMP0 OVERFLOW, 8 BYTE MAX
.ENDM
.MACRO TEMPDO .A,.B
TMP'.A=TEMP0
TEMP0=TEMP0+'.B
.ENDM
;===
;INCLUDE HLL69F,MOP69 BUT DON'T LIST THEM
.NLIST
.INCLUDE HLL69F ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
.INCLUDE MOP69 ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
.LIST
;===
.PAGE