A.D.A. Amiga Demoscene Archive

        Welcome guest!

  

  

  

log in with SceneID

  

Demos Amiga Demoscene Archive Forum / Coding / Vertical scaling with the copper

 

Author Message
nemas
Member
#1 - Posted: 3 Dec 2013 20:03
Reply Quote
Hi,

I have been looking around a bit to figure out how to do the vertical zoom/scale used in many demos (two examples here)

http://www.youtube.com/watch?v=M0VEcNo8QdY&t=4m40s

http://www.youtube.com/watch?v=--0altTjjFE&t=3m40s

As I understand it this effect can be achieved by setting bpl1mod and bpl2mod to a negative value but the details is a bit unclear so I wonder if anyone could give some more hints how it works?

Thanks!
dalton
Member
#2 - Posted: 4 Dec 2013 09:50
Reply Quote
Using bplmod you can choose what row of your picture you want to display on a specific row of the screen.

Say variable y is the screen rows, and v is the picture rows in whatever range. You have an idea of what picture row should be shown on each screen row, a function v(y).

You give each screen row it's own modulo m (using a copperlist), the function m(y).

Assume picture and screen both have a width of 40 bytes.

Now since modulo and screen width are added to the bitplane pointers each line, we have this connection:

v(y) = v(y-1) + m(y) + 40

Now we know how to set m(y) to achieve a desired v(y) given that we know v(y-1).
v(0) is the first row to be displayed and it's given by the bitplane pointers, not modulo.

For example, by setting m(y) = -40 you get v(y) = v(y-1), ie the same row is displayed twice (stretched over two screen rows)
nemas
Member
#3 - Posted: 4 Dec 2013 21:32
Reply Quote
Now it makes sense.

Thanks!

 

  Please log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0