home *** CD-ROM | disk | FTP | other *** search
- ;----------------------------------------------------------------------------
- ;- Cycle-Pictures -
- ;----------------------------------------------------------------------------
-
- org $20000
- load $20000
-
- S: movem.l d0-d7/a0-a6,-(sp)
- bsr SaveAll
- bsr InitSpr
- bsr InitScreen
- bsr StartCopper
- bsr Calculate
- bsr MainLoop
- bsr RestoreAll
- movem.l (sp)+,d0-d7/a0-a6
- rts
-
- SaveAll: lea OldCop(pc),a2
- move.l $4,a6
- lea Lib(pc),a1
- moveq #0,d0
- jsr -408(a6)
- move.l d0,a0
- move.l $26(a0),(a2)+
- lea $dff000,a6
- move.w $1c(a6),d0
- bset #15,d0
- move.w d0,(a2)+
- move.w 2(a6),d0
- bset #15,d0
- move.w d0,(a2)+
- move.l $6c.W,Oldien
- rts
-
- Oldien: dc.l 0
-
- RestoreAll: lea OldCop(pc),a0
- move.l Oldien(pc),$6c.W
- move.l (a0)+,$80(a6)
- move.w (a0)+,$9a(a6)
- move.w (a0)+,$96(a6)
- rts
-
- StartCopper: bsr BlitWait
- lea CopperList(pc),a0
- move.l a0,$80(a6)
- tst.w $88(a6)
- move.w #$7fff,$96(a6)
- move.w #$87e0,$96(a6)
- move.w #$7fff,$9a(a6)
- move.w #$c010,$9a(a6)
- move.l #Int,$6c.W
- rts
-
- InitSpr: lea CopperList(pc),a0
- move.l #Spr,d0
- moveq #7,d7
- SprLoop: swap d0
- move.w d0,2(a0)
- swap d0
- move.w d0,6(a0)
- addq.l #8,a0
- dbra d7,SprLoop
- rts
-
- OldCop: dc.l 0
- OldIrq: dc.w 0
- OldDma: dc.w 0
- Spr: dc.l 0
- Lib: dc.b 'graphics.library',0
- even
-
- BlitWait: btst #14,$2(a6)
- bne.S BlitWait
- rts
-
- ClearScreen: bsr.S BlitWait
- move.l #-1,$44(a6)
- move.l #$01000000,$40(a6)
- move.w d2,$66(a6)
- move.l d0,$54(a6)
- move.w d1,$58(a6)
- rts
-
- ;-------------------------------------------------------------------------------------
-
- InitScreen: move.l Screen(pc),d0
- moveq #0,d2
- move.w #140*5*64+44,d1
- bsr ClearScreen
-
- lea BMap(pc),a0
- moveq #4,d7
- BMapLoop: swap d0
- move.w d0,2(a0)
- swap d0
- move.w d0,6(a0)
- addq.l #8,a0
- add.l #280*44,d0
- dbra d7,BMapLoop
-
- lea Sinus(pc),a0
- lea SinAdr,a1
- move.w #200-1,d7
- FSLoop1: move.w (a0)+,d0
- add.w d0,d0
- move.w d0,(a1)+
- dbra d7,FSLoop1
- lea SinAdr,a0
- move.w #20*200-1,d7
- FSLoop2: move.w (a0)+,(a1)+
- dbra d7,FSLoop2
- lea Add(pc),a0
- lea AddAdr,a1
- move.w #1000-1,d7
- FSLoop3: move.w (a0)+,(a1)+
- dbra d7,FSLoop3
- lea AddAdr,a0
- move.w #10*1000-1,d7
- FSLoop4: move.w (a0)+,(a1)+
- dbra d7,FSLoop4
- rts
-
- Screen: dc.l $60000
- SinAdr: = $70000
- AddAdr: = $75000
-
- ;-------------------------------------------------------------------------------------
-
- Calculate: lea AddAdr,a0
- move.l a0,a1
- moveq #0,d4
- move.l Screen(pc),a4
- move.w #280*44,a5
- lea SinAdr+$1000,a6
- move.l a7,SPSave
- move.l a6,a7
- move.w #280-1,d7
- CalcLoop1: move.w #352-1,d6
- add.w (a7),a0
- add.w (a6),a1
- move.l a0,a2
- move.l a1,a3
- add.w #0,a0
- add.w #0,a1
- add.w #2,a7
- sub.w #4,a6
- moveq #0,d1
- CalcLoop2: move.w (a2),d0
- add.w (a3),d0
- add.w (a6),a3
- add.w (a7),a2
- ;add.w #12,a2
- ;add.w #4,a3
- add.w #2,a6
- add.w #2,a7
- move.w d1,d2
- move.w d2,d3
- lsr.w #3,d2
- eor.w #7,d3
- add.w d4,d2
-
- btst #0,d0
- beq.S NoPlot1
- bset d3,(a4,d2)
- NoPlot1: add.w a5,d2
- btst #1,d0
- beq.S NoPlot2
- bset d3,(a4,d2)
- NoPlot2: add.w a5,d2
- btst #2,d0
- beq.S NoPlot3
- bset d3,(a4,d2)
- NoPlot3: add.w a5,d2
- btst #3,d0
- beq.S NoPlot4
- bset d3,(a4,d2)
- NoPlot4: add.w a5,d2
- btst #4,d0
- beq.S NoPlot5
- bset d3,(a4,d2)
- NoPlot5:
- addq.w #1,d1
- dbra d6,CalcLoop2
- add.w #44,d4
- sub.l #352*2,a6
- sub.l #352*2,a7
- dbra d7,CalcLoop1
- lea $dff000,a6
- move.l SPSave(pc),a7
- rts
-
- SPSave: dc.l 0
-
- ;-------------------------------------------------------------------------------------
-
- MainLoop: cmp.b #-1,$6(a6)
- bne.S MainLoop
- QQQ: cmp.b #$38,$6(a6)
- bne.S QQQ
- ; bsr Cycle
- btst #6,$bfe001
- bne.S MainLoop
- rts
-
- Int: move.l a7,SPSave2
- lea $50000,a7
- movem.l d0-d7/a0-a6,-(sp)
- bsr Cycle
- movem.l (sp)+,d0-d7/a0-a6
- move.l SPSave2(pc),a7
- move.w #$0010,$dff09c
- rte
-
- SPSave2: dc.l 0
-
- ;-------------------------------------------------------------------------------------
-
- Cycle: lea ColCount(pc),a0
- moveq #0,d0
- move.w (a0),d0
- addq.w #1,d0
- cmp.w #30,d0
- bls.S NoD
- moveq #0,d0
- NoD: move.w d0,(a0)
- add.w d0,d0
- lea Cols+2(pc),a1
- lea Cols2(pc),a2
- add.l d0,a2
- moveq #32-1,d7
- CL: move.w (a2)+,(a1)
- addq.l #4,a1
- dbra d7,CL
- rts
-
- ColCount: dc.w 0
- Cols2:
- dc.w 0,$100,$200,$300,$400,$500,$600,$700,$800,$900,$a00,$b00,$c00
- dc.w $d00,$e00,$f00
- dc.w $e00,$d00,$c00,$b00,$a00,$900,$800,$700,$600,$500,$400,$300
- dc.w $200,$100,0
- dc.w 0,$100,$200,$300,$400,$500,$600,$700,$800,$900,$a00,$b00,$c00
- dc.w $d00,$e00,$f00
- dc.w $e00,$d00,$c00,$b00,$a00,$900,$800,$700,$600,$500,$400,$300
- dc.w $200,$100,0
-
- dc.w $f00,$f10,$f20,$f30,$f40,$f50,$f60,$f70,$f80,$f90,$fa0,$fb0
- dc.w $fc0,$fd0,$fe0,$ff0,$ff1,$ff2,$ff3,$ff4,$ff5,$ff6,$ff7,$ff8
- dc.w $ff9,$ffa,$ffb,$ffc,$ffd,$ffe,$fff,$fff
- dc.w $f00,$f10,$f20,$f30,$f40,$f50,$f60,$f70,$f80,$f90,$fa0,$fb0
- dc.w $fc0,$fd0,$fe0,$ff0,$ff1,$ff2,$ff3,$ff4,$ff5,$ff6,$ff7,$ff8
- dc.w $ff9,$ffa,$ffb,$ffc,$ffd,$ffe,$fff,$fff
-
- ;-------------------------------------------------------------------------------------
-
- CopperList: dc.l $01200000,$01220000,$01240000,$01260000
- dc.l $01280000,$012a0000,$012c0000,$012e0000
- dc.l $01300000,$01320000,$01340000,$01360000
- dc.l $01380000,$013a0000,$013c0000,$013e0000
-
- dc.l $008e2066,$009038dd,$00920030,$009400d8
- dc.l $01020000,$01040000,$01080000,$010a0000
-
- Cols: dc.l $01800000,$01820010,$01840020,$01860030
- dc.l $01880040,$018a0050,$018c0060,$018e0070
- dc.l $01900080,$01920090,$019400a0,$019600b0
- dc.l $019800c0,$019a00d0,$019c00e0,$019e00f0
- dc.l $01a000f0,$01a200e0,$01a400d0,$01a600c0
- dc.l $01a800b0,$01aa00a0,$01ac0090,$01ae0080
- dc.l $01b00070,$01b20060,$01b40050,$01b60040
- dc.l $01b80030,$01ba0020,$01bc0010,$01be0000
-
- BMap: dc.l $00e00000,$00e20000,$00e40000,$00e60000
- dc.l $00e80000,$00ea0000,$00ec0000,$00ee0000
- dc.l $00f00000,$00f20000
-
- dc.l $01005200
-
- dc.l $ffddfffe,$3807fffe,$009c8010
-
- dc.l -2
-
- ;--------------------------------------------------------------------------------------
-
- Sinus:
- ;dc.w 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
- ;dc.w 16,17,18,19,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0
- ;dc.w 0,1,2,2,3,3,3,4,4,4,5,5,5,5,6,6,6,6,7,7,7,8,8,8,9,9,10,10,11
- ;dc.w 12,13,14,15,16,15,14,13,12,11,10,9,8,7,6,5,4,3,3,2,2,1,1,0,0
- ;dc.w 0,1,1,0,0
- ;ss:
-
- dc.w 15,15,15,15,15,15,15,15
- dc.w 15,15,15,15,14,14,14,14
- dc.w 14,14,14,14,14,13,13,13
- dc.w 13,13,13,12,12,12,12,12
- dc.w 12,11,11,11,11,10,10,10
- dc.w 10,10,9,9,9,9,8,8
- dc.w 8,8,7,7,7,7,7,6
- dc.w 6,6,6,5,5,5,5,5
- dc.w 4,4,4,4,3,3,3,3
- dc.w 3,3,2,2,2,2,2,2
- dc.w 1,1,1,1,1,1,1,1
- dc.w 1,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0
- dc.w 1,1,1,1,1,1,1,1
- dc.w 1,2,2,2,2,2,2,3
- dc.w 3,3,3,3,3,4,4,4
- dc.w 4,5,5,5,5,5,6,6
- dc.w 6,6,7,7,7,7,8,8
- dc.w 8,8,8,9,9,9,9,10
- dc.w 10,10,10,10,11,11,11,11
- dc.w 12,12,12,12,12,12,13,13
- dc.w 13,13,13,13,14,14,14,14
- dc.w 14,14,14,14,14,15,15,15
- dc.w 15,15,15,15,15,15,15,15
-
-
- Add2: dc.w 200,200,200,200,199,199,198,198
- dc.w 197,196,195,194,193,192,190,189
- dc.w 188,186,184,183,181,179,177,175
- dc.w 173,171,168,166,164,161,159,156
- dc.w 154,151,148,145,143,140,137,134
- dc.w 131,128,125,122,119,116,113,109
- dc.w 106,103,100,97,94,91,87,84
- dc.w 81,78,75,72,69,66,63,60
- dc.w 57,55,52,49,46,44,41,39
- dc.w 36,34,32,29,27,25,23,21
- dc.w 19,17,16,14,12,11,10,8
- dc.w 7,6,5,4,3,2,2,1
- dc.w 1,0,0,0,0,0,0,0
- dc.w 1,1,2,2,3,4,5,6
- dc.w 7,8,10,11,12,14,16,17
- dc.w 19,21,23,25,27,29,32,34
- dc.w 36,39,41,44,46,49,52,55
- dc.w 57,60,63,66,69,72,75,78
- dc.w 81,84,87,91,94,97,100,103
- dc.w 106,109,113,116,119,122,125,128
- dc.w 131,134,137,140,143,145,148,151
- dc.w 154,156,159,161,164,166,168,171
- dc.w 173,175,177,179,181,183,184,186
- dc.w 188,189,190,192,193,194,195,196
- dc.w 197,198,198,199,199,200,200,200
-
-
-
- Add: dc.w 400,400,400,400,400,400,400,400
- dc.w 400,400,400,400,399,399,399,399
- dc.w 399,399,399,399,398,398,398,398
- dc.w 398,398,397,397,397,397,396,396
- dc.w 396,396,395,395,395,395,394,394
- dc.w 394,393,393,393,392,392,392,391
- dc.w 391,391,390,390,389,389,389,388
- dc.w 388,387,387,386,386,385,385,385
- dc.w 384,384,383,383,382,381,381,380
- dc.w 380,379,379,378,378,377,376,376
- dc.w 375,375,374,373,373,372,372,371
- dc.w 370,370,369,368,368,367,366,365
- dc.w 365,364,363,363,362,361,360,360
- dc.w 359,358,357,356,356,355,354,353
- dc.w 352,352,351,350,349,348,348,347
- dc.w 346,345,344,343,342,341,341,340
- dc.w 339,338,337,336,335,334,333,332
- dc.w 331,330,329,328,327,327,326,325
- dc.w 324,323,322,321,320,319,318,317
- dc.w 316,314,313,312,311,310,309,308
- dc.w 307,306,305,304,303,302,301,300
- dc.w 299,297,296,295,294,293,292,291
- dc.w 290,289,287,286,285,284,283,282
- dc.w 281,279,278,277,276,275,274,272
- dc.w 271,270,269,268,267,265,264,263
- dc.w 262,261,259,258,257,256,255,253
- dc.w 252,251,250,249,247,246,245,244
- dc.w 242,241,240,239,237,236,235,234
- dc.w 233,231,230,229,228,226,225,224
- dc.w 223,221,220,219,218,216,215,214
- dc.w 213,211,210,209,208,206,205,204
- dc.w 203,201,200,199,197,196,195,194
- dc.w 192,191,190,189,187,186,185,184
- dc.w 182,181,180,179,177,176,175,174
- dc.w 172,171,170,169,167,166,165,164
- dc.w 163,161,160,159,158,156,155,154
- dc.w 153,151,150,149,148,147,145,144
- dc.w 143,142,141,139,138,137,136,135
- dc.w 133,132,131,130,129,128,126,125
- dc.w 124,123,122,121,119,118,117,116
- dc.w 115,114,113,111,110,109,108,107
- dc.w 106,105,104,103,101,100,99,98
- dc.w 97,96,95,94,93,92,91,90
- dc.w 89,88,87,86,84,83,82,81
- dc.w 80,79,78,77,76,75,74,73
- dc.w 73,72,71,70,69,68,67,66
- dc.w 65,64,63,62,61,60,59,59
- dc.w 58,57,56,55,54,53,52,52
- dc.w 51,50,49,48,48,47,46,45
- dc.w 44,44,43,42,41,40,40,39
- dc.w 38,37,37,36,35,35,34,33
- dc.w 32,32,31,30,30,29,28,28
- dc.w 27,27,26,25,25,24,24,23
- dc.w 22,22,21,21,20,20,19,19
- dc.w 18,17,17,16,16,15,15,15
- dc.w 14,14,13,13,12,12,11,11
- dc.w 11,10,10,9,9,9,8,8
- dc.w 8,7,7,7,6,6,6,5
- dc.w 5,5,5,4,4,4,4,3
- dc.w 3,3,3,2,2,2,2,2
- dc.w 2,1,1,1,1,1,1,1
- dc.w 1,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0
- dc.w 0,0,0,0,0,0,0,0
- dc.w 1,1,1,1,1,1,1,1
- dc.w 2,2,2,2,2,2,3,3
- dc.w 3,3,4,4,4,4,5,5
- dc.w 5,5,6,6,6,7,7,7
- dc.w 8,8,8,9,9,9,10,10
- dc.w 11,11,11,12,12,13,13,14
- dc.w 14,15,15,15,16,16,17,17
- dc.w 18,19,19,20,20,21,21,22
- dc.w 22,23,24,24,25,25,26,27
- dc.w 27,28,28,29,30,30,31,32
- dc.w 32,33,34,35,35,36,37,37
- dc.w 38,39,40,40,41,42,43,44
- dc.w 44,45,46,47,48,48,49,50
- dc.w 51,52,53,53,54,55,56,57
- dc.w 58,59,59,60,61,62,63,64
- dc.w 65,66,67,68,69,70,71,72
- dc.w 73,73,74,75,76,77,78,79
- dc.w 80,81,82,83,84,86,87,88
- dc.w 89,90,91,92,93,94,95,96
- dc.w 97,98,99,100,101,103,104,105
- dc.w 106,107,108,109,110,111,113,114
- dc.w 115,116,117,118,119,121,122,123
- dc.w 124,125,126,128,129,130,131,132
- dc.w 133,135,136,137,138,139,141,142
- dc.w 143,144,145,147,148,149,150,151
- dc.w 153,154,155,156,158,159,160,161
- dc.w 163,164,165,166,167,169,170,171
- dc.w 172,174,175,176,177,179,180,181
- dc.w 182,184,185,186,187,189,190,191
- dc.w 192,194,195,196,197,199,200,201
- dc.w 203,204,205,206,208,209,210,211
- dc.w 213,214,215,216,218,219,220,221
- dc.w 223,224,225,226,228,229,230,231
- dc.w 233,234,235,236,237,239,240,241
- dc.w 242,244,245,246,247,249,250,251
- dc.w 252,253,255,256,257,258,259,261
- dc.w 262,263,264,265,267,268,269,270
- dc.w 271,272,274,275,276,277,278,279
- dc.w 281,282,283,284,285,286,287,289
- dc.w 290,291,292,293,294,295,296,297
- dc.w 299,300,301,302,303,304,305,306
- dc.w 307,308,309,310,311,312,313,314
- dc.w 316,317,318,319,320,321,322,323
- dc.w 324,325,326,327,327,328,329,330
- dc.w 331,332,333,334,335,336,337,338
- dc.w 339,340,341,341,342,343,344,345
- dc.w 346,347,348,348,349,350,351,352
- dc.w 352,353,354,355,356,356,357,358
- dc.w 359,360,360,361,362,363,363,364
- dc.w 365,365,366,367,368,368,369,370
- dc.w 370,371,372,372,373,373,374,375
- dc.w 375,376,376,377,378,378,379,379
- dc.w 380,380,381,382,382,383,383,384
- dc.w 384,385,385,385,386,386,387,387
- dc.w 388,388,389,389,389,390,390,391
- dc.w 391,391,392,392,392,393,393,393
- dc.w 394,394,394,395,395,395,395,396
- dc.w 396,396,396,397,397,397,397,398
- dc.w 398,398,398,398,398,399,399,399
- dc.w 399,399,399,399,399,400,400,400
- dc.w 400,400,400,400,400,400,400,400
-
-
-