View Single Post
Old 01 June 2018, 16:31   #4
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,810
Quote:
Originally Posted by ross View Post
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

Last edited by Thorham; 03 June 2018 at 00:10.
Thorham is offline  
 
Page generated in 0.04970 seconds with 10 queries