Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TEXT
- pack
- lea big_buffer,a0
- lea eordata,a3
- lea datapack,a2
- move.w #$7F7F,(a3)+
- move.w #13,d7
- move.l a0,a1
- .bcl
- move.b (a1)+,(a2)+ ; le premier on change tout les registres
- dbf d7,.bcl
- rts
- pack1 lea big_buffer,a0
- lea 14(a0),a1
- bra.s .000
- pack2 lea big_buffer,a1
- lea 14(a1),a0
- .000 move.l #0,d6 nbvblzik-1-1,d6
- looop:
- move #0,d2
- move.w #$1,d3 ; bit 0
- .loop
- move.b (a0)+,d0
- move.b (a1)+,d1
- cmp.b d0,d1
- beq.s .skip
- move.b d1,(a2)+ ;d0
- or d3,d2
- .skip
- add d3,d3
- cmp.b #$80,d3 ; bit 7 ? non on a de bit0 a bit6 seulemeent
- bne.s .loop
- .trop
- move.b d2,(a3)+ ; eor liste
- move.w #$1,d3
- moveq #0,d2
- .loop2
- move.b (a0)+,d0
- move.b (a1)+,d1
- cmp.b d0,d1
- beq.s .skip2
- move.b d1,(a2)+
- or.b d3,d2
- .skip2
- add d3,d3
- cmp.b #$80,d3
- bne.s .loop2
- move.b d2,(a3)+
- ;dbf d6,looop
- ;move.l a2,d0
- ;sub.l #datapack,d0
- ;move.l a3,d1
- ;sub.l #eorliste,d1
- rts
- makecodegen
- lea listeptrcodegen,a0
- lea codegenbss,a1
- moveq #0,d0
- ; 1er quartet
- moveq #0,d0
- .bcl
- move.l a1,(a0)+ ; stoque l'adresse de depart
- moveq #1,d1
- moveq #0,d3
- .bcl0
- move.w d0,d2
- and.w d1,d2
- tst.w d2
- beq.s .skip
- bsr copymove
- .skip
- add.w d1,d1
- addq.w #1,d3
- and.w #3,d3 ; on test 4 bit a chaque fois pour faire un code genere
- bne.s .bcl0
- move.w #RTSJMP,(a1)+
- addq.w #1,d0
- and.w #15,d0
- bne.s .bcl
- ; 2iem quartet 4 5 6
- moveq #0,d0
- .bclbcl
- move.l a1,(a0)+
- moveq #1,d1
- moveq #4,d3
- .bcl1
- move.w d0,d2
- and.w d1,d2
- tst.w d2
- beq.s .skip2
- bsr copymove
- .skip2
- add d1,d1
- addq.w #1,d3
- cmp.w #7,d3
- blt.s .bcl1
- move.w #RTSJMP2,(a1)+
- addq.w #1,d0
- and.w #7,d0
- bne.s .bclbcl
- ; 3iem quartet 7 8 9 10 11 12 13
- quartet3
- moveq #0,d0
- .bclbcl
- move.l a1,(a0)+
- moveq #1,d1
- moveq #7,d3
- .bcl1
- move.w d0,d2
- and.w d1,d2
- tst.w d2
- beq.s .skip2
- bsr copymove
- .skip2
- add d1,d1
- addq.w #1,d3
- cmp.w #10,d3
- ble.s .bcl1
- move.w #RTSJMP,(a1)+
- addq.w #1,d0
- and.w #15,d0
- bne.s .bclbcl
- quartet4 ; 11 12 13
- moveq #0,d0
- .bcl
- move.l a1,(a0)+
- moveq #1,d1
- moveq #11,d7
- .bcl1
- move.w d0,d2
- and.w d1,d2
- tst.w d2
- beq.s .skip
- bsr copymove
- .skip
- add d1,d1
- addq.w #1,d3
- cmp.w #13,d3
- blt.s .bcl1
- ; cas 13
- move.w d0,d2
- and.w d1,d2
- tst.w d2
- beq.s .skip2
- bsr copymove2
- .skip2
- move.w #RTSJMP2,(a1)+
- addq.W #1,d0
- and.w #7,d0
- bne.s .bcl
- ; 16 +8 + 16 + 8 code genere normalement
- lea listeptrcodegen,a0
- lea 16*4(a0),a1
- lea 8*4(a1),a2
- lea 16*4(a2),a3
- lea lut256adr1,a4
- moveq #7,d6
- .loop0
- move.l (a1)+,d0 ; poid fort premier octet
- moveq #15,d7
- move.l a0,a5
- .loop1
- :move.l d0,(a4)+
- move.l (a5)+,(a4)+
- move.l d0,(a4)+
- dbf d7,.loop1
- dbf d6,.loop0
- lea lut256adr2,a4
- moveq #7,d6
- .loop2
- move.l (a3)+,d0
- moveq #15,d7
- move.l a2,a5
- .loop3
- move.l (a5)+,(a4)+
- move.l d0,(a4)+
- dbf d7,.loop3
- dbf d6,.loop2
- ; table lut256adr1 et lut256adr2 fait
- rts
- copymove
- lea code1,a2
- move.w (a2)+,(a1)+
- move.w d3,(a1)+
- move.w #$8800,(a1)+
- addq.l #4,a2
- move.w (a2)+,(a1)+
- move.w #$8802,(a1)+
- rts
- copymove2
- lea code2,a2
- move.l (a2)+,(a1)+
- move.l (a2)+,(a1)+
- move.l (a2)+,(a1)+
- move.w (a2)+,(a1)+
- rts
- code1
- move.b #0,$ffff8800.w
- move.b (a0)+,$ffff8802.w
- code2
- move.b (a0)+,d0 2
- beq.s .1 2
- move.b #13,AY 2 2 2
- move.b d0,AY2 2 2
- .1
- code3
- waitmyvbl
- move.w d0,-(sp)
- move.w $468.w,d0
- .1 cmp.w $468.w,d0
- beq.S .1
- move.w (sp)+,d0
- rts
- wait100scanline
- move.w d0,-(sp)
- move.w #30,d0
- .waitnop
- rept 128-10
- nop
- endr
- dbf d0,.waitnop
- move.w (sp)+,d0
- rts
- replayZIK
- lea ptreordata,a6
- move.l (a6)+,a2 ; eordata
- move.l (a6)+,a0 ; datapack
- lea lut256adr1,a1
- moveq #0,d1
- move.b (a2)+,d1
- lsl #3,d1
- move.l a1,a3
- add d1,a3
- move.l (a3)+,a4
- move.l (a3)+,a5
- lea suite(pc),a6
- jmp (a4) ; --> JMPRTS = jmp (a5)
- ; --> JMPRTS2 = jmp (a6) = adresse de retour
- suite
- move.b (a0)+,d1
- add d1,d1
- add d1,d1
- add d1,d1
- lea 128*2*4(a1),a1
- move.l a1,a2
- add d1,a2
- move.l (a2)+,a4
- move.l (a2)+,a5
- lea suite2(pc),a6
- jmp (a4)
- suite2
- rts
- ptreordata dc.l eordata
- dc.l datapack
- dc.w 0 ; timer
- lut256adr1 ds.l 256 (tuple)
- lut256adr2 ds.l 256
- ; d7 =%xxxxxxx0
- BSS
- listeptrcodegen ds.l 16+8+16+8
- ; premier 16 adresses: from 0 to 15 quartet de poid faible
- ; 8 adresses: from 0 to 7 quartet de poid fort
- ; 16 adresses: from 0 to 15 quartet du deuxieme octet de poid faible
- ; 8 adresse : from 0 to 7 quartet de poid fort
- ; 128 paire d'adresse a repartir quartet de poid fort, puis quartet de poid faible du premier octet lu
- ; 0 16x 1 16x 2 16x ... 7 16x et les 16x quartet de poid faible
- ; 128 paire d'adresse a repartir , quartet de poid fort puis quartet de poid faible du deuxieme octet lu
- datapack ds.b 14*nbvblzik
- even
- eordata ds.w nbvblzik ; ancienement eorliste
- codegenbss ds.w 9000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement