68060-optimised texture mapping – part 1 July 3, 2006
Posted by winden in coding, demoscene.trackback
So, hanging out on the ADA forums, we came up with a conversation about 060-specific optimising, which is sort of like pentium-specific (U/V pipes of fame) optimising. 060 has pretty harsh rules for address generation delays, so there is ample of oportunity to try ingenious ways to reorder stuff as to get no half-cycles wasted… linky linky provided for your pleasure ;)
The only real limitation I can see for this mapper is that the loop count has to be less than 255, but then again I don’t believe in big polygons :P
; ; 8 cycle per 2 pixels 8.16 mapper ; remixed from an ADA thread contributed by ; krishna^scoopex, kalms^the.black.lotus, ; krabob^mankind and winden^network^batman.group ; ; d0 vvUUuuuu a0 dvDUdudu ; d1 cc--VVvv a1 ; d2 dc--DVdv a2 ; d3 --UUVV-- 0 a3 ; d4 --UUVV-- 1 a4 ; d5 pixel buffer a5 tex ; d6 a6 scr ; .xloop move.b (a5,d3.w),d5 ; p1 move.l d0,d3 ; s1 move.b d5,(a6)+ ; p2 move.w d1,d3 ; s2 lsr.l #8,d3 ; p3 add.l a0,d0 ; s3 addx.l d2,d1 ; p4 move.b (a5,d4.w),d5 ; p5 move.l d0,d4 ; s5 move.b d5,(a6)+ ; p6 move.w d1,d4 ; s6 lsr.l #8,d4 ; p7 add.l a0,d0 ; s7 addx.l d2,d1 ; p8 bcc .xloop ; p9 if not predicted, zero if predicted rts
Q pasa winden! este blog ta ma wapo! estare unos dias sin ir x la oficina… ya te ire contando… te llamare al movil