-
Notifications
You must be signed in to change notification settings - Fork 0
/
i.s
312 lines (251 loc) · 5.57 KB
/
i.s
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
overscan:equ 0
; Double Megadistorter by Gunstick (c) ULM 1990
; we know! it's long, but it works ! And it's from ULM !!!
parallax equ 0
parallay equ 0
bus equ 10
pea start(pc)
move.w #38,-(sp)
trap #14
addq.l #6,sp
clr.w -(sp)
trap #1
noswreset:
rts
start:
move #$2700,sr
move.l #noswreset,$46e.w
bsr waitvbl
lea $ffff8240.w,a2
lea oldpal,a3
movem.l (a2),d0-d7
movem.l d0-d7,(a3)
movem.l hwpalette,d0-d7
movem.l d0-d7,(a2)
lea $ffff8201.w,a0
movep.w 0(a0),d0
lea screenad1,a2
move.w d0,(a2)
move.l #screen,d0
add.l #255,d0
and.l #$ffff00,d0
lea screenad2,a2
move.l d0,(a2)
movea.l d0,a2
ror.l #8,d0
movep.w d0,0(a0)
move.w #0,-(sp)
move.l a2,-(sp)
move.l a2,-(sp)
move.w #5,-(sp)
trap #14
lea 12(sp),sp
move.l screenad2,d0
sub.l #160*6,d0
move.l d0,screenadr
; addi.l #8*5-64,screenadr
movea.l screenad2,a0
move.l #9999,d0
clear_loop:
clr.l (a0)+
dbra d0,clear_loop
movea.l screenad2,a0
; movem.l graphic,d6-d7
movem.l black,d6-d7
move.w #285,d2
allline:
ifne overscan
move.w #20,d1
endc
ifeq overscan
move.w #27,d1
endc
alles:
move.l d6,(a0)+
move.l d7,(a0)+
dbra d1,alles
ifeq overscan
addq.l #6,a0
endc
dbra d2,allline
pea message
move.w #9,-(sp)
trap #1
addq.w #6,sp
bsr psginit
lea oldres,a0
move.b $ffff8260.w,(a0)
bsr waitvbl
move.b #0,$ffff8260.w
move.b #18,$fffffc02.w
bsr waitvbl
move.b #26,$fffffc02.w
move.l usp,a0
move.l a0,savusp
bsr screen2
move.l savusp,a0
move.l a0,usp
move.b #20,$fffffc02.w
bsr.s waitvbl
move.b #8,$fffffc02.w
bsr.s waitvbl
move.b #2,$ffff820a.w
bsr.s waitvbl
move.b #2,$ffff820a.w
move.b oldres,$ffff8260.w
lea $ffff8201.w,a0
moveq #0,d0
move.w screenad1,d0
movep.w d0,0(a0)
lsl.l #8,d0
move.w #0,-(sp)
move.l d0,-(sp)
move.l d0,-(sp)
move.w #5,-(sp)
trap #14
lea 12(sp),sp
bsr.s psginit
lea oldpal,a0
lea $ffff8240.w,a1
movem.l (a0),d0-d7
movem.l d0-d7,(a1)
bsr.s waitvbl
move #$2300,sr
rts
savusp: ds.l 1
waitvbl:
move.b $ffff8203.w,d0
lsl.w #8,d0
lea $ffff8207.w,a0
no_vbl:
movep.w 0(a0),d1
cmp.w d0,d1
bne.s no_vbl
rts
psginit:
lea psginittab,a0
nextinit:
move.b (a0)+,d0
cmp.b #$ff,d0
beq.s initend
move.b (a0)+,d1
move.b d0,$ffff8800.w
move.b d1,$ffff8802.w
bra.s nextinit
initend:
rts
;--------------------------------------------------------
screen2:
;free d0 d1 d2 d3 d4 d5 d6 d7 a0 a1 a2 a3 a4 a5 a6 usp
move sr,-(sp)
move #$2700,sr
move.l sp,stack
; clr.b lowbyte
move.w #5000,d0
aaa dbf d0,aaa
loop:
not.w $ffff8240.w
move.b #0,$fffffa19.w ;stop timer
move.b #245,$fffffa1f.w ;244
asd equ 7
move.b #32,$fffffa07.w
move.b #0,$fffffa0b.w ;clr pending
not.w $ffff8240.w
dcb $4e71,87
move.b #asd,$fffffa19.w
btst #0,$fffffc00.w
beq no_key
move.b $fffffc02.w,d0
cmpi.b #57,d0
bne.s no_key
movea.l stack,sp
move (sp)+,sr
rts
no_key:
move.b #0,$fffffa0b.w ;clr pending
no_int:
btst #5,$fffffa0b.w
beq.s no_int
bra loop
prt:
dc.b 27,"Y",32+20,32+1," 000"
str: dc.b "0 ",0
even
psginittab:dc.b 0,$ff,1,$ff,2,$ff,3,$ff,4,$ff,5,$ff,6,0
dc.b 7,$7f,8,7,9,7,10,7,$ff,0
even
hwpalette:
dc.w $0700,$0707,$0474,$0777,$0606,$0505,$0404,$303
dc.w $777,$666,$555,$444,$333,$222,$111,$002
graphic:
dc.w $d555,$3333,$0f0f,$ff
message:
dc.b "Mfp clock detektor:",13,10,"by gunstick from U L M",13,10
dc.b "The line should move",13,10,"this way : --->",13,10
dc.b "with bytespeed",13,10,"and down one line after",13,10
dc.b "each passage on the screen.",13,10,"Some flickering if a key",13,10
dc.b "is pressed is normal",13,10,"Exit with space",13,10,13,10
dc.b "Mfp clock detektor:",13,10,"by gunstick from U L M",13,10
dc.b "The line should move",13,10,"this way : --->",13,10
dc.b "with bytespeed",13,10,"and down one line after",13,10
dc.b "each passage on the screen.",13,10,"Some flickering if a key",13,10
dc.b "is pressed is normal",13,10,"Exit with space",13,10,13,10
dc.b "Mfp clock detektor:",13,10,"by gunstick from U L M",13,10
dc.b "The line should move",13,10,"this way : --->",13,10
dc.b "with bytespeed",13,10,"and down one line after",13,10
dc.b "each passage on the screen.",13,10,"Some flickering if a key",13,10
dc.b "is pressed is normal",13,10,"Exit with space",13,10,0
even
lowbyte:
dc.b 0
hwscrolldat:
even
black:
ds.l 8
section bss
stack: ds.l 1
oldpal: ds.w 16
oldres: ds.w 1
screenad1:ds.w 1
screenad2:ds.l 1
screenadr:ds.l 1
logbase: ds.l 1 ;screen where to put scroll
tabentry:
ds.l 1 ;for hwscroll
cpybufdest:
ds.l 1 ;copy from (this+4buffers-1scroll) to (this)
shiftcnt:
ds.w 1 ;counter for shifter
count:
ds.l 1 ;for some dbf without register
nextscrn:
ds.l 1 ;points to next screenadress to be used
distcalc:
ds.w 1
distwaveptr:
ds.l 1 ;pointer in one distwave
wavetabptr:
ds.l 1 ;pointer to the next wave to be played
disttableptr:
ds.l 1 ;pointer to scrolldisttable
disttable:
ds.w 20*2 ;scrolldisttable
mdistadjustptr:
ds.l 1 ;pointer to the distorter adjust table
mdistadjust:
ds.w 300*2 ;adjusttable for the two distorters
linebuffbegin:
textptr:
ds.l 1 ;letter not completly copied into buffer (forward)
bufptr:
ds.l 1 ;pos where graphic is added in preshift 0
bufcnt:
ds.w 1 ;which one of the 26 routs to be used to copy
shift:
ds.w 1 ;which preshift to copy
buffer:
ds.l 2*26*16 ;16 shifts of the 1st line of the scrolling
linebuffend:
screen:
ds.l 8000
end