English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   Coders. Asm / Hardware (https://eab.abime.net/forumdisplay.php?f=112)
-   -   Copper Chunky example + source (https://eab.abime.net/showthread.php?t=107015)

roondar 18 May 2021 21:26

Copper Chunky example + source
 
Ever since starting my Amiga development adventures, I've been wanting to create a Copper Chunky screen. Some time ago, I thought it might be nice to turn that into one of my video's & articles. And with that, the next episode in my Amiga Tech series was created.

Naturally, I've included the full source code and a download of the program itself on my website. I had a lot of fun experimenting with this one. Note that my example uses the startup code by Photon of Scoopex and requires at least 1MB of RAM (of which 512KB Chip RAM).

The article/source can be found here:
http://powerprograms.nl/amiga/copper-chunky.html

Here's the YouTube video:
https://youtu.be/ste_ejNVvDk

Note that emulating this using an AGA configuration requires the 'Subpixel Display Emulation' setting to be activated.

ross 18 May 2021 21:53

Excellent and complete article!
:great

StingRay 18 May 2021 22:10

Good stuff indeed, great effort!

mcgeezer 18 May 2021 22:27

Indeed fabulous stuff!

roondar 18 May 2021 23:12

Thanks all. Experimenting with the Copper is always fun :)

saimon69 18 May 2021 23:17

Was this done on AGA? (no, wasn't) What about a 3d floor effect?

Listening to the tutorial you say will need a LUT for every degree of rotation, but i think that you take a limited amount, like 16 or 32 you can still have a decent approximation depending on what you want to do

roondar 18 May 2021 23:41

Quote:

Originally Posted by saimon69 (Post 1484779)
Was this done on AGA? (no, wasn't) What about a 3d floor effect?

Haven't thought about that type of effect yet. Who knows though, I'm always looking for inspiration for these videos :)
Quote:

Listening to the tutorial you say will need a LUT for every degree of rotation, but i think that you take a limited amount, like 16 or 32 you can still have a decent approximation depending on what you want to do
The problem I ran into was simply one of raster time. I don't really have the time to make any decisions during the inner loop of the drawing phase. I suppose you can make it work by making multiple different routines that do mirroring for you and picking and choosing which one to select. However, I did try something like that originally with the rotation and it ended up not being so easy because the calculation changed as well.

It may be worth trying something different here for a 'real' release/demo, but for an introduction/example I think this is good enough ;)

arcanist 19 May 2021 01:12

Nice! I played with copper chunky a while back but didn't get beyond 8 pixel resolution. :great

LaBodilsen 19 May 2021 08:11

Looks sweet.

With this you could easily do per line zooming, with different zoom values for every X or Y line, to make a wobble/wave like effect.

Guess the tables could also make a ring-ripple effect from center.

khph_re 19 May 2021 10:27

Beautifully explained. Behind the smoke and mirrors of Demo effects. Loved it!

Antiriad_UK 19 May 2021 10:34

Awesome. I need to go through this in detail because on first glance I'm like "wtf how what" :)

roondar 19 May 2021 11:05

Quote:

Originally Posted by LaBodilsen (Post 1484835)
Looks sweet.

With this you could easily do per line zooming, with different zoom values for every X or Y line, to make a wobble/wave like effect.

Guess the tables could also make a ring-ripple effect from center.

Yup, all those should be doable. In fact, clever use of table entries can make effects that last much longer and are much more varied than the ones I've shown :great
Quote:

Originally Posted by khph_re (Post 1484865)
Beautifully explained. Behind the smoke and mirrors of Demo effects. Loved it!

Quote:

Originally Posted by Antiriad_UK (Post 1484866)
Awesome. I need to go through this in detail because on first glance I'm like "wtf how what" :)

Thanks, it was a lot of fun to do as well :)

no9 19 May 2021 12:24

As always great finding Roondar, and also explained smoothly!

Tigerskunk 19 May 2021 12:47

Always something new to learn from Amiga coding guru Roony. :great

WayneK 19 May 2021 12:58

Really good explanation of everything, thanks!
I always thought that rotozoomers precalced 90 degrees of rotation and just used 4 pre-rotated versions of the source image (pre-rotated during startup/init) to avoid having so many tables? But that is possibly a false economy depending on the source image size :P

DanScott 19 May 2021 13:03

Quote:

Originally Posted by WayneK (Post 1484900)
Really good explanation of everything, thanks!
I always thought that rotozoomers precalced 90 degrees of rotation and just used 4 pre-rotated versions of the source image (pre-rotated during startup/init) to avoid having so many tables? But that is possibly a false economy depending on the source image size :P

For efficiency, most rotozoomers will precalculate the code for generating a line worth of copper data using unrolled moves:

eg.

move.w XX(a0),YY(a1)
move.w XX(a0),YY(a1)
move.w XX(a0),YY(a1)
move.w XX(a0),YY(a1)
......
......
......
......
rts


with XX being the text source offset, and YY being the copper list address offset

roondar 19 May 2021 14:16

To be clear, this is my take on the rotozoomer - it's certainly possible other or better ways exist. It seemed to be the best option to me at the time. I did try to make use of the symmetry in rotation by only creating 90 degrees of pre-calculated table, but I couldn't make it work in time for this to be released so I gave up (it was either too slow or just didn't draw the correct images).

I'm interested in knowing how that code-precalculation is supposed to work though, any info on what exactly is being done?

modrobert 19 May 2021 17:21

roondar,

Thanks for the lesson, learned something again, and subscribed.

I had no idea these chunky tricks were done in precalculated copper tables, although was aware of the cosinus/sinus tables for integer speed.

jotd 19 May 2021 17:54

roondar I like the video, and also the humility you put in that video.

Why can't we change 1 color per 1 pixel line damnit ? :)

I wonder what was used in the "Brian the lion" title screen with Brian letters wobbling all over.

Isn't it possible to "pipeline" the changes and create 1 pixel color with enough colors? say 8 colors? (possibly what I'm saying is stoopid)

redblade 19 May 2021 22:17

Great tutorial, Also thumbs up for mentioning dr dobbs, I love looking at the articles in that and byte magazine, so much code from the golden days :)

Good on you for giving love to Amanita Muscaria, I haven't eaten those in years, I prefer psilocybin


All times are GMT +2. The time now is 02:22.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04785 seconds with 11 queries