; Maustaste drucken = Ausfaden ; ... loslassen = Stop music = $28dc0 S: * move.w #$4000,$dff09a jsr init EVER: MOVE.L $DFF004,D0 AND.L #$1FF00,D0 CMP.L #$08000,D0 BNE.S EVER jsr play BTST #6,$BFE001 BNE.S EVER moveq #1,d0 jsr setfade fade: MOVE.L $DFF004,D0 AND.L #$1FF00,D0 CMP.L #$08000,D0 BNE.S fade jsr play btst #6,$bfe001 BEq.S fade jSR init RTS ;****; Programm ;******************************************** SECTION " 0",CODE_C L_0 BRA.W init BRA.W play BRA.W setfade init LEA $00DFF000.L,A6 LEA song(PC),A3 MOVE.W #$000F,$0096(A6) MOVE.W #$00FF,$009E(A6) MOVEQ #6,D0 LEA -8(A3),A0 clear MOVE.B #0,(A0)+ DBRA D0,clear LEA 6(A3),A0 MOVEQ #$002D,D0 clear2 MOVE.B #0,$0034(A0) MOVE.B #0,$0068(A0) MOVE.B #0,$009C(A0) MOVE.B #0,(A0)+ DBRA D0,clear2 MOVEQ #0,D3 MOVE.B $00DF(A3),D3 MOVE.B D3,-5(A3) BSR.W multi LEA -6(A3),A0 MOVE.B D2,(A0) MOVE.B $00DD(A3),$00DB(A3) BCLR #1,$00BFE001.L TST.B $00E1(A3) BNE.B L_80 BSET #1,$00BFE001.L L_80 RTS setfade LEA song(PC),A3 MOVE.B D0,-3(A3) MOVE.B D0,-4(A3) MOVE.B #1,-2(A3) RTS play LEA $00DFF000.L,A6 MOVEQ #3,D7 LEA song(PC),A3 LEA song(PC),A5 MOVE.W $00D2(A3),$00DFF096.L MOVE.W #0,$00D0(A3) MOVE.B #0,$00DA(A3) play_lp1 TST.W $001A(A5) BNE.B setadrlen LEA $00E6(A3),A0 MOVE.L A0,$00A0(A6) MOVE.W #1,$00A4(A6) BRA.B L_DC setadrlen MOVE.W $001A(A5),$00A4(A6) MOVE.L $001C(A5),$00A0(A6) L_DC TST.B -8(A3) BNE.B L_F0 TST.B -7(A3) BNE.B L_EC BSR.W L_19C L_EC BSR.W L_2D2 L_F0 ADDA.L #$00000010,A6 ADDA.L #$00000034,A5 DBRA D7,play_lp1 MOVE.W $00D0(A3),$00DFF096.L MOVE.W #-$7E00,$00D0(A3) MOVE.W #0,$00D4(A3) LEA $00DFF000.L,A6 MOVEQ #3,D7 LEA song(PC),A3 LEA song(PC),A5 play_lp2 TST.B -8(A3) BNE.B L_12E BSR.W L_32C L_12E BSR.W L_508 ADDA.L #$00000010,A6 ADDA.L #$00000034,A5 DBRA D7,play_lp2 BSR.W L_1D0 MOVE.W $00D0(A3),D0 OR.W $00D2(A3),D0 MOVE.W D0,$00DFF096.L MOVE.W $00D4(A3),$00D2(A3) TST.B -3(A3) BEQ.B L_166 SUBQ.B #1,-3(A3) BRA.B Xit L_166 MOVE.B -4(A3),D0 MOVE.B D0,D1 ANDI.B #$007F,D1 BEQ.B Xit MOVE.B D1,-3(A3) TST.B D0 BMI.B L_186 TST.B $00D9(A3) BEQ.B Xit SUBQ.B #1,$00D9(A3) BRA.B Xit L_186 CMPI.B #$0040,$00D9(A3) BNE.B L_196 MOVE.B #0,-4(A3) BRA.B Xit L_196 ADDQ.B #1,$00D9(A3) Xit RTS L_19C MOVEQ #0,D1 MOVEQ #0,D0 MOVE.B -6(A3),D1 LEA $02E8(A3),A0 ADDA.L 0(A5),A0 MOVE.B (A0,D1.L),D0 ADDA.L #$00000400,A0 MOVE.B (A0,D1.L),$0030(A5) MOVEQ #0,D1 MOVE.B $00DE(A3),D1 MULU D0,D1 LEA $1068(A3),A0 ADD.L A0,D1 MOVE.L D1,$0016(A5) RTS L_1D0 MOVEQ #0,D3 MOVE.B -5(A3),D3 MOVE.B -6(A3),D2 MOVE.B -7(A3),D1 MOVE.B -8(A3),D0 TST.B $00DA(A3) BEQ.B L_1EE MOVE.B $00DE(A3),D1 SUBQ.B #2,D1 L_1EE ADDQ.B #1,D0 CMP.B $00DB(A3),D0 BNE.B L_22C MOVEQ #0,D0 ADDQ.B #2,D1 CMP.B $00DE(A3),D1 BNE.B L_22C MOVEQ #0,D1 CMP.B $00D7(A3),D2 BEQ.B L_20C ADDQ.B #1,D2 BRA.B L_22C L_20C ADDQ.B #1,D3 CMP.B $00E0(A3),D3 BNE.B L_22A MOVE.B $00DF(A3),D3 MOVE.B #0,-4(A3) MOVE.B $00DD(A3),$00DB(A3) MOVE.B #0,$00D9(A3) L_22A BSR.B multi L_22C MOVE.B D3,-5(A3) MOVE.B D2,-6(A3) MOVE.B D1,-7(A3) MOVE.B D0,-8(A3) RTS multi LEA $00E8(A3),A0 LEA $00D6(A3),A1 MOVEQ #2,D4 L_248 MOVE.B (A0,D3.L),(A1)+ ADDA.L #$00000040,A0 DBRA D4,L_248 MOVE.B (A0,D3.L),D5 LEA $0031(A3),A1 MOVEQ #3,D4 L_260 ADDA.L #$00000040,A0 MOVE.B (A0,D3.L),(A1) ADDA.L #$00000034,A1 DBRA D4,L_260 TST.B -2(A3) BNE.B L_2CC TST.B D5 BMI.B L_286 MOVE.B #0,-4(A3) BRA.B L_2C8 L_286 MOVE.B D5,D4 MOVE.B $00D9(A3),D5 BTST #6,D4 BNE.B L_2B0 BTST #5,D4 BEQ.W L_29E MOVE.B #0,D5 L_29E ANDI.B #$001F,D4 MOVE.B D4,-3(A3) ORI.B #-$0080,D4 MOVE.B D4,-4(A3) BRA.B L_2C8 L_2B0 BTST #5,D4 BEQ.W L_2BC MOVE.B #$0040,D5 L_2BC ANDI.B #$001F,D4 MOVE.B D4,-3(A3) MOVE.B D4,-4(A3) L_2C8 MOVE.B D5,$00D9(A3) L_2CC MOVE.B $00D6(A3),D2 RTS L_2D2 MOVEQ #0,D0 MOVE.B L_809(PC),D0 MOVEA.L $0016(A5),A1 MOVEQ #0,D3 MOVE.B (A1,D0.L),D3 MOVE.B D3,$0021(A5) MOVE.B 1(A1,D0.L),$0022(A5) CMPI.B #-3,D3 BNE.B L_2FA MOVE.B $0022(A5),$00DB(A3) BRA.B L_31E L_2FA CMPI.B #-2,D3 BNE.B L_30E MOVE.B #1,$00DA(A3) MOVE.B #0,$0021(A5) RTS L_30E TST.B D3 BEQ.B L_31C BMI.B L_31C MOVE.W 4(A5),D0 OR.W D0,$00D0(A3) L_31C RTS L_31E MOVE.B #0,$0021(A5) MOVE.B #0,$0022(A5) RTS L_32C MOVEQ #0,D0 MOVEQ #0,D3 MOVE.B $0021(A5),D3 CMPI.B #-1,D3 BEQ.W L_4B6 TST.B D3 BEQ.W L_4B6 MOVE.W #0,$0014(A5) TST.B D3 BPL.B L_360 MOVE.B $0029(A5),D1 LSR.B #1,D1 MOVE.B D1,$002A(A5) MOVE.B #1,$002B(A5) BRA.W L_46A L_360 MOVE.B #0,$002B(A5) BSR.W L_734 MOVEQ #0,D0 TST.B $000A(A4) BEQ.B L_380 MOVE.B 9(A4),D0 LEA $0F68(A3),A1 MOVE.B (A1,D0.L),D0 BRA.B L_384 L_380 MOVE.B 0(A4),D0 L_384 ASL.B #1,D0 LEA $10E8(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),$00A4(A6) LEA $1168(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),$001A(A5) MOVEQ #0,D1 LEA $1128(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),D1 LEA $1068(A3),A0 ADDA.L $00E2(A3),A0 ASL.B #1,D0 LEA $11A8(A3),A2 ADDA.L $00E2(A3),A2 ADDA.L (A0,D0.L),A2 MOVE.L A2,$00A0(A6) ADD.L A2,D1 MOVE.L D1,$001C(A5) MOVEQ #0,D0 MOVE.B $0022(A5),D0 BTST #6,D3 BNE.B L_3E8 BTST #6,D0 BEQ.B L_3E8 ANDI.W #$003F,D0 BRA.B L_3EC L_3E8 MOVE.B 2(A4),D0 L_3EC ASL.W #4,D0 MOVE.W D0,$000A(A5) MOVEQ #0,D0 MOVE.B 4(A4),D0 ASL.W #4,D0 MOVE.W D0,$000E(A5) MOVE.W #0,6(A5) MOVEQ #0,D0 MOVE.B 1(A4),D0 MOVE.W D0,8(A5) MOVE.B 3(A4),D0 MOVE.W D0,$000C(A5) MOVE.B 8(A4),$0025(A5) MOVE.B 5(A4),$0026(A5) MOVE.B 6(A4),$0027(A5) MOVE.B 7(A4),D0 MOVE.B D0,D1 ANDI.B #$000F,D0 MOVE.B D0,$0029(A5) LSR.B #1,D0 MOVE.B D0,$002A(A5) LSR.B #4,D1 MOVE.B D1,$0028(A5) TST.B D0 BEQ.B L_44C MOVE.B #1,$002B(A5) L_44C MOVE.B 9(A4),$002C(A5) MOVE.B $000A(A4),$002D(A5) MOVE.B $000B(A4),$002E(A5) MOVE.B $000C(A4),$002F(A5) MOVE.B $000D(A4),$0032(A5) L_46A MOVE.L D3,D0 BTST #6,D3 BEQ.B L_476 BSR.B L_4DA BRA.B L_488 L_476 BSR.W toneslide MOVE.B D3,$0024(A5) MOVE.W D0,$00A6(A6) ASL.W #2,D0 MOVE.W D0,$0010(A5) L_488 TST.B $0026(A5) BNE.B L_490 BSR.B L_4A0 L_490 TST.B $0020(A5) BNE.B L_49E MOVE.W 4(A5),D0 OR.W D0,$00D0(A3) L_49E RTS L_4A0 BTST #0,$0029(A5) BEQ.B L_4B4 MOVEQ #0,D1 MOVE.B $0027(A5),D1 LSR.W #1,D1 SUB.W D1,$0010(A5) L_4B4 RTS L_4B6 MOVEQ #0,D0 MOVE.B $0022(A5),D0 BTST #6,D3 BNE.B L_4D8 BTST #6,D0 BEQ.B L_4D8 ANDI.W #$003F,D0 ASL.W #4,D0 MOVE.W D0,6(A5) MOVE.W #-1,8(A5) L_4D8 RTS L_4DA BSR.W toneslide MOVE.B D3,$0024(A5) ASL.W #2,D0 MOVE.W D0,$0012(A5) MOVEQ #1,D1 CMP.W $0010(A5),D0 BPL.B L_4F2 MOVEQ #0,D1 L_4F2 MOVEQ #0,D0 MOVE.B $0022(A5),D0 ANDI.B #$007F,D0 TST.B D1 BNE.B L_502 NEG.W D0 L_502 MOVE.W D0,$0014(A5) RTS L_508 TST.B $002D(A5) BEQ.W L_5E0 MOVEQ #0,D0 MOVE.B $002C(A5),D0 LEA $0E68(A3),A2 MOVE.B (A2,D0.L),D1 ADDQ.B #1,D0 CMP.B $002D(A5),D0 BNE.B L_52A MOVE.B $002E(A5),D0 L_52A MOVE.B D0,$002C(A5) LEA $0F68(A3),A1 MOVE.B (A1,D0.L),D0 BPL.B L_580 TST.B $0020(A5) BNE.B L_546 MOVE.W 4(A5),D2 OR.W D2,$00D4(A3) L_546 ASL.B #1,D0 LEA $10E8(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),$001A(A5) MOVEQ #0,D2 LEA $1128(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),D2 ASL.B #1,D0 LEA $11A8(A3),A2 ADDA.L $00E2(A3),A2 LEA $1068(A3),A0 ADDA.L $00E2(A3),A0 ADDA.L (A0,D0.L),A2 MOVE.L A2,$001C(A5) BRA.B L_5BA L_580 ASL.B #1,D0 LEA $1168(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),$001A(A5) MOVEQ #0,D2 LEA $1128(A3),A0 ADDA.L $00E2(A3),A0 MOVE.W (A0,D0.L),D2 ASL.B #1,D0 LEA $11A8(A3),A2 ADDA.L $00E2(A3),A2 LEA $1068(A3),A0 ADDA.L $00E2(A3),A0 ADDA.L (A0,D0.L),A2 ADD.L A2,D2 MOVE.L D2,$001C(A5) L_5BA CMPI.B #-$0080,D1 BEQ.B L_5E0 CMPI.B #-$007F,D1 BNE.B L_5CC MOVE.B $002F(A5),D0 BRA.B L_5D4 L_5CC ADD.B D1,$0024(A5) MOVE.B $0024(A5),D0 L_5D4 BSR.W L_774 MOVE.W D0,$00A6(A6) BRA.W L_6C8 L_5E0 TST.B $002B(A5) BEQ.W L_668 TST.B $0026(A5) BEQ.B L_5FA SUBQ.B #1,$0026(A5) BNE.B L_668 BSR.W L_4A0 BRA.B L_668 L_5FA MOVEQ #0,D2 TST.W 6(A5) BEQ.B L_606 MOVE.B $0025(A5),D2 L_606 TST.B $002B(A5) BMI.B L_646 MOVEQ #0,D1 MOVE.B $0029(A5),D1 LSR.B #1,D1 CMP.B $002A(A5),D1 BNE.B L_622 MOVE.B $0028(A5),D0 ADD.B D0,$0027(A5) L_622 MOVEQ #0,D0 MOVE.B $0027(A5),D0 SUB.W D0,$0010(A5) SUB.W D2,6(A5) SUBQ.B #1,$002A(A5) TST.B $002A(A5) BNE.B L_668 NEG.B $002B(A5) MOVE.B $0029(A5),$002A(A5) BRA.B L_668 L_646 MOVEQ #0,D0 MOVE.B $0027(A5),D0 ADD.W D0,$0010(A5) ADD.W D2,6(A5) SUBQ.B #1,$002A(A5) TST.B $002A(A5) BNE.B L_668 NEG.B $002B(A5) MOVE.B $0029(A5),$002A(A5) L_668 MOVE.W $0010(A5),D0 LSR.W #2,D0 MOVE.W D0,$00A6(A6) TST.W $0014(A5) BEQ.B L_6C8 MOVE.W $0010(A5),D0 ADD.W $0014(A5),D0 TST.W $0014(A5) BMI.B L_68E CMP.W $0012(A5),D0 BMI.B L_6BE BRA.B L_694 L_68E CMP.W $0012(A5),D0 BPL.B L_6BE L_694 MOVE.W $0012(A5),D0 MOVE.W #0,$0014(A5) MOVE.B $0029(A5),D1 LSR.B #1,D1 MOVE.B D1,$002A(A5) MOVE.B #1,$002B(A5) MOVE.W D0,$0010(A5) LSR.W #2,D0 MOVE.W D0,$00A6(A6) BSR.W L_4A0 BRA.B L_6C8 L_6BE MOVE.W D0,$0010(A5) LSR.W #2,D0 MOVE.W D0,$00A6(A6) L_6C8 MOVE.W 6(A5),D0 MOVE.W $000A(A5),D1 MOVE.W $000E(A5),D2 TST.B $0021(A5) BNE.B L_6F6 MOVE.W #-1,8(A5) CMP.W D2,D0 BLS.B L_712 SUB.W $000C(A5),D0 BMI.B L_6EE CMP.W D2,D0 BHI.B L_6F0 L_6EE MOVE.W D2,D0 L_6F0 MOVE.W D0,6(A5) BRA.B L_712 L_6F6 TST.W 8(A5) BEQ.B L_706 BMI.B L_712 ADD.W 8(A5),D0 CMP.W D1,D0 BCS.B L_70E L_706 MOVE.W D1,D0 MOVE.W #-1,8(A5) L_70E MOVE.W D0,6(A5) L_712 MOVE.W 6(A5),D0 LSR.W #4,D0 MOVEQ #0,D1 MOVE.B $00D9(A3),D1 CMPI.B #$0040,D1 BEQ.B L_72E TST.B $0031(A5) BMI.B L_72E MULU D1,D0 LSR.W #6,D0 L_72E MOVE.W D0,$00A8(A6) RTS L_734 MOVEQ #0,D0 LEA $0023(A5),A4 BTST #6,D3 BNE.B L_74A MOVE.B $0022(A5),D0 BTST #6,D0 BEQ.B L_74C L_74A MOVE.B (A4),D0 L_74C MOVE.B D0,(A4) ADD.B $0031(A5),D0 ANDI.B #$003F,D0 MULU #$000E,D0 LEA $0AE8(A3),A4 ADDA.L D0,A4 RTS toneslide BTST #7,$0022(A5) BNE.B L_774 ADD.B $0030(A5),D0 ADD.B $00D8(A3),D0 MOVE.L D0,D3 L_774 ADD.B $0032(A5),D0 ANDI.B #$003F,D0 ASL.B #1,D0 LEA periods(PC),A0 MOVE.W (A0,D0.L),D0 RTS periods DC.W $D60 DC.W $CA0 DC.W $BE0 DC.W $B40 DC.W $AA0 DC.W $A00 DC.W $970 DC.W $8F0 DC.W $870 DC.W $7F0 DC.W $780 DC.W $710 DC.W $6B0 DC.W $650 DC.W $5F0 DC.W $5A0 DC.W $550 DC.W $500 DC.W $4B8 DC.W $478 DC.W $438 DC.W $3F8 DC.W $3C0 DC.W $388 DC.W $358 DC.W $328 DC.W $2F8 DC.W $2D0 DC.W $2A8 DC.W $280 DC.W $25C DC.W $23C DC.W $21C DC.W $1FC DC.W $1E0 DC.W $1C4 DC.W $1AC DC.W $194 DC.W $17C DC.W $168 DC.W $154 DC.W $140 DC.W $12E DC.W $11E DC.W $10E DC.W $FE DC.W $F0 DC.W $E2 DC.W $D6 DC.W $CA DC.W $BE DC.W $B4 DC.W $AA DC.W $A0 DC.W $97 DC.W $8F DC.W $87 DC.W $7F DC.W $78 DC.W $71 DC.W $6B DC.W $65 DC.W $5F DC.W $5A DC.B 0 L_809 DC.B 0 DC.W 0 DC.W 0 DC.W 0 DC.W 0 song incbin "ram:testmus" END .