Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VInt:
- clr.b (HINTTIMER)
- movem.l d0-a6, -(sp) ; Back up regs
- cmp.b #100, (VBLCount) ; We increase at the end of this routine - 51 is after the 50th run
- bne.s @NoReset2
- clr.b (VBLCount)
- @NoReset2:
- ; jmp *
- lea ColourTable, a0
- lea BarColourArray, a1
- lea BarColourArray+64, a2
- lea BarColourArray+128, a3
- lea Sine, a4
- moveq #0, d0 ; Starting pointeruuuuu Blueu
- moveq #0, d1 ; Starting pointeruuuuu Redu
- moveq #0, d2 ; Starting pointeruuuuu Gurenuuu
- moveq #0, d3
- move.b (VBLCOUNT), d3
- move.b (a4,d3.w), d0
- add.b #16, d3
- move.b (a4,d3.w), d1
- add.b #16, d3
- move.b (a4,d3.w), d2
- moveq #0, d3
- moveq #0, d7
- clr.b (CountBlue)
- clr.b (CountRed)
- clr.b (CountGreen)
- @LoopScanlines:
- moveq #0, d4
- moveq #0, d5
- moveq #0, d6
- cmp.b d0, d3
- blo.s @NoBlu
- cmp.b #32, (CountBlue)
- bhs.s @NoBlu
- move.w (a1)+, d4
- addq.b #1, (CountBlue)
- @NoBlu:
- cmp.b d1, d3
- blo.s @NoRed
- cmp.b #32, (CountRed)
- bhs.s @NoRed
- move.w (a2)+, d5
- addq.b #1, (CountRed)
- @NoRed:
- cmp.b d2, d3
- blo.s @NoGrn
- cmp.b #32, (CountGreen)
- bhs.s @NoGrn
- move.w (a3)+, d6
- addq.b #1, (CountGreen)
- @NoGrn:
- or.w d4, d5
- or.w d5, d6
- move.w d6, (a0)+
- addq.b #1,d3
- cmp.b #224, d3
- bne.s @LoopScanlines
- addq.b #1, (VBLCount)
- movem.l (sp)+, d0-a6 ; Restore regs
- rte
Add Comment
Please, Sign In to add comment