-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathddio.asm
1397 lines (1227 loc) · 22.5 KB
/
ddio.asm
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
cseg segment public 'code'
public return, newivector, restore_int
public load, save, create, open, writeF, error, READF, close
public INIT_STICKS,load_error
extrn delzw:near,main_loop:near,write_text:near
PUBLIC TEST_SND
;PUBLIC ANJOY_INIT, ANJOY_READ, ANJOY_INIT_2, ANJOY_READ_2
public hit_snd, thud_snd, linda_snd, will_snd, colaps_snd, whip_snd
public thumb_snd, splash_snd, splat_snd, bounce_snd, knife_snd, gun_snd
; when a whatsit error occurs erm
; try first error_fl and returning ?
assume cs:cseg, ds:dseg
include ddeqfile
load_error:
; ax denotes disk I should have at this point
; 0-3 for different ones
; I think ?
; 0 - main disc/cga grafix
; 1 - main disc/cga grafix
; 2 - Ega graphics disc
; 3 - Vga graphics disc
pushall
;w_f_n_sp:
;cmp byte ptr [keybd+39h],0
;je w_f_n_sp
;border 1
shl ax,1
mov si,ax
mov si,[si+offset disc_names]
mov dx,24*256
call write_text
w_f_sp:
cmp byte ptr [keybd+39h],0
jne w_f_sp
mov si,offset null_str
mov dx,24*256 ;bottom of screen.
call write_text
popall
; note after this another attempt is made to load the file
ret
return:
mov ax,seg dseg
mov ds,ax
call restore_int
IN AL, 61H ; this kills the sound effects
AND AL, 0FCH
OUT 61H, AL ;so buzzes ! dont cont after ESC
MOV SND_PTR, 0
mov ax, 2
int 16
l_shift_key equ 2ah
not_pressed:
mov ax, 4c00h
int 33
newivector: cli
push ds
push es
mov ax, dseg
mov ds, ax
xor ax, ax
mov es, ax
mov ax, es: [36]
mov ivect9_ip, ax
mov ax, es: [38]
mov ivect9_cs, ax
;mov ax, es: [36]
;mov ivect_ip, ax
;mov ax, es: [38] ;take over critical
;mov ivect_cs, ax ;error handler.
mov ax, es: [8*4]
mov ivect28_ip, ax
mov es:[0fh*4],ax
mov ax, es: [8*4+2]
mov ivect28_cs, ax
mov es:[0fh*4+2],ax
call fast_i
mov word ptr es: [36], offset scan
mov es: [38], cs
mov word ptr es: [8*4], offset timer_int
mov es: [8*4+2], cs
MOV FIREJ,1
MOV FIREK,1
mov dx,201h ; Iam sure this is wrong !
out dx,al ;leave for the moment BUT !
sti
pop es
pop ds
ret
fast_i:
mov byte ptr in_slow,0
mov al,36h
out [43h],al
mov al,0
out [40h],al
mov al,16 ;for 4 times the ints 74hz
out [40h],al ;
ret
slow_i:
mov byte ptr in_slow,1
mov al,36h
out [43h],al
xor al,al
out [40h],al
out [40h],al ;timer back to default 54ms
ret
INIT_STICKS:
CLI
MOV FIREJ,1
MOV FIREK,1
call anjoy_init
call anjoy_init_2
STI
RET
restore_int: cli
push ds
push es
mov ax, dseg
mov ds, ax
xor ax, ax
mov es, ax
mov ax, ivect9_ip
mov es: [36], ax
mov ax, ivect9_cs
mov es: [38], ax
call slow_i
mov ax, ivect28_ip ;timer int
mov es: [8*4], ax ;
mov ax, ivect28_cs ;
mov es: [8*4+2], ax ;
pop es
pop ds
sti
ret
no_call:
mov al,20h ;god knows but its in the pink book
out 20h,al ;
STI
pop ds
pop ax
no_call2: iret
timer_int:
;put timer interrupt code here (ie Second count and sfx)
push ax
push ds
MOV AX,DSEG ; SEG FRAME_COUNT
MOV DS,AX
INC FRAME_COUNT ; always count dont care speed
cmp byte ptr in_slow,1
jp_e slower
push si
MOV SI, SND_PTR
OR SI, SI
JZ END_SOUND
SOUND:
LODSW
OR AX, AX
JZ STOP_SOUND
MOV SND_PTR, SI
OUT 42H, AL
MOV AL, AH
OUT 42H, AL
JMP END_SOUND
STOP_SOUND:
IN AL, 61H
AND AL, 0FCH
OUT 61H, AL
MOV SND_PTR, 0
END_SOUND:
POP SI
mov ax,[intcount]
inc ax
mov [intcount],ax
test ax,3 ;low bits
jnz no_call
cmp nojoyflag,-1
je soddestick
push dx
push bx
push cx
mov fudlr,31
mov fudlr_2,31
MOV DX,201H
IN AL,DX ;READ THE BUTTONS (this is silly)
NOT AL
CMP AJF1,0
JNE ONAL
TEST AL,30H ;HAVE I PRESSED A BUTTON ON JOYSTICK ?
JZ ONAL ;WHEN STICK NOT ON ?
CALL ANJOY_INIT
CMP AJF2,0
JE ONAL2
CALL ANJOY_INIT_2
;RE-READ DATA FOR OTHER STICK
JMP ONAL2
ONAL: CMP AJF2,0
JNE ONAL2
TEST AL,0C0H ;HAVE I PRESSED A BUTTON ON JOYSTICK ?
JZ ONAL2 ;WHEN STICK NOT ON ?
CALL ANJOY_INIT_2
CMP AJF1,0
JE ONAL2
CALL ANJOY_INIT ;RE-READ DATA FOR OTHER STICK
ONAL2: call anjoy_read
call anjoy_read_2
shag:
pop cx
pop bx
pop dx
soddestick:
sti ;re-interruptable !
slower: pop ds
pop ax
int 0fh ; bless my soul ! there is an easier way !
iret
;Jake Sound Routines for setting up different Sound Effects !
hit_snd: mov snd_ptr, offset snd_tab_2
jmp start_sound
thud_snd: mov snd_ptr, offset snd_tab_3
jmp start_sound
linda_snd: mov snd_ptr, offset snd_tab_4
jmp start_sound
will_snd: mov snd_ptr, offset snd_tab_5
jmp start_sound
colaps_snd: mov snd_ptr, offset snd_tab_6
jmp start_sound
thumb_snd: mov snd_ptr, offset snd_tab_7
jmp start_sound
whip_snd: mov snd_ptr, offset snd_tab_8
jmp start_sound
splash_snd: mov snd_ptr, offset snd_tab_9
jmp start_sound
splat_snd: mov snd_ptr, offset snd_tab_10
jmp start_sound
bounce_snd: mov snd_ptr, offset snd_tab_11
jmp start_sound
knife_snd: mov snd_ptr, offset snd_tab_12
jmp start_sound
gun_snd: mov snd_ptr, offset snd_tab_13
jmp start_sound
TEST_SND:
MOV SND_PTR, OFFSET SND_TAB_1
START_SOUND:
CMP SND_FLAG, 0
JE NO_SOUND
MOV AL,0B6H ; init spkr timer
OUT 43H, AL
IN AL, 61H
OR AL, 3
OUT 61H, AL
RET
NO_SOUND:
MOV SND_PTR, 0
RET
try_cont:
cmp byte ptr [keybd+bx],0 ;pressed
jne no_go
sti
jmp main_loop ;oh god ( what about the bloody stack !)
; and itll get called twice !
no_go:
jmp try_back ;ie dont on release
scan:
push ax
push bx
push ds
mov ax, dseg
mov ds, ax
in al, 60h
mov bl, al
in al, 61h
or al, 80h
out 61h, al
and al, 7fh
out 61h, al
xor al, al
mov bh, al
shl bl, 1
rcl al, 1
shr bl, 1
mov [keybd + bx], al
mov al, 61h
out 20h, al
cmp bx,1 ;pressing the escape key !
je escape
;cmp bx,3 ;f2 key ?
;jne no_ch_time
;mov timer,11
;no_ch_time:
push si
mov si,cht_ptr
cmp bl,[si] ;does it equal this one ?
jne no_cheat_mde ;no so leave ptr here
inc cht_ptr
cmp si,offset endtxt
jne no_cheat_mde
mov cheat_mode,-1 ;turn it to the opposite
mov cht_ptr,offset cht_text
no_cheat_mde:
pop si
cmp bx,42h ;f8 key
jne no_reset
mov cht_ptr,offset cht_text
no_reset:
cmp bx,43h ;f9 key
jne no_reset_cht
mov cheat_mode,0 ;put to no cheat
no_reset_cht:
try_back:
CMP BX,FIRE_K
JNE NF1
MOV FIREK,AL ;STORE THE REAL FIRE KEY
NF1:
CMP BX,FIRE_J
JNE NF2
MOV FIREJ,AL ;STORE THE REAL FIRE KEY
NF2:
pop ds
pop bx
pop ax
sti
iret
escape:
sti ;
jmp return
loadit:
mov errfl,0 ;zero the error variable
push nojoyflag
mov nojoyflag,-1 ;kill sticks ?
call open
;border 8
call READF
;border 9
call close
pop nojoyflag
ret
save:
mov errfl,0 ;zero the error variable
call create
call writeF
call close
ret
create:
mov dx, file_name
xor cx, cx
mov al, 2
mov ah, 3ch ; function 3c - create file
int 33
jc error
mov handle, ax
ret
; open a file for READFing
open:
mov ah,13
int 21h
mov dx, file_name
xor al, al
mov ah, 3dh ; function 3d - open file
int 33
jc error
mov handle, ax
ret
; write to file
writeF:
mov ax, start_seg
mov bx, handle
mov cx, len
mov dx, start_offset
push ds
mov ds, ax
mov ah, 40h ; function 40 - write file
int 33
pop ds
jc error
ret
; flag error
flg_error: ;assumes dseg is set correct at this point.
mov errfl,-1
ret ;returns as before!
; print up the error message
error:
; grief what state is the stack in at this point !!!
; restore what we can !!!
; ???????????????
; let other rout sort this out.
; this is going to be problematical
; hmmm.
jmp word ptr [error_rout]
div_err:
call restore_int
mov ax,2
int 16 ;change mode before exit.
int 0 ;exit with divide overflow (v.tacky or what)
mov ax, 4c00h
int 33
; read a file
READF:
mov ah,13
int 21h
jc error ;will it help
mov ax, start_seg
mov bx, handle
mov cx, 0ffffh
mov dx, start_offset
push ds
mov ds, ax
mov ah, 3fh ; function 3f - read file
int 33
pop ds
jc error
ret
close:
mov bx, handle
mov ah, 3eh ; function 3e - close file
int 33
jc error
ret
load:
pushall
call slow_i
;de_vice:
push es
push ds
push start_seg
push start_offset
mov start_offset,0
mov ax,buff_seg
mov start_seg,ax
;border 15
call loadit ;loads into normal space ?
;border 12
pop di ;start_offset
pop es ;start_seg
cmp errfl,0
jne error_on_load
xor si,si
mov ax,start_seg
mov ds,ax
call delzw ;decompress from DS:SI to ES:DI
error_on_load:
pop ds
pop es
sub cx,di ;well ya never know !
mov len,cx
call fast_i
popall ;this is just so fucking rediculous
ret
;ASSUME NO STICK BUT WHEN A BUTTON IS PRESSED INITIATE THE JOYSTICK
;The Tandy joystick routines from Jake
no_stcks:
ret
ANJOY_START:
cmp nojoyflag,-1
jp_e no_stcks
;CLI ; NOTE !!!
MOV DX, 201H
OUT DX, AL
NOP
NOP
MOV BX, 0
MOV CX, 0
AJS_ALP:
IN AL, DX
INC BX
INC CX
TEST AL, 1
JZ AJS_YLP_A
TEST AL, 2
JZ AJS_XLP_A
CMP CX, 1000
JL AJS_ALP
JMP AJS_TO ; for time-out
AJS_XLP:
; Y done - just count x
IN AL, DX
INC BX
NOP
NOP
NOP ; adjust timing
NOP
NOP
CMP BX, 1000 ;0 ; for time-out
JGE AJS_TO
AJS_XLP_A:
TEST AL, 1
JNZ AJS_XLP
;STI
RET
AJS_YLP:
; X done - just count y
IN AL, DX
INC CX
NOP
NOP
NOP
NOP
NOP
CMP CX, 1000 ;0
JGE AJS_TO
AJS_YLP_A:
TEST AL, 2
JNZ AJS_YLP
;STI
RET
AJS_TO:
; time-out SHOULDNT IT MAKE THE JOY FLAG FALSE ?
MOV AJF1, 0 ; F
;STI
RET
ANJOY_INIT:
cmp nojoyflag,-1
jp_e no_stcks
MOV AJF1,1
CALL ANJOY_START
CMP AJF1, 0
JE E_AJI
MOV AJXO1, BX ; x-origin
MOV AJXN1, BX
SHR BX, 1 ; calc x-nullzone
SUB AJXN1, BX
MOV AJYO1, CX ; Y-origin
MOV AJYN1, CX
SHR CX, 1
SUB AJYN1, CX ; Y-nullzone
E_AJI:
RET
ANJOY_READ:
cmp nojoyflag,-1
jp_e no_stcks
MOV FUDLR_2,31
CMP AJF1, 0
JE E_ANJR1
CALL ANJOY_START
CMP AJF1, 0
JE E_ANJR1
MOV DL,FIREJ
MOV KEYBD+FIRE_J,DL
MOV DL,0
NOT AL
TEST AL,030H ; both buttons
JZ N_ANJF1
MOV BYTE PTR KEYBD+FIRE_J,0 ;changed
N_ANJF1:
SUB BX, AJXO1
MOV AX, AJXN1
CMP BX, AX
JL N_R1
OR DL, 1 ; R bit
N_R1:
NEG AX
CMP BX, AX
JG N_L1
OR DL, 2 ; L bit
N_L1:
SUB CX, AJYO1
MOV AX, AJYN1
CMP CX, AX
JL N_D1
OR DL, 4 ; D bit
N_D1:
NEG AX
CMP CX, AX
JG N_U1
OR DL, 8 ; U bit
N_U1:
XOR DL,31
MOV FUDLR_2, DL
E_ANJR1: RET
ANJOY_START_2:
cmp nojoyflag,-1
jp_e no_stcks
;CLI ; NOTE !!!
MOV DX, 201H
OUT DX, AL
NOP
NOP
MOV BX, 0
MOV CX, 0
AJS2_ALP:
IN AL,DX
INC BX
INC CX
TEST AL, 4
JZ AJS2_YLP_A
TEST AL, 8
JZ AJS2_XLP_A
CMP CX, 1000
JL AJS2_ALP
JMP AJS2_TO ; for time-out
AJS2_XLP:
; Y done - just count x
IN AL, DX
INC BX
NOP
NOP
NOP ; adjust timing
NOP
NOP
CMP BX, 1000 ;0 ; for time-out
JGE AJS2_TO
AJS2_XLP_A:
TEST AL, 4
JNZ AJS2_XLP
;STI no need off already !
RET
AJS2_YLP:
; X done - just count y
IN AL, DX
INC CX
NOP
NOP
NOP
NOP
NOP
CMP CX, 1000 ;0
JGE AJS2_TO
AJS2_YLP_A:
TEST AL, 8
JNZ AJS2_YLP
;STI
RET
AJS2_TO: ; time-out
MOV AJF2, 0 ; F
;STI
RET
ANJOY_INIT_2:
cmp nojoyflag,-1
jp_e no_stcks
MOV AJF2,1 ;ASSUME JOYSTICK PRESENT
CALL ANJOY_START_2
CMP AJF2, 0
JE E_AJI2
MOV AJXO2, BX ; x-origin
MOV AJXN2, BX
SHR BX, 1 ; calc x-nullzone
SUB AJXN2, BX
MOV AJYO2, CX ; Y-origin
MOV AJYN2, CX
SHR CX, 1
SUB AJYN2, CX ; Y-nullzone
E_AJI2:
RET
ANJOY_READ_2:
cmp nojoyflag,-1
jp_e no_stcks
MOV FUDLR,31 ;changed
CMP AJF2, 0
JE E_ANJR2
CALL ANJOY_START_2
CMP AJF2, 0
JE E_ANJR2
MOV DL,FIREK
MOV KEYBD+FIRE_K,DL
MOV DL, 0
NOT AL
TEST AL, 0C0H ; both buttons
JZ N_ANJF2
MOV BYTE PTR KEYBD+FIRE_K,0
N_ANJF2:
SUB BX, AJXO2
MOV AX, AJXN2
CMP BX, AX
JL N_R2
OR DL, 1 ; R bit
N_R2:
NEG AX
CMP BX, AX
JG N_L2
OR DL, 2 ; L bit
N_L2:
SUB CX, AJYO2
MOV AX, AJYN2
CMP CX, AX
JL N_D2
OR DL, 4 ; D bit
N_D2:
NEG AX
CMP CX, AX
JG N_U2
OR DL, 8 ; U bit
N_U2:
XOR DL,31
MOV FUDLR, DL ;changed
E_ANJR2:
RET
cseg ends
dseg segment public 'data'
public keybd, start_seg, start_offset, len, file_name, handle
PUBLIC INTCOUNT,frame_count
PUBLIC FUDLR, FUDLR_2, SND_PTR, SND_FLAG
PUBLIC AJF1, AJF2,error_rout,errfl,cheat_mode
;extrn dum_ptr:dword
extrn nojoyflag:word,timer:word
cheat_mode dw 0 ;off for the moment.
ivect9_ip dw 0
ivect9_cs dw 0
ivect28_ip dw 0
ivect28_cs dw 0
intcount dw 0
frame_count dw 0
error_rout dw offset flg_error ;div_err
; jmps short via this for a disc loading error
keybd db 128 dup (1)
cht_ptr dw offset cht_text ;start at the beginning
; reset pointer by pressing f8
cht_text db 16h; u whats the text ????
db 26h ;l
db 14h ;t
db 13h ;r
db 1eh ;a
db 2fh ;v
db 17h ;i
db 18h ;o
db 26h ;l
db 12h ;e
db 31h ;n
db 2eh ;c
endtxt db 12h ;e
; 13 letters once done we can cheat ! 1-5 works and enemy has low energy.
; lets try ultraviolence
errfl dw 0
start_seg dw 0
start_offset dw 0
len dw 0
file_name dw 0
handle dw 0
in_slow db 1
AJF1 DB 0 ;F
AJXO1 DW 0
AJYO1 DW 0
AJXN1 DW 0
AJYN1 DW 0
AJF2 DB 0 ;F
AJXO2 DW 0
AJYO2 DW 0
AJXN2 DW 0
AJYN2 DW 0
SND_PTR DW 0
SND_FLAG DW -1 ; T
FUDLR DB 0
FUDLR_2 DB 0
LKEY DB 0
FIREK DB 1
FIREJ DB 1
snd_tab_1 dw 0
snd_tab_2 dw 1000, 2000, 4000, 6000, 5000, 8000, 7500, 9000, 11000
dw 9000, 12000, 18000, 15000, 20000, 17000, 23000
dw 0
snd_tab_3 dw 5000, 8000, 12000, 6000, 9000, 13000, 7000, 10000
dw 15000, 8000, 11000, 16000, 13000, 9000, 17000, 14000
dw 15500, 19000, 20000, 18500, 23000, 27000, 31000
dw 0
snd_tab_4 dw 1000, 950, 900, 850, 800, 700, 600, 450, 300, 200
dw 90, 250, 400, 650, 900, 1100, 1300, 1600, 1900, 2200
dw 2500, 3200, 4000, 4100, 4200, 4300, 4400
dw 0
snd_tab_5 dw 5000, 5400, 4900, 5300, 4800, 5200, 4600, 5000
dw 4600, 4900, 4600, 4800, 4800, 5200, 4900, 5300
dw 5000, 5400, 5100, 5500, 5300, 5600, 5500, 5700
dw 0
snd_tab_6 dw 4000, 4500, 4100, 4600, 4300, 4800, 4300, 4800, 4200, 4700
dw 4400, 4900, 4500, 5000, 4600, 5100, 4600, 5100, 4500, 5000
dw 4400, 4900, 4500, 5000, 4800, 5300, 5000, 5500, 5200, 5700
dw 5500, 5500, 5600, 6100, 5700, 6200, 5700, 6200, 5600, 6100
dw 5500, 6000, 5600, 6100, 5700, 6200, 5900, 6400, 6000, 6500
dw 6000, 6500, 6200, 6700, 6500, 7000, 6600, 7100, 6600, 7100
dw 0
snd_tab_7 dw 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000
dw 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000
dw 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000
dw 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000
dw 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000, 1000
dw 0
snd_tab_8 dw 4000, 8000, 3500, 7500, 2700, 6700, 2000, 6000
dw 2000, 6000, 2500, 6500, 3000, 7000, 3900, 7900
dw 4500, 8500, 5000, 9000, 5500, 9500, 6000, 10000
dw 6500, 10500, 7000, 11000, 7500, 11500, 8000, 12000
dw 0
snd_tab_9 dw 1000, 6000, 300, 9000, 5000, 12000, 1500, 5000, 400
dw 1500, 7000, 9000, 4000, 4600, 3000, 13000, 8000, 7000
dw 15000, 11000, 2300, 6700, 3000, 12000, 7000, 6000, 760
dw 3000, 4000, 8000, 11000, 800, 9000, 11500, 3500, 7500
dw 11300, 15500, 9500, 5500, 6789, 9999, 13000, 7500
dw 0
snd_tab_10 dw 8000, 12000, 8000, 8000, 12000, 8000, 12000, 8000
dw 12000, 8000, 12000, 8000, 12000
dw 0
snd_tab_11 dw 1000, 8000, 8600, 8100, 9000, 8800, 8500, 9500, 9000
dw 10000, 9400, 9900, 10200, 10700, 9800, 11050, 10600
dw 12000, 11300, 11700, 13000, 11200, 11900, 12600, 13200
dw 12800, 13400, 12900, 13300, 13700, 13400, 13900, 14000
dw 13800, 14200, 14450, 13960, 14800, 15300, 14300, 14850
dw 15200, 14950, 14300, 15500, 15000, 15350, 15400, 15600
dw 16200, 16000, 15900, 16600, 16900, 17000, 16700, 17300
dw 0
snd_tab_12 dw 12000, 2000, 800, 700, 710, 700, 710, 700, 710, 700
dw 710, 700, 710, 700, 710, 700, 710, 700, 710, 700
dw 0
snd_tab_13 dw 3000, 5000, 12000
dw 0
null_str db 39 dup (32),0
disc_names dw offset main_str
dw offset main_str
dw offset ega_str
dw offset vga_str
main_str db " Insert Main disc . Then Press Space .",0
ega_str db " Insert EGA disc . Then Press Space .",0
vga_str db " Insert VGA disc . Then Press Space .",0
dseg ends
buff_seg segment para public 'DATA'
;db 4096 dup (?) ;why is there an extra 4096 bytes here !
; ; there is about 30k in this area anyway !
buff_seg ends
end
cseg segment public 'code'
public return, newivector, restore_int
public load, save, create, open, writeF, error, READF, close
public de_vice,INIT_STICKS
extrn delzw:near
PUBLIC TEST_SND
;PUBLIC ANJOY_INIT, ANJOY_READ, ANJOY_INIT_2, ANJOY_READ_2
public hit_snd, thud_snd, linda_snd, will_snd, colaps_snd, whip_snd
public thumb_snd, splash_snd, splat_snd, bounce_snd, knife_snd, gun_snd
assume cs:cseg, ds:dseg
include ddeqfile
include c:\masm\macross.asm
return: call restore_int
mov ax, 2
int 16
mov ax, 4c00h
int 33
newivector: cli
push ds
push es
mov ax, dseg
mov ds, ax
xor ax, ax
mov es, ax
mov ax, es: [36]
mov ivect9_ip, ax
mov ax, es: [38]
mov ivect9_cs, ax
mov ax, es: [28*4]
mov es:[0fh*4],ax
mov ivect28_ip, ax
mov ax, es: [28*4+2]
mov es:[0fh*4+2],ax
mov ivect28_cs, ax
call fast_i
mov word ptr es: [36], offset scan
mov es: [38], cs
mov word ptr es: [28*4], offset timer_int
mov es: [28*4+2], cs
MOV FIREJ,1
MOV FIREK,1
mov dx,201h
out dx,al
sti
pop es
pop ds
ret