Quote:
Originally Posted by ross
The only fast thing that comes to my mind to make a flip around the y axis is through lockup table (8bit flip through a 256byte table and then shuffle positions or 16bit flip through a 64kwords table then swap) or much more convoluted and slow with the blitter.
|
Perhaps this:
This code is wrong, see my post below for corrected version.
Code:
move.l #$55555555,d1
eor.l d0,d1
eor.l d1,d0
add.l d1,d1
lsr.l #1,d0
or.l d1,d0
move.l #$33333333,d1
eor.l d0,d1
eor.l d1,d0
lsl.l #2,d1
lsr.l #2,d0
or.l d1,d0
move.l #$0f0f0f0f,d1
eor.l d0,d1
eor.l d1,d0
lsl.l #4,d1
lsr.l #4,d0
or.l d1,d0
rol.w #8,d0
swap d0
rol.w #8,d0