View Single Post
Old 06 October 2011, 20:33   #2
Thorham
Computer Nerd

Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 37
Posts: 1,826
For the color extraction part you could perhaps do this:
Code:
; assumed format: 0rgb
;
	move.b	#$f0,d6
	moveq	#32-1,d7
.loop
	moveq	#0,d0
	move.b	(a0)+,d0	; assumed red
	move.b	(a0)+,d1	; assumed green
	move.b	(a0)+,d2	; assumed blue

	lsl.w	#4,d0
	and.b	d6,d1
	lsr.b	#4,d2

	or.w	d1,d0
	or.w	d2,d0

	move.w	d0,(a1)
	addq.l	#4,a1

.next
	dbra	d7,.loop
Thorham is offline  
 


Page generated in 0.07319 seconds with 9 queries