* James Pond II - Player by: Richard Joseph * * Entdeckt / Reassembliert / Optimiert / ... von A. da Silva * * !! Das selbe Soundformat ist auch bei 'Cadaver' rj = $35186 ; das Modul rjsmp = $37172 ; die Samples >extern"dh0:music/rjsmp.pond",rjsmp * Title (pos9) >extern"dh0:music/rj.pond1",rj addrtab = $36d74 ; mal klein, mal groesser tab0 = $355a6 ; direkt nach Treppe einser = $355f2 ; kurtz nach tab0 tab1 = $36dc4 ; (meist nach addrtab) tab2 = $36e6c ; nach tab1 * Ingame0,BonusLevel,Sentinel,WorldOk,Fail,Exit,Fx... * (pos0,4,5,6,7,8,11,...) *>extern"dh0:music/rj.pond2",rj * Ingame1,... (pos1,...) *>extern"dh0:music/rj.pond3",rj * Ingame2,... (pos2,...) *>extern"dh0:music/rj.pond4",rj * Ingame3,... (pos3,...) *>extern"dh0:music/rj.pond5",rj *addrtab = $369d2 ; mal klein, mal groesser *tab0 = $355a6 ; direkt nach Treppe *einser = $35610 ; kurtz nach tab0 *tab1 = $36dd2 ; (meist nach addrtab) *tab2 = $36e7a ; nach tab1 S: * move.w #$4000,$dff09a move.l $70.w,oldirq move.l #fx,$70.w jSR init moveq #9,d0 jsr ipos EVER: MOVE.L $DFF004,D0 AND.L #$1FF00,D0 CMP.L #$08000,D0 BNE.S EVER jsr play BTST #6,$BFE001 BNE.S EVER jSR init move.l oldirq(pc),$70.w RTS oldirq: dc.l 0 *****>> Init a Pattern ;d0 Pattern 0-x ipos MOVEM.L D1/A0,-(A7) LEA postab(PC),A0 add.w d0,d0 add.w d0,d0 ADDA.l D0,A0 MOVEQ #3,D1 ilp MOVEQ #0,D0 MOVE.B (A0)+,D0 BEQ.s ilp_c bsr subs ilp_c DBRA D1,ilp MOVEM.L (A7)+,D1/A0 RTS postab: Dc.L $03040201,$13111201,$23212201,$5A585901 Dc.L $47484601,$AEAFAD01,$9C999A9B,$D5D2D3D4 Dc.L $01B0B101,$0E020C0D,$01010101,$000000F2 Dc.L $000000F3,$000000F7,$000000F6,$000000F5 Dc.L $000000F8,$000000F9,$000000FA,$000000FC Dc.L $000000FD,$000000FE,$000000FF,$000000E4 Dc.L $000000ED,$000000FB,$000000E5,$000000E6 Dc.L $000000F4,$000000E9,$000000EC,$000000F1 Dc.L $000000E7,$000000E8,$000000EA,$000000EB Dc.L $000000EF,$000000F0,$000000EE,$000000D6 Dc.L $000000D7,$000000D8,$000000D9,$000000DA Dc.L $000000DB,$000000DC,$000000DD,$000000DE Dc.L $000000DF,$000000E0,$000000E1,$000000E2 Dc.L $000000E3,$00000001 *****>> Playroutine fx MOVEM.L D0-D7/a0-A6,-(A7) L_272 LEA $00DFF000.L,A0 MOVE.W $001E(A0),D0 BTST #7,D0 BNE.s L_2DC BTST #8,D0 BNE.s L_2C4 BTST #9,D0 BNE.s L_2AC BTST #$000A,D0 BEQ.s L_2F6 MOVE.W #$0400,$009C(A0) BTST #2,$001C(A0) BEQ.s L_272 LEA L_1da(pc),A1 BSR.s L_2FC BRA.s L_272 L_2AC MOVE.W #$0200,$009C(A0) BTST #1,$001C(A0) BEQ.s L_272 LEA L_146(pc),A1 bsr.s L_2FC bra.s L_272 L_2C4 MOVE.W #$0100,$009C(A0) BTST #0,$001C(A0) beq.s L_272 LEA L_b2(pc),A1 bsr.s L_2FC bra.s L_272 L_2DC MOVE.W #$0080,$009C(A0) BTST #7,$001D(A0) beq.s L_272 LEA L_1e(pc),A1 bsr.s L_2FC BRA.W L_272 L_2F6 MOVEM.L (A7)+,D0-D7/A0-A6 RTE L_2FC MOVE.L A0,-(A7) ; fx MOVE.L D0,-(A7) MOVEA.L 8(A1),A2 SUBQ.W #1,$000E(A1) TST.W $0024(A1) BPL.s L_330 MOVEQ #0,D0 MOVE.W $0026(A1),D0 MOVE.W D0,D1 ADD.L $001C(A1),D0 MOVE.L D0,(A2) MOVE.W $0028(A1),D0 LSR.W #1,D1 SUB.W D1,D0 MOVE.W D0,4(A2) MOVE.W 6(A1),$009A(A0) bra.s L_350 L_330 TST.W $000E(A1) bne.s L_344 MOVE.W 6(A1),$009A(A0) MOVE.W 2(A1),$0096(A0) bra.s L_350 L_344 MOVE.L #tab1,(A2) ; inmod MOVE.W #1,4(A2) L_350 MOVE.W 6(A1),$009C(A0) MOVE.L (A7)+,D0 MOVEA.L (A7)+,A0 RTS L_382 LEA L_1e(pc),A4 bsr.s L_3A0 LEA L_b2(pc),A4 bsr.s L_3A0 LEA L_146(pc),A4 bsr.s L_3A0 LEA L_1da(pc),A4 L_3A0 MOVEA.L 8(A4),A5 MOVE.W $0048(A4),6(A5) MOVE.W D0,-(A7) MOVE.W $002C(A4),D0 SUB.W $008E(A4),D0 BPL.s L_3B8 CLR.W D0 L_3B8 MOVE.W D0,8(A5) MOVE.W (A7)+,D0 TST.W $002E(A4) beq.s L_408 CLR.W $002E(A4) MOVE.L $001C(A4),(A5) MOVE.W $0028(A4),4(A5) LEA $00DFF000.L,A5 MOVE.W #2,$000E(A4) MOVE.W (A4),$0096(A5) MOVE.W 6(A4),$009C(A5) TST.W $0024(A4) BPL.s L_402 TST.W $0026(A4) bne.s L_3FC MOVE.W 6(A4),$009A(A5) RTS L_3FC MOVE.W #1,$000E(A4) L_402 MOVE.W 4(A4),$009A(A5) L_408 RTS L_40A LEA L_1e(pc),A4 BSR.W L_42E LEA L_b2(pc),A4 BSR.W L_42E LEA L_146(pc),A4 BSR.W L_42E LEA L_1da(pc),A4 L_42E TST.L $003A(A4) BEQ.W L_49C MOVE.L $0014(A4),D0 beq.s L_44E MOVEA.L D0,A3 TST.B $0030(A4) beq.s L_44A SUBQ.B #1,$0030(A4) bne.s L_44E L_44A BSR.W L_450 L_44E RTS L_450 TST.W $0032(A4) beq.s L_4C0 MOVE.W $0034(A4),D0 bne.s L_47C MOVE.B 1(A3),$0030(A4) MOVE.W $002C(A4),D0 ADD.B (A3),D0 CMP.W $0044(A4),D0 bcs.s L_476 ADDQ.W #1,$0034(A4) MOVE.W $0044(A4),D0 L_476 MOVE.W D0,$002C(A4) RTS L_47C CMP.W #1,D0 beq.s L_49E L_482 MOVEQ #0,D0 MOVE.B 4(A3),D0 MOVE.W D0,$002C(A4) MOVE.W $003E(A4),D0 CMP.B 5(A3),D0 BGT.W L_49C CLR.W $0032(A4) L_49C RTS L_49E MOVE.B 3(A3),$0030(A4) MOVE.W $002C(A4),D0 SUB.B 2(A3),D0 CMP.B #$0040,D0 bcs.s L_4B4 CLR.W D0 L_4B4 CMP.B 4(A3),D0 bcc.s L_476 ADDQ.W #1,$0034(A4) bra.s L_482 L_4C0 CLR.W $0034(A4) TST.W $002C(A4) beq.s L_4E0 MOVE.B 7(A3),$0030(A4) MOVE.W $002C(A4),D0 SUB.B 6(A3),D0 bcc.s L_4DC CLR.W D0 L_4DC MOVE.W D0,$002C(A4) L_4E0 RTS init ST flag MOVEM.L D0-D7/A0-A6,-(A7) LEA $00DFF000.L,A5 MOVE.W #-$7FF1,$0096(A5) MOVE.W #$0780,$009A(A5) MOVE.W #$0780,$009C(A5) MOVE.W #$00FF,$009E(A5) LEA L_b72(pc),A0 MOVEA.L A0,A1 CLR.L (A1)+ MOVE.W #$007F,D1 L_518 MOVE.L (A0)+,(A1)+ DBRA D1,L_518 LEA L_1e(pc),A0 LEA L_b2(pc),A1 LEA L_146(pc),A2 LEA L_1da(pc),A3 LEA tab1,A4 ; inmod MOVEQ #0,D0 MOVE.W D0,$00A8(A5) MOVE.W D0,$00B8(A5) MOVE.W D0,$00C8(A5) MOVE.W D0,$00D8(A5) ADDQ.W #1,D0 MOVE.W D0,$00A4(A5) MOVE.W D0,$00B4(A5) MOVE.W D0,$00C4(A5) MOVE.W D0,$00D4(A5) MOVE.W D0,$00A6(A5) MOVE.W D0,$00B6(A5) MOVE.W D0,$00C6(A5) MOVE.W D0,$00D6(A5) MOVE.L A4,$001C(A0) MOVE.L A4,$001C(A1) MOVE.L A4,$001C(A2) MOVE.L A4,$001C(A3) MOVE.L A4,$0020(A0) MOVE.L A4,$0020(A1) MOVE.L A4,$0020(A2) MOVE.L A4,$0020(A3) MOVE.L A4,$00A0(A5) MOVE.L A4,$00B0(A5) MOVE.L A4,$00C0(A5) MOVE.L A4,$00D0(A5) MOVEQ #8,D0 MOVE.W D0,$0028(A0) MOVE.W D0,$0028(A1) MOVE.W D0,$0028(A2) MOVE.W D0,$0028(A3) MOVE.W D0,$00A4(A5) MOVE.W D0,$00B4(A5) MOVE.W D0,$00C4(A5) MOVE.W D0,$00D4(A5) MOVEQ #2,D0 MOVE.W D0,$000E(A0) MOVE.W D0,$000E(A1) MOVE.W D0,$000E(A2) MOVE.W D0,$000E(A3) MOVE.W #$0100,D0 MOVE.W D0,$00A6(A5) MOVE.W D0,$00B6(A5) MOVE.W D0,$00C6(A5) MOVE.W D0,$00D6(A5) MOVE.W #$000F,$0096(A5) MOVE.L #L_bf2,$0018(A0) MOVE.L #L_c72,$0018(A1) MOVE.L #L_cf2,$0018(A2) MOVE.L #L_d72,$0018(A3) MOVE.L #$00DFF0A0,8(A0) MOVE.L #$00DFF0B0,8(A1) MOVE.L #$00DFF0C0,8(A2) MOVE.L #$00DFF0D0,8(A3) MOVE.W #1,2(A0) MOVE.W #2,2(A1) MOVE.W #4,2(A2) MOVE.W #8,2(A3) MOVE.W #-$7FFF,(A0) MOVE.W #-$7FFE,(A1) MOVE.W #-$7FFC,(A2) MOVE.W #-$7FF8,(A3) MOVE.W #$0080,6(A0) MOVE.W #$0100,6(A1) MOVE.W #$0200,6(A2) MOVE.W #$0400,6(A3) MOVE.W #-$7F80,4(A0) MOVE.W #-$7F00,4(A1) MOVE.W #-$7E00,4(A2) MOVE.W #-$7C00,4(A3) MOVEM.L (A7)+,D0-D7/A0-A6 CLR.W flag RTS nix RTS L_694 DC.L L_1e DC.L L_b2 DC.L L_146 DC.L L_1da subs ST flag MOVEM.L D0-D7/A0-A6,-(A7) LEA $00DFF000.L,A5 MOVEQ #0,D4 ADD.W D1,D1 MOVE.W D1,D2 ADD.W D1,D1 MOVEA.L L_694(PC,D1.W),A4 LEA $0010(A4),A3 MOVE.W #$001F,D3 L_6C8 MOVE.L D4,(A3)+ DBRA D3,L_6C8 MOVE.W 6(A4),$009A(A5) MOVE.W 6(A4),$009C(A5) MOVE.W 2(A4),$0096(A5) MOVEA.L 8(A4),A3 MOVE.W D4,8(A3) MOVE.L #tab1,(A3) ; inmod MOVE.W #1,4(A3) MOVE.W #1,6(A3) MOVE.W (A4),$0096(A5) ADD.W D0,D0 ADD.W D0,D0 LEA addrtab,A0 ; inmod - Addresstabelle!! MOVEA.L (A0,D0.W),A0 ; mit Addressen MOVE.L A0,$0036(A4) ; auf die Tracks MOVE.L A0,$003A(A4) ; Endkennenung ist $88 MOVE.L L_760(PC,D1.W),$0018(A4) LEA tab2,A0 ; inmod MOVE.W (A0)+,$0024(A4) MOVE.W (A0)+,$0026(A4) MOVE.W (A0)+,$0028(A4) MOVE.L (A0)+,$001C(A4) MOVE.L (A0)+,$0010(A4) MOVE.W #$0100,$0046(A4) MOVE.W #$0100,$0048(A4) MOVE.L $001C(A4),(A3) MOVE.W $0028(A4),4(A3) MOVE.W #$0100,6(A3) MOVE.W #2,$0096(A5) MOVEM.L (A7)+,D0-D7/A0-A6 CLR.W flag RTS L_760 DC.L L_BF2,L_c72,L_cf2,L_d72 play TST.W flag bne.s L_37E MOVEM.L D0-D7/A0-A6,-(A7) LEA $00DFF000.L,A0 LEA L_1e(pc),A1 MOVEA.L A0,A5 BSR.W do_play MOVEM.L (A7)+,D0-D7/A0-A6 L_37E MOVEQ #0,D0 RTS do_play ST flag MOVEQ #3,D1 LEA L_1e(pc),A4 LEA $00DFF000.L,A5 LEA L_B70(PC),A6 voc_lp MOVE.W D1,-(A7) MOVEA.L $18(A4),A3 TST.L $3A(A4) BEQ.W L_986 TST.W $3E(A4) BNE.W L_8C8 TST.W $26(A4) bne.s L_7D6 MOVE.W 2(A4),$0096(A5) MOVE.W 6(A4),$009A(A5) MOVE.W 6(A4),$009C(A5) MOVEA.L 8(A4),A0 MOVE.W #0,8(A0) MOVE.L #tab2,(A0) ; inmod MOVE.W #1,4(A0) MOVE.W #1,6(A0) MOVE.W (A4),$0096(A5) L_7D6 MOVE.L $003A(A4),D0 BEQ.W L_964 MOVEA.L D0,A2 L_7E0 MOVEQ #0,D0 MOVE.B (A2)+,D0 BPL.s L_84A SUBI.W #$0080,D0 MOVEA.L jmptab(PC,D0.W),A0 MOVEQ #0,D0 JMP (A0) jmptab DC.L L_9a0 DC.L L_9aa DC.L L_9b0 DC.L L_9bc DC.L L_8ba DC.L L_9ca DC.L L_9da DC.L L_9f8 DC.L L_a3c DC.L L_a42 DC.L L_a48 DC.L L_a52 DC.L L_a76 DC.L L_a8c DC.L L_a92 DC.L L_aa8 DC.L L_ab4 DC.L L_ac8 DC.L L_ae8 DC.L L_afa DC.L L_b02 DC.L L_b28 L_84A MOVE.W D0,$002A(A4) MOVE.W 2(A4),$0096(A5) MOVE.W 6(A4),$009A(A5) MOVE.W 6(A4),$009C(A5) MOVEA.L 8(A4),A0 MOVE.W #0,8(A0) MOVE.L #tab2,(A0) ; inmod MOVE.W #1,4(A0) MOVE.W #1,6(A0) TST.L $0014(A4) beq.s L_892 ST $0032(A4) CLR.W $0034(A4) CLR.W $002C(A4) CLR.B $0030(A4) L_892 ADD.W D0,D0 ADD.W D0,D0 ADD.W $008C(A4),D0 ADD.W D0,D0 MOVEA.L $0010(A4),A0 MOVE.W (A0,D0.W),$0046(A4) ST $002E(A4) BSR.W L_B54 CLR.W $0086(A4) BSR.W L_B3C CLR.W $0088(A4) L_8BA MOVE.L A2,$003A(A4) MOVE.L A3,$0018(A4) MOVE.W $0040(A4),$003E(A4) L_8C8 SUBQ.W #1,$003E(A4) TST.L $0014(A4) bne.s L_91C MOVEA.L A4,A1 MOVEQ #1,D3 MOVEQ #0,D2 L_8D8 TST.W $004A(A1) beq.s L_8E6 SUBQ.W #1,$004A(A1) ADDQ.W #1,D2 bra.s L_908 L_8E6 TST.W $004E(A1) beq.s L_902 SUBQ.W #1,$004E(A1) MOVE.W $0068(A1),D0 ADD.W D0,$0086(A4) MOVE.W $0072(A1),$004A(A1) ADDQ.W #1,D2 bra.s L_908 L_902 ADDQ.L #2,A1 DBRA D3,L_8D8 L_908 TST.W D2 bne.s L_91C CLR.W $0086(A4) BTST #0,$008A(A4) beq.s L_91C BSR.W L_B54 L_91C MOVEA.L A4,A1 MOVEQ #2,D3 MOVEQ #0,D2 L_922 TST.W $0052(A1) beq.s L_930 SUBQ.W #1,$0052(A1) ADDQ.W #1,D2 bra.s L_954 L_930 TST.W $0058(A1) beq.s L_94E SUBQ.W #1,$0058(A1) MOVE.W $006C(A1),D0 EXT.W D0 ADD.W D0,$0088(A4) MOVE.W $0076(A1),$0052(A1) ADDQ.W #1,D2 bra.s L_954 L_94E ADDQ.L #2,A1 DBRA D3,L_922 L_954 TST.W D2 bne.s L_964 BTST #1,$008A(A4) beq.s L_964 BSR.W L_B3C L_964 TST.L $0014(A4) bne.s L_97A MOVE.W $0044(A4),D0 ADD.W $0086(A4),D0 ANDI.W #$003F,D0 MOVE.W D0,$002C(A4) L_97A MOVE.W $0046(A4),D0 ADD.W $0088(A4),D0 MOVE.W D0,$0048(A4) L_986 LEA $0094(A4),A4 MOVE.W (A7)+,D1 DBRA D1,voc_lp BSR.W L_40A BSR.W L_382 CLR.W flag RTS L_9a0 MOVE.B (A2)+,D0 MOVE.W D0,$0044(A4) BRA.W L_7E0 L_9aa MOVE.B (A2)+,D0 BRA.W L_7E0 L_9b0 MOVEA.L $0036(A4),A2 MOVE.L A2,$003A(A4) BRA.W L_7E0 L_9bc MOVE.B (A2)+,D0 MOVE.W (A6),D1 MULU D1,D0 MOVE.W D0,$0040(A4) BRA.W L_7E0 L_9ca MOVE.B (A2)+,D0 MOVE.L #$000002EE,D1 DIVU D0,D1 MOVE.W D1,(A6) BRA.W L_7E0 L_9da MOVEQ #0,D1 MOVE.B (A2)+,D1 SUBQ.W #1,D1 MOVEQ #0,D2 MOVEQ #0,D0 L_9E4 MOVE.B (A2)+,D0 ADD.W D0,D2 DBRA D1,L_9E4 MOVE.W (A6),D0 MULU D0,D2 MOVE.W D2,$0040(A4) BRA.W L_7E0 L_9f8 ANDI.B #-4,$008A(A4) MOVE.B (A2)+,D0 MULU #$000F,D0 ADDI.L #tab0,D0 ; inmod MOVEA.L D0,A0 MOVE.L A4,-(A7) MOVE.W #$000E,D1 L_A12 MOVE.B (A0)+,D0 EXT.W D0 MOVE.W D0,$005E(A4) ADDQ.L #2,A4 DBRA D1,L_A12 MOVEA.L (A7)+,A4 MOVEQ #0,D0 MOVE.L D0,$004A(A4) MOVE.L D0,$0052(A4) MOVE.W D0,$0056(A4) MOVE.W D0,$0086(A4) MOVE.W D0,$0088(A4) BRA.W L_7E0 L_a3c MOVE.B (A2)+,D0 BRA.W L_7E0 L_a42 MOVE.B (A2)+,D0 BRA.W L_7E0 L_a48 MOVE.B (A2)+,D0 OR.B D0,$008A(A4) BRA.W L_7E0 L_a52 MOVE.W D0,$003E(A4) SUBA.L A2,A2 MOVE.L A2,$0036(A4) MOVE.W 6(A4),$009A(A5) MOVE.W 6(A4),$009C(A5) MOVE.W 2(A4),$0096(A5) CLR.W $002E(A4) BRA.W L_8BA L_a76 MOVE.B (A2)+,D0 MOVE.L A2,-(A3) ADD.W D0,D0 ADD.W D0,D0 LEA addrtab,A0 ; inmod MOVEA.L (A0,D0.W),A2 BRA.W L_7E0 L_a8c MOVEA.L (A3)+,A2 BRA.W L_7E0 L_a92 MOVE.B (A2)+,D0 beq.s L_AA0 EXT.W D0 ADD.W D0,$008C(A4) BRA.W L_7E0 L_AA0 MOVE.W D0,$008C(A4) BRA.W L_7E0 L_aa8 MOVE.B (A2)+,D0 EXT.W D0 MOVE.W D0,$008C(A4) BRA.W L_7E0 L_ab4 MOVE.B (A2)+,D0 beq.s L_AC0 MOVE.L A2,-(A3) MOVE.W D0,-(A3) BRA.W L_7E0 L_AC0 MOVE.L D0,-(A3) MOVE.W D0,-(A3) BRA.W L_7E0 L_ac8 TST.L 2(A3) BEQ.W L_AE2 MOVEA.L 2(A3),A2 SUBQ.W #1,(A3) BNE.W L_7E0 MOVE.L D0,2(A3) BRA.W L_7E0 L_AE2 ADDQ.W #6,A3 BRA.W L_7E0 L_ae8 MOVE.B (A2)+,D0 ASL.W #3,D0 ADDI.L #einser,D0 ; inmod vor Treppe MOVE.L D0,$0014(A4) BRA.W L_7E0 L_afa MOVE.L D0,$0014(A4) BRA.W L_7E0 L_b02 MOVE.B (A2)+,D0 MULU #$000E,D0 ADDI.L #tab2,D0 ; inmod MOVEA.L D0,A0 MOVE.W (A0)+,$0024(A4) MOVE.W (A0)+,$0026(A4) MOVE.W (A0)+,$0028(A4) MOVE.L (A0)+,$001C(A4) MOVE.L (A0)+,$0010(A4) BRA.W L_7E0 L_b28 MOVE.B (A2)+,D0 ADD.W D0,D0 ADD.W D0,D0 LEA addrtab,A0 ; inmod MOVEA.L (A0,D0.W),A2 BRA.W L_7E0 L_B3C MOVEQ #2,D0 MOVEA.L A4,A1 L_B40 MOVE.W $0076(A1),$0052(A1) MOVE.W $0062(A1),$0058(A1) ADDQ.L #2,A1 DBRA D0,L_B40 RTS L_B54 MOVEQ #1,D0 MOVEA.L A4,A1 L_B58 MOVE.W $0072(A1),$004A(A1) MOVE.W $005E(A1),$004E(A1) ADDQ.L #2,A1 DBRA D0,L_B58 RTS DC.L $94 L_b70 DC.W 2 L_b72 BLK.W 64,0 ; leer L_bf2 BLK.W 64,0 L_c72 BLK.W 64,0 L_cf2 BLK.W 64,0 L_d72 flag DC.w 0 ; enable-player (switch) dc.w 0 L_1e blk.l 37,0 L_b2 blk.l 37,0 L_146 blk.l 37,0 L_1da blk.l 37,0 * Jetzt wuerde hier diese treppige Tabelle folgen... * ...ich zaehle sie momentan noch zum Modul. .