Thread: Displayscroll
View Single Post
Old 30 April 2016, 01:00   #7
Cylon
Registered User
 
Join Date: Oct 2014
Location: Europe
Posts: 471
Displayscroll AGA multiple bplanes

Finally got the time to nail the b*tch down.

I always knew there was a strange offset between the odd and the even planes, but never took the time to investigate further.
Well, until now.

I narrowed it down to <1> subpixel (hires pixel in lowres) i believe. The rest is up to the real coders.

First i tried to use the offset parameter in displayscroll cmd, this doesn't seem to work.
Then i constantly tried to get closer to the offset by using a very small step per line tracing downwards without the wobbling, of course.
Finally got the number 13 (well: 12.x to 13.x) as the offset for this very 8 colour bitmap. This offset can be placed anywhere, depending on the effects you want to create. Best is at (0) position in the even-array.

I hope this is usefull. Src below.
Remember: Cylon did it.
Code:
;display scroll adapted by cylon

DEFTYPE.w
BitMap1,320,256,3

LoadBitMap1,"face8.iff",1  ;3planes 8 cols

VWait50
BLITZ

BitMapOutput1    ;print onto bmap

Locate 2,28:Print "THIS IS AGA DISPLAYSCROLL"
Locate 2,30:Print "<<<<< Move Mouse >>>>>"
Use BitMap1

;For a=7To1 Step -1
;  b=1-b
;  Circlef160,128,10*a,10*a,b
;Next

InitCopList1,44,256,$10003,8,8,-$10

CreateDisplay1

DisplayBitMap1,1

DisplayPalette1,1

For y=0 To7                           ;debug colour boxes

  Boxf 0,y*16,7,y*16+15,y

  Locate2,y*2+0.5:Colour1:Print y

Next y

Dim xpo.q(256),xpe.q(256)

a=0
VWait150
Mouse On

tpi.q=2*Pi  ;precalc

xpe(0)=-13  ;offset for even planes start at ypos=0
;not quite accurate! sub-pixel fetch or what the hell....

While Joyb(0)=0

 For a=1 To 253
   d.q+Pi/18:If d>tpi Then d=0.0

   c.q=Sin(d)+(MouseX-160)/160

   xpo(a)=c

   xpe(a)=c  ;same as odd, but with offset

 Next
 VWait

 DisplayScroll1,&xpo(0),&xpe(0);,-13 offset does not work here?

 VWait
Wend

VWait25
QAMIGA
End

NoCli:CloseEd
You can create strange effects if you arrange your colour registers wisely. Like a counter-wobbling of odd/even bplanes.
Or, avoid all even planes in a pictures back but use only those even planes to scroll or wobble on top.
Attached Thumbnails
Click image for larger version

Name:	DispScr_screensht.jpg
Views:	504
Size:	159.5 KB
ID:	48313   Click image for larger version

Name:	bb2dispscr_new0.JPG
Views:	481
Size:	126.9 KB
ID:	48314   Click image for larger version

Name:	bb2dispscr_new1.JPG
Views:	465
Size:	155.0 KB
ID:	48315  
Attached Files
File Type: lha BB2_dispScroll.lha (21.2 KB, 387 views)

Last edited by Cylon; 30 April 2016 at 01:07.
Cylon is offline  
 
Page generated in 0.04705 seconds with 12 queries