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

Thorham's Avatar
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 42
Posts: 3,046
For the color extraction part you could perhaps do this:
; assumed format: 0rgb
	move.b	#$f0,d6
	moveq	#32-1,d7
	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

	dbra	d7,.loop
Thorham is offline  
Page generated in 0.03973 seconds with 10 queries