Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nbvblzik equ 10000
- nbregs equ 14
- clr.l -(sp)
- move.w #$20,-(sp)
- trap #1
- addq.l #6,sp
- jsr music ; init zik
- jsr routine1
- jsr music+4
- ; jsr wvbl
- ; eor.w #$555,$ffff8240.w
- ; jsr replaydump
- ; eor.w #$555,$ffff8240.w
- ; ;jsr wvbl
- ; jsr music+4
- jsr pack
- eor.w #500,$ffff8240.w
- jsr dozik
- eor.w #500,$ffff8240.w
- clr.w -(sp)
- trap #1
- fin
- move.l (sp)+,d0 ; adresse de retour osef
- movem.l (sp)+,d0-d7/a0-a6
- jsr music+4
- eor.w #$555,$ffff8240.w
- clr.W -(sp)
- trap #1
- playmusic macro
- movem.l d0-d7/a0-a6,-(sp)
- jsr music+8
- movem.l (sp)+,d0-d7/a0-a6
- endm
- ;reads tateAY:
- ;
- ; move.w #$8800,a0
- ; moveq #0,d7
- ; move.b d7,(a0) ; chanel A fine tune
- ; move.b (a0),d1
- ; ;
- ; ;addq.l #1,d7
- ; move.b d7,(a0)
- ; move.b (a0),d2 ; chanel A coarse tune
- ;
- ; addq.l #1,d7
- ; move.b d7,(a0)
- ; move.b (a0),d3 ; chanel B
- ;
- ; addq.l #1,d7
- ; move.b d7,(a0)
- ; move.b (a0),d4 ; chanel B
- ;
- ; addq.l #1,d7
- ; move.b d7,(a0)
- ; move.b (a0),d5
- ;
- ; addq.l #1,d7
- ; move.b d7,(a0)
- ; move.b (a0),d6
- ;
- ; rol #8,d1
- ; move.b d2,d1
- ;
- ; ror #8,d3
- ; move.b d4,d3
- ; move.w d3,d2
- ;
- ; ror #8,d5
- ; move.b d6,d5
- ; move.w d5,d3
- ;; ; d4 d5 d6 libre
- ;
- ;
- ;
- ; rts
- AY equ $ffff8800
- routine1
- lea big_buffer,a1
- move.w #nbvblzik-1,d6 ; 500 vbl = 10 seconde de musique
- .loopdump0
- playmusic
- lea stateReg,a0
- moveq #nbregs-1,d7
- .loopdump
- move.b (a0)+,AY
- move.b (AY),d0 ;
- move.b d0,(a1)+
- dbf d7,.loopdump
- ;move.w #$2300,sr
- dbf d6,.loopdump0
- jsr music+4 ; eteindre la zik
- rts
- waitOneScanline
- rept 128-5
- nop
- endr
- rts
- replaydump
- ;jsr music
- lea big_buffer,a1
- move.w #nbvblzik-1,d6
- .loopreplay
- movem.l d0-d7/a0-a6,-(sp)
- jsr wvbl
- movem.l (sp)+,d0-d7/a0-a6
- lea stateReg,a0
- moveq #nbregs-2,d7
- .loopAY
- move.b (a1)+,d0
- move.b (a0)+,AY
- move.b d0,(AY+2)
- dbf d7,.loopAY
- move.b (a1)+,d0
- tst.b d0
- beq.s .skip
- move.b (a0)+,AY
- move.b d0,(AY+2)
- .skip
- ;move.w #$2300,sr
- dbf d6,.loopreplay
- rts
- wvbl: move.w $468.w,d0
- .1 cmp.w $468.w,d0
- beq.s .1
- cmp.b #$39+$80,$fffffc02.w
- beq.w fin
- rts
- stateReg dc.b 0,1,2,3,4,5,6,7,8,9,10,11,12,13
- ;stateReg dc.b 1,0,3,2,5,4,6,8,9,10,12,11,13
- ;selectReg dc.b 0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0
- buffer dc.b 0,1,2,3,4,5,6,7,8,9
- even
- music incbin "0103_4.SND"
- BSS
- big_buffer ds.b nbregs*nbvblzik
- even
- endbig_buffer
- include "CRUNCH.S" = absurdie de l'infinitude de je sais plus quoi
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement