home *** CD-ROM | disk | FTP | other *** search
- ;------------------------------------------------------------------------
- ;--- ---
- ;--- Another Demo created by: ---
- ;--- Mace of Dual Crew ---
- ;--- ---
- ;------------------------------------------------------------------------
-
- >EXTERN 'SmallFont',Font
-
- S: bsr SaveAll
- bsr InitSpr
- bsr ClearText
- bsr PrintText
- bsr StartCopper
- bsr MainLoop
- move.l OldCop,$80(a6)
- tst.w $88(a6)
- move.w OldIrq,$9a(a6)
- jmp Demo+$24
-
- SaveAll: move.l $4,a6
- lea.l GfxName(pc),a1
- moveq #0,d0
- jsr -408(a6)
- move.l d0,a0
- move.l $26(a0),OldCop
- move.w $dff01c,d0
- bset #15,d0
- move.w d0,OldIrq
- move.w #$7fff,$dff09a
- move.w #$c000,$dff09a
- lea.l $dff000,a6
- ;move.b #$fd,$bfd100
- ;nop
- ;nop
- ;move.b #$f5,$bfd100
- lea.l Font(pc),a0
- add.l #60*3+57,a0
- bset #2,(a0) ;Correct the Y....
- rts
-
- InitSpr: lea.l CopperList,a0
- move.l #BlindSpr,d0
- moveq #8-1,d7
- SprLoop1: swap d0
- move.w d0,2(a0)
- swap d0
- move.w d0,6(a0)
- addq.l #8,a0
- dbra d7,SprLoop1
- rts
-
- StartCopper: move.l #CopperList,$80(a6)
- tst.w $88(a6)
- move.w #$85c0,$96(a6)
- rts
-
- Copper2: dc.l $01000000,$01800000,-2
-
- ;------------------------------------------------------------------------
-
- ClearText: move.l TextAdr,d0
- move.w #300*64+22,d1
- bsr ClearScreen
- bsr BlitWait
- rts
-
- PrintText: bsr CountRows
- move.w Rows,d7
- lea.l Text(pc),a0
- PrintLoop: bsr CountLetters
- bsr PrintRow
- add.l #8*40,FinalTAdr
- dbra d7,PrintLoop
- Egge: rts
-
- PrintRow: move.l a0,a1
- cmp.w #-1,Letters
- beq.S Piller
- move.w Letters,d6
- move.l FinalTAdr,d4
- moveq #0,d1
- moveq #0,d2
-
- PrintLoop2: moveq #0,d0
- move.b (a1)+,d0
- sub.b #$20,d0
- add.l #Font,d0
- move.l d0,a2
- move.w RowAdr(pc),d1
- move.w d1,d2
- lsr.w #3,d1
- bclr #0,d1
- and.w #$f,d2
- move.l d4,a3
- add.l d1,a3
- moveq #5-1,d5
- Lapp: moveq #0,d3
- move.b (a2),d3
- swap d3
- lsl.l #8,d3
- lsr.l d2,d3
- or.l d3,(a3)
- add.l #40,a3
- add.l #60,a2
- dbra d5,Lapp
- addq.w #8,RowAdr
- dbra d6,PrintLoop2
- Piller: addq.l #1,a1
- move.l a1,a0
- rts
-
- CountLetters: move.l a0,a1
- moveq #0,d0
- Loop2: cmp.b #0,(a1)+
- beq.S EndThis
- addq.w #1,d0
- bra.S Loop2
- EndThis: move.w d0,d3
- subq.w #1,d3
- move.w d3,Letters
- move.w #320,d2
- lsl.w #3,d0
- sub.w d0,d2
- lsr.w #1,d2
- move.w d2,RowAdr
- rts
-
- CountRows: lea.l Text(pc),a0
- moveq #1,d0
- moveq #0,d1
- Loop: cmp.b #0,(a0)
- bne.S Allan
- addq.w #1,d1
- Allan: cmp.b #1,(a0)+
- bne.S Loop
- move.w d1,d3
- subq.w #1,d3
- move.w d3,Rows
- mulu #8,d1
- move.w #43*6,d2
- sub.w d1,d2
- lsr.w #1,d2
- move.w d2,RowsDown
- mulu #40,d2
- add.l TextAdr(pc),d2
- move.l d2,FinalTAdr
- rts
-
- TextAdr: dc.l $70000
- FinalTAdr: dc.l 0
- RowsDown: dc.l 0
- RowAdr: dc.l 0
- Rows: dc.w 0
- Letters: dc.w 0
-
- ;------------------------------------------------------------------------
-
- BlitWait: btst #14,$2(a6)
- bne.S BlitWait
- rts
-
-
- ClearScreen: bsr BlitWait
- move.l #-1,$44(a6)
- clr.w $66(a6)
- move.l #$01000000,$40(a6)
- move.l d0,$54(a6)
- move.w d1,$58(a6)
- rts
-
- MainLoop: cmp.b #-1,$6(a6)
- bne.S MainLoop
- btst #6,$bfe001
- bne.S MainLoop
- rts
-
- ;------------------------------------------------------------------------
-
- 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 $008e2a71,$00902cd8,$00920038,$009400d0
- dc.l $01020000,$01040000,$01080000,$010a0000
- dc.l $01800000,$01820fff
- dc.l $01001000,$00e00007,$00e20000
-
- dc.l $6007fffe,$01800fff,$6107fffe,$01800005
- dc.l $f007fffe,$01800fff,$f107fffe,$01800000
-
- dc.l -2
-
- ;------------------------------------------------------------------------
-
- OldCop: dc.l 0
- OldDma: dc.w 0
- OldIrq: dc.w 0
- BlindSpr: dc.l 0
- GfxName: dc.b 'graphics.library',0
- even
-
- ;------------------------------------------------------------------------
-
- Font: blk.b 300,0
-
-
- Speed: dc.w 1
- Wait2: dc.w 200 ;Ang. Wait's: 50 = 1 sekund
- Farg: dc.w $fff
- Farg2: dc.w $005
-
- ;------------------------------------------------ MAX!
- Text:
- DC.B 'PHENOMENA',0
- DC.B 'PRESENTS THE FINAL VERSION OF',0
- DC.B ' ',0
- DC.B '--------------------',0
- DC.B '- OBVIOUS DISASTER -',0
- DC.B '--------------------',0
- DC.B ' ',0
- DC.B 'THE REASON WHY WE RELEASE THIS VERSION ',0
- DC.B 'IS THAT THE DEMO RELEASED AT THE PARTY ',0
- DC.B 'IN ODENSE WAS QUITE BUGGED IN THE MUSIC',0
- DC.B '(DEADLINE-PROBLEMS MADE THAT I DIDNT ',0
- DC.B 'HAVE ENOUGH TIME TO FIX IT AT THEN...).',0
- DC.B 'ANYWAY,SPREAD THIS ONE AND PRESS THE ',0
- DC.B 'LEFT BUTTON TO ENTER THE DEMO... ',0
- DC.B 1
- even
-
- Demo: blk.b 197196,0
-
-