home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Supremacy 2
/
Supremacy-2.iso
/
Automation
/
A_199.ST
/
GHOST.DEG
< prev
next >
Wrap
Text File
|
1985-11-20
|
11KB
|
691 lines
opt c+,d-
;SET TABS TO 10 FOR DISASSEMBLY
CHEAT CLR.L -(A7)
MOVE.W #$20,-(A7)
TRAP #$01
ADDQ.L #6,A7
lea $80000,a7
clr.w -(sp)
pea $78000
move.l (a7),-(sp)
move.w #5,-(sp)
trap #14
lea $c(a7),a7
pea text
move.w #9,-(sp)
trap #1
lea dr(pc),a0
lea $6a000,a1
bsr DEPACK
lea $1000.w,a0
lea DEPACK(pc),a1
move.l #$100,d0
xxx move.l (a1)+,(a0)+
dbf d0,xxx
bsr main
jmp $6a000
DEPACK adda.l #4,a0
move.w $ffff8240.w,-(sp)
move.l a0,$a0.w
move.l (a0)+,d5
adda.l d5,a1
adda.l (a0),a0
subq.l #4,a0
tst.w -(a0)
bpl.s L_1
subq.l #1,a0
L_1 move.b -(a0),d0
L_2 lsl.b #1,d0
bne.s L_3
MOVE.B -(A0),D0
ROXL.B #1,D0
L_3 BCC.S L_10
CLR.W D1
LSL.B #1,D0
BNE.S L_4
MOVE.B -(A0),D0
ROXL.B #1,D0
L_4 BCC.S L_9
LEA NUMS(PC),A3
MOVEQ #3,D3
L_5 CLR.W D1
MOVE.B 0(A3,D3.W),D2
EXT.W D2
MOVEQ #-1,D4
LSL.W D2,D4
NOT.W D4
SUBQ.W #1,D2
L_6 LSL.B #1,D0
BNE.S L_7
MOVE.B -(A0),D0
ROXL.B #1,D0
L_7 ROXL.W #1,D1
DBF D2,L_6
TST.W D3
BEQ.S L_8
CMP.W D1,D4
DBNE D3,L_5
L_8 MOVE.B 4(A3,D3.W),D2
EXT.W D2
ADD.W D2,D1
BRA L_9
NUMS DC.B $0A,$03,$02,$02,$0E,$07,$04,$01
L_9 MOVE.B -(A0),-(A1)
MOVE.W d0,$FFFF8240.w
DBF D1,L_9
L_10 MOVE.L $a0.w,A3
ADDQ.L #$8,A3
CMPA.L A3,A0
BLE BYENOW
LEA NUMS2(PC),A3
MOVEQ #3,D2
L_11 LSL.B #1,D0
BNE.S L_12
MOVE.B -(A0),D0
ROXL.B #1,D0
L_12 BCC.S L_13
DBF D2,L_11
L_13 CLR.W D1
ADDQ.W #1,D2
MOVE.B 0(A3,D2.W),D3
BEQ.S L_16
EXT.W D3
SUBQ.W #1,D3
L_14 LSL.B #1,D0
BNE.S L_15
MOVE.B -(A0),D0
ROXL.B #1,D0
L_15 ROXL.W #1,D1
DBF D3,L_14
L_16 MOVE.B 5(A3,D2.W),D3
EXT.W D3
ADD.W D3,D1
BRA L_161
NUMS2 DC.B $0A,$02,$01,$00,$00,$0A,$06,$04,$03,$02
L_161 CMPI.W #2,D1
BEQ.S L_22
LEA NUMS3(PC),A3
MOVEQ #1,D3
L_17 LSL.B #1,D0
BNE.S L_18
MOVE.B -(A0),D0
ROXL.B #1,D0
L_18 BCC.S L_19
DBF D3,L_17
L_19 ADDQ.W #1,D3
CLR.W D2
MOVE.B 0(A3,D3.W),D4
EXT.W D4
L_20 LSL.B #1,D0
BNE.S L_21
MOVE.B -(A0),D0
ROXL.B #1,D0
L_21 ROXL.W #1,D2
DBF D4,L_20
LSL.W #1,D3
ADD.W 4(A3,D3.W),D2
BRA.S L_26
NUMS3 DC.B $0B,$04,$07,$00,$01,$20,$00,$00
DC.B $00,$20,$00,$00
L_22 CLR.W D2
MOVEQ #5,D3
CLR.W D4
LSL.b #1,D0
BNE.S L_23
MOVE.B -(A0),D0
ROXL.B #1,D0
L_23 BCC.S L_24
MOVEQ #8,D3
MOVEQ #$40,D4
L_24 LSL.B #1,D0
BNE.S L_25
MOVE.B -(A0),D0
ROXL.B #1,D0
L_25 ROXL.W #1,D2
DBF D3,L_24
ADD.W D4,D2
L_26 LEA 0(A1,D2.W),A2
EXT.L D1
ADDA.L D1,A2
SUBQ.W #1,D1
L_27 MOVE.B -(A2),-(A1)
DBF D1,L_27
BRA L_2
BYENOW move.w (a7)+,$ffff8240.w
RTS
main lea wedge(pc),a0
lea $7e0d0,a1
move.w #$4e75,$7e0c2
move.w #(wedend-wedge),d0
.loop move.b (a0)+,(a1)+
dbf d0,.loop
rts
wedge movem.l d0-d7/a0-a6,-(a7)
BUFF1 EQU $55480 ;bmap tables?
BUFF2 EQU $55a80 ;name table?
BUFF3 EQU $1400 ;sector list table?
emload MOVE.L $1090c,-(A7)
BSR MAIN1 ;SETUP DIRECTORY TABLES, BUFF 3 IN USE!
moveq.l #$c,d0
lea $200.w,a0
xxg move.b #$20,(a0)+
dbf d0,xxg
move.l (a7)+,a0
lea $200.w,a1
xxc move.b (a0)+,(a1)+
cmp.b #$2e,(a0)
bne.s xxc
tst.b (a0)+
move.b (a0)+,$208.w
move.b (a0)+,$209.w
move.b (a0),$20a.w
move.l $10908,a6
MOVE.L A6,-(A7)
MOVE.L A6,A5 ;POS IN A5
lea $200.w,a6 ;NAME IN A6
BSR MAIN2 ;CALL LOADER
MOVE.L (A7)+,A1
move.l a5,d0
sub.l a1,d0
copydown move.l a1,a0 ;a1 = load position
lea -$40(a1),a2 ;copy to buffer
lea buffer(pc),a3
moveq.w #$3f,d1
.loop move.b (a2)+,(a3)+
dbf d1,.loop
datadown lea -$40(a1),a2 ;copy packed data down
.loop move.b (a0)+,(a2)+ ;20 bytes
dbf d0,.loop
sub.l #$10000,d0
bpl.s .loop
lea -$40(a1),a0
move.l a1,-(sp)
jsr $1000.w
move.l (a7)+,a1 ;depack
repair lea buffer(pc),a0 ;repair buffer
lea -$40(a1),a1
moveq.w #$3f,d0
.loop move.b (a0)+,(a1)+
dbf d0,.loop
movem.l (a7)+,d0-d7/a0-a6
clr.l d0
rts
buffer ds.b 64
EVEN
VAR3 DC.B $ff
VAR19 DC.B 0
VAR1 DC.B 0
VAR12 DC.B 0
VAR31 DC.B 0
VAR8 DC.B $1
VAR18 DC.B 0
VAR10 DC.B $a
VAR16 DC.W $1
VAR13 DC.B 0
VAR9 DC.B $5
VAR14 DC.B 0
VAR11 DC.B $7
VAR15 DC.W $187
MAIN1 LEA VAR1(PC),A0
ST (A0)
LEA VAR2(PC),A0
CLR.W (A0)
BSR SUB1
BSR SUB2
BSR SUB3
TST.W D0
BMI JMP1
LEA VAR3(PC),A0
TST.B (A0)
BEQ JMP2
LEA VAR4(PC),A0
CLR.W (A0)
LEA VAR5(PC),A0
MOVE.L #BUFF1,(A0)
LEA VAR6(PC),A0
MOVE.W #1,(A0)
LEA VAR7(PC),A0
MOVE.W #1,(A0)
BSR SUB4
TST.W D0
BMI JMP1
LEA BUFF1,A5
LEA VAR8(PC),A0
MOVE.B $1A(A5),(A0)
SUBQ.B #1,(A0)
LEA VAR9(PC),A0
MOVE.B $16(A5),(A0)
LEA VAR10(PC),A0
MOVE.B $18(A5),(A0)
MOVE.B $11(A5),D0
LSR.B #4,D0
LEA VAR11(PC),A0
MOVE.B D0,(A0)
LEA VAR12(PC),A0
MOVE.B #1,(A0)
MOVE.B $14(A5),D0
LSL.W #8,D0
MOVE.B $13(A5),D0
MOVE.W VAR13(PC),D1
ADD.W D1,D1
ADD.W VAR14(PC),D1
ADDQ.W #1,D1
SUB.W D1,D0
LSR.W #1,D0
LEA VAR15(PC),A0
MOVE.W D0,(A0)
JMP2 LEA BUFF3,A3
LEA BUFF1,A5
MOVE.W VAR16(PC),D0
MOVE.W VAR13(PC),D1
SUBQ.W #1,D1
MOVE.W VAR18(PC),D3
DBF1 MOVE.W D0,D2
EXT.L D2
DIVU D3,D2
MOVE.B D2,(A3)+
SWAP D2
ADDQ.B #1,D2
MOVE.B D2,(A3)+
ADDQ.W #1,D0
DBF D1,DBF1
MOVE.B #$FF,(A3)+
BSR SUB5
TST.W D0
BMI JMP1
LEA BUFF3,A3
LEA BUFF2,A5
MOVE.W VAR16(PC),D0
MOVE.W VAR13(PC),D1
ADD.W D1,D1
ADD.W D1,D0
MOVE.W VAR14(PC),D1
SUBQ.W #1,D1
MOVE.W VAR18(PC),D3
DBF2 MOVE.W D0,D2
EXT.L D2
DIVU D3,D2
MOVE.B D2,(A3)+
SWAP D2
ADDQ.B #1,D2
MOVE.B D2,(A3)+
ADDQ.W #1,D0
DBF D1,DBF2
MOVE.B #$FF,(A3)+
BSR SUB5
TST.W D0
BMI JMP1
BSR SUB1
LEA VAR1(PC),A0
SF (A0)
BRA JMP5
JMP1 LEA BUFF1,A0
MOVE.W VAR13(PC),D0
ADD.W VAR14(PC),D0
LSL.W #7,D0
SUBQ.W #1,D0
MOVE.L #$45525252,D1
DBF3 MOVE.L D1,(A0)+
DBF D0,DBF3
RTS
MAIN2 BSR SUB10
BPL JMP4
MOVE.W #$2700,SR
COLS ADDI.W #1,$FffF8240.w
BRA.S COLS
JMP4 MOVE.W D1,-(A7)
LEA VAR2(PC),A0
CLR.W (A0)
BSR SUB2
MOVE.W (A7)+,D1
LEA BUFF3,A3
JMP3 MOVE.W VAR18(PC),D3
MOVE.W D1,D2
SUBQ.W #2,D2
ADD.W D2,D2
ADD.W VAR13(PC),D2
ADD.W VAR13(PC),D2
ADD.W VAR14(PC),D2
ADDQ.W #1,D2
EXT.L D2
MOVEA.L D2,A4
DIVU D3,D2
MOVE.B D2,(A3)+
SWAP D2
ADDQ.B #1,D2
MOVE.B D2,(A3)+
MOVE.L A4,D2
ADDQ.L #1,D2
DIVU D3,D2
MOVE.B D2,(A3)+
SWAP D2
ADDQ.B #1,D2
MOVE.B D2,(A3)+
LEA BUFF1,A4
BTST #0,D1
BNE JMP8
MOVE.W D1,D2
LSR.W #1,D1
ADD.W D2,D1
MOVE.B 1(A4,D1.W),D2
LSL.W #8,D2
MOVE.B 0(A4,D1.W),D2
ANDI.W #$FFF,D2
BRA JMP6
JMP8 MOVE.W D1,D2
LSR.W #1,D1
ADD.W D2,D1
MOVE.B 1(A4,D1.W),D2
LSL.W #8,D2
MOVE.B 0(A4,D1.W),D2
LSR.W #4,D2
ANDI.W #$FFF,D2
JMP6 CMP.W #$FF0,D2
BCC JMP12
MOVE.W D2,D1
BRA.S JMP3
JMP12 MOVE.B #$FF,(A3)
BSR SUB5
BSR SUB1
JMP5 LEA VAR19(PC),A0
MOVE.B #$64,(A0)
RTS
SUB5 LEA BUFF3,A3
JMP10 MOVEQ #0,D0
MOVE.B (A3)+,D1
CMP.B #$FF,D1
BEQ JMP9
MOVE.B (A3)+,D2
MOVE.B D2,D5
LEA VAR12(PC),A0
TST.B (A0)
BEQ JMP13
MOVE.B #$FF,D5
JMP13 ADDQ.W #1,D0
ADDQ.B #1,D5
MOVE.B (A3)+,D3
CMP.B #$FF,D3
BEQ JMP14
CMP.B D1,D3
BNE JMP14
MOVE.B (A3)+,D4
CMP.B D5,D4
BEQ.S JMP13
SUBQ.L #1,A3
JMP14 SUBQ.L #1,A3
ANDI.W #$FF,D1
ANDI.W #$FF,D2
LEA VAR4(PC),A0
MOVE.W D1,(A0)
LEA VAR7(PC),A0
MOVE.W D2,(A0)
LEA VAR6(PC),A0
MOVE.W D0,(A0)
LEA VAR5(PC),A0
MOVE.L A5,(A0)
EXT.L D0
LSL.L #8,D0
ADD.L D0,D0
ADDA.L D0,A5
MOVEM.L D0-D7/A0-A6,-(A7)
LEA VAR30(PC),A0
CLR.W (A0)
JMP16 BSR SUB4
TST.W D0
BPL JMP15
LEA VAR30(PC),A0
ADDQ.W #1,(A0)
CMPI.W #$64,(A0)
BNE.S JMP16
BRA JMP11
JMP15 MOVEM.L (A7)+,D0-D7/A0-A6
MOVE.W VAR6(PC),D0
BRA JMP10
JMP9 MOVEQ #0,D0
RTS
JMP11 LEA VAR1(PC),A0
TST.B (A0)
BEQ.S JMP22
MOVEM.L (A7)+,D0-D7/A0-A6
MOVEq.L #$FF,D0
RTS
JMP22 MOVE.W #$2700,SR
STOP BRA.S STOP
SUB10 LEA BUFF2,A4
MOVE.W VAR14(PC),D0
LSL.W #4,D0
SUBQ.W #2,D0
JMP18 TST.L (A4)
BEQ JMP17
MOVE.L (A6),D1
CMP.L (A4),D1
BNE JMP17
MOVE.L 4(A6),D1
CMP.L 4(A4),D1
BNE.s JMP17
MOVE.B 8(A6),D1
CMP.B 8(A4),D1
BNE.s JMP17
MOVE.B 9(A6),D1
CMP.B 9(A4),D1
BNE.S JMP17
MOVE.B $A(A6),D1
CMP.B $A(A4),D1
BNE.S JMP17
MOVE.B $1B(A4),D1
LSL.W #8,D1
MOVE.B $1A(A4),D1
ANDI.W #$FFF,D1
BRA.s JMP19
JMP17 LEA $20(A4),A4
DBF D0,JMP18
SUBA.L A4,A4
MOVEQ #-1,D1
JMP19 RTS
VAR20 DC.W 0
VAR2 DC.W 0
SUB2 MOVE.W VAR20(PC),D0
ADDQ.B #1,D0
LSL.B #1,D0
OR.W VAR2(PC),D0
EORI.B #7,D0
ANDI.B #7,D0
LEA VAR19(PC),A0
CLR.B (A0)
MOVE.W #$2700,SR
MOVE.B #$E,$FFFF8800.W
MOVE.B $FFFF8800.W,D1
ANDI.B #$F8,D1
OR.B D0,D1
MOVE.B D1,$FFFF8802.W
MOVE.W #$2300,SR
RTS
SUB1 MOVE.W #$80,$FFFF8606.W
MOVE.W #$D0,D6
BRA SUB7
SUB8 MOVE.W VAR31(PC),D6
BEQ.S JMP20
MOVE.W VAR4(PC),D6
MOVE.W D6,D7
ANDI.W #1,D7
LSR.W #1,D6
LEA VAR4(PC),A0
MOVE.W D6,(A0)
CMP.W VAR2(PC),D7
BEQ.S JMP20
LEA VAR2(PC),A0
MOVE.W D7,(A0)
MOVEM.L D0-D1,-(A7)
BSR.S SUB2
MOVEM.L (A7)+,D0-D1
JMP20 MOVE.W #$82,$FFFF8606.W
MOVE.W VAR22(PC),D6
BSR SUB7
MOVE.W #$86,$FFFF8606.W
MOVE.W VAR4(PC),D6
BSR SUB7
MOVE.W #$80,$FFFF8606.W
MOVE.W #$10,D6
OR.W VAR21(PC),D6
BSR SUB7
MOVE.L #$50000,D7
JMP21 SUBQ.L #1,D7
BEQ.S JMP23
BTST #5,$FFFFFA01.W
BNE.S JMP21
LEA VAR22(PC),A0
MOVE.W VAR4(PC),(A0)
MOVEQ #0,D0
RTS
JMP23 MOVEQ #-1,D0
RTS
SUB4 BSR.S SUB8
TST.W D0
BMI JMP7
LEA VAR23(PC),A0
CLR.L (A0)
MOVE.W #$90,$FFFF8606.W
MOVE.W #$190,$FFFF8606.W
MOVE.W #$90,$FFFF8606.W
MOVE.W VAR6(PC),D6
MOVE.W #$200,D2
MULU D6,D2
MOVE.L VAR5(PC),D3
ADD.L D3,D2
LEA VAR24(PC),A0
MOVE.L D2,(A0)
BSR SUB7
MOVE.W #$84,$FFFF8606.W
MOVE.W VAR7(PC),$FFFF8604.W
MOVE.L VAR5(PC),D0
MOVE.B D0,$FFFF860D.W
LSR.L #8,D0
MOVE.B D0,$FFFF860B.W
LSR.W #8,D0
MOVE.B D0,$FFFF8609.W
MOVE.W #$80,$FFFF8606.W
MOVE.W #$90,D6
BSR SUB7
MOVEA.L VAR5(PC),A4
MOVEA.L VAR24(PC),A5
MOVEQ #$14,D7
JMP30 MOVE.W #$4000,D0
JMP24 BTST #5,$FFFFFA01.W
BEQ JMP31
LEA VAR26(PC),A0
MOVE.B $FFFF8609.w,(A0)
LEA VAR27(PC),A0
MOVE.B $FFFF860B.w,(A0)
LEA VAR28(PC),A0
MOVE.B $FFFF860D.w,(A0)
CMPA.L VAR23(PC),A5
BLE JMP31
DBF D0,JMP24
CMPA.L VAR23(PC),A4
BEQ JMP7
MOVEA.L VAR23(PC),A4
DBF D7,JMP30
BRA JMP7
JMP31 MOVE.W #$90,$FFFF8606.w
MOVE.W $FFFF8606.w,D5
LEA VAR29(PC),A0
MOVE.W D5,(A0)
BTST #0,D5
BEQ JMP7
BTST #1,D5
BNE JMP7
MOVE.W #$80,$FFFF8606.w
BSR SUB9
MOVEQ #0,D0
JMP25 BSR SUB1
RTS
JMP7 MOVEQ #-1,D0
BRA.S JMP25
SUB7 BSR SUB6
MOVE.W D6,$FFFF8604.w
BSR SUB6
RTS
SUB6 MOVE SR,-(A7)
MOVE.W D7,-(A7)
MOVE.W #$A,D7
JMP26 DBF D7,JMP26
MOVE.W (A7)+,D7
MOVE.W (A7)+,SR
RTS
SUB3 MOVEQ #4,D6
OR.W VAR2(PC),D6
MOVE.L #$50000,D7
MOVE.W #$80,$FFFF8606.w
BSR.S SUB7
JMP28 SUBQ.L #1,D7
BEQ.S JMP27
BTST #5,$FFFFFA01.W
BNE.S JMP28
LEA VAR22(PC),A0
CLR.W (A0)
MOVEQ #0,D0
RTS
JMP27 MOVEQ #-1,D0
RTS
SUB9 BSR.S SUB6
LEA VAR32(PC),A0
MOVE.W $FFFF8604.w,(A0)
BSR.S SUB6
RTS
EVEN
VAR6 DC.W 0
VAR7 DC.W 0
VAR22 DC.W 0
VAR4 DC.W 0
VAR29 DC.W 0
VAR24 DC.L 0
VAR23 DC.B 0
VAR26 DC.B 0
VAR27 DC.B 0
VAR28 DC.B 0
VAR21 DC.W $3
VAR32 DC.W 0
VAR5 DC.L BUFF1
VAR30 DC.W 0
wedend
dr incbin "g"
text dc.b "VAPOUR PRESENTS . . .",0