Welcome, Guest. Please login or register.

Author Topic: I made my first demoscene effect in assembler!  (Read 6961 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show all replies
    • http://www.amigaskoolnet
I made my first demoscene effect in assembler!
« on: November 26, 2006, 01:12:55 AM »
Hi, i made my first demoscene effect in assembler, i made little things in assembler some years ago, but now i'm learning a lot. I decided to make my first assembler effect this weekend, and i got it! I made a Chunky to Copper routine, and a rotozoomer effect. On my A600 is very slow, but on my A1200 with a 060, it runs very smoothly. I'm not very good with assembler (i'm a newbie), if somebody can give some suggestions to optimize my code, i will share my code:

ASM Source code

Executable

Thanks in advance.
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show all replies
    • http://www.amigaskoolnet
Re: I made my first demoscene effect in assembler!
« Reply #1 on: November 27, 2006, 12:42:01 PM »
Thanks a lot for your help, i decided to recode the routine, now i calculate the rotation of 3 points, with this 3 points i calculate the increment for every horizontal and vertical step, in ADA forum, an user gave me a link with a tutorial to make this effect as i explained. Now my routine works at decent speed on a plain A1200. I uploaded the new source and executable with the same name.
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show all replies
    • http://www.amigaskoolnet
Re: I made my first demoscene effect in assembler!
« Reply #2 on: November 27, 2006, 10:23:21 PM »
I made some changes from last version, i mixed Piru code with mine, my changes are: improve rotation (more smoothness), constants to define screen size, initial raster position, box map size and useless copper list instructions was removed.

I think that my next step will be make an AGA version with a 4x1 pixel definition, and a small 4k intro maybe...

@Piru: i will learn a lot from your changes, thank you.
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show all replies
    • http://www.amigaskoolnet
Re: I made my first demoscene effect in assembler!
« Reply #3 on: December 01, 2006, 10:46:33 PM »
I'm trying to make an AGA chunky 2 copper routine, but i can't get a 4x1 pixel definition, i got some sources from aminet, and i have some questions.

The examples i tested, create a copper list with 7 bitplanes, change colors of differents color banks, but chunky 2 copper routine work setting color0? then why AGA Chunky2copper changes others colors?

What need to be added to a copper list to have an AGA copper list with a 4x1 pixel definition? i made the swaps of hi and low words on copper list colors, but i got 8x1 pixel definition. I need to add 7 empty bitplanes?

I found on google groups, old messages explaining chunky2copper tips, but i can get it working, i read that  you can get 4x1 pixel definition with ECS and 2x1 with AGA. Somebody can explain this tip better?

http://groups.google.es/group/comp.sys.amiga.programmer/browse_thread/thread/ec4c0c74850913fe/06f1e2632d149d7d?lnk=st&q=12bit+aga+copper+list&rnum=4&hl=es#06f1e2632d149d7d

Thanks in advance.
Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show all replies
    • http://www.amigaskoolnet
Re: I made my first demoscene effect in assembler!
« Reply #4 on: December 07, 2006, 03:16:16 PM »
Quote

DamageX wrote:
1) turn off all bitplanes 2) set the low bits in FMODE (register 1FC) and use a 32-bit aligned copper list


I tried it but i can't get 4x1 pixel resolution, i'm not sure if i need to turn off all bitplanes, i read that setting FMODE to 3 can speed up copper, but only if exist bitplanes, i tried it also and don't work.

Balrog Software · http://www.amigaskool.net
Mac Mini G4 1,5ghz · MorphOS 2.7 · Ati Radeon 9200 64Mb · 1 Gb RAM · 80 GB HD
Efika · MorphOS 2.7 · Ati Radeon 9250 128Mb · 120 Gb WD HD
Amiga 1200T · OS 3.9 · Voodoo3 · Blizzard 603e/240mhz 060/50mhz · 98 Mb RAM · 40 GB HD
Amiga 600 · OS 3.1 · ACA 630/25mhz 32 Mb RAM · 4Gb CF