Welcome, Guest. Please login or register.

Author Topic: What is a Copper Chunky2Planar?  (Read 3645 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
What is a Copper Chunky2Planar?
« on: August 30, 2006, 09:51:31 AM »
I read somewhere about copper c2p techniques, it seem to be an easy method to make c2p, but what is it exactly? it give you a pixel definition of 4x1 (this is the limit for lowres screen on a copper list, or i'm wrong?) ?  It is based on write directly to copper list to change the colors on a specific raster position?

If it is easy to implement that a normal c2p routine, i want to implement as a first step to programming some effects that needs c2p. As i understand with a copper c2p routine you have also all bitplanes to make more stuff.

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 SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: What is a Copper Chunky2Planar?
« Reply #1 on: August 30, 2006, 04:25:30 PM »
Copper chunky is separate from chunky to planar.  With a copper chunky you set up a 1 color screen (0 bitplanes) and set up the copper to go as fast as it can and set up the screen as a bunch of copper move instructions to color palette entry 0.  This will allow 12-bit high-color resolutions of 80x256x4096 on ECS and I think 160x256 on AGA.  I'm not sure if the AGA chipset can display more than that but be sure that you don't have the black-border option set or you'll get a black screen.

Chunky to planar routines convert 8-bit chunky to 8-bit planar on the AGA chipset so you get the full resolution displays.  This doesn't use the copper as far as I know.
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
Re: What is a Copper Chunky2Planar?
« Reply #2 on: August 30, 2006, 04:47:28 PM »
I supposed that it was something like your explanation. But this type of chunky to copper conversion is easy to code than chunky to planar conversion? if i'm not wrong it should be easy, as you can specify the color directly, you don't need to write color bits on different planes.
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 SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: What is a Copper Chunky2Planar?
« Reply #3 on: August 30, 2006, 04:59:15 PM »
Yes.  Each copper move is an array entry and you can change the colors by changing the color of the copper move instruction directly.  Copper chunky can use the blitter directly to copy sections of the copper list but you must be sure not to use the blitter-based line-drawing instructions becuase there is no way to insure that the pattern draw of the line drawing instructions will be forced to a 16-bit boundary.

Doing chunky to planar may be as easy as using the WritePixelArray8() function in Kickstart 3 but it is typically patched by graphics card drivers so that it will be faster on a graphics card.  The primary advantage of chunky to planar is that it will use the host screen resolution.  Many games use C2P routines becuase copper chunky has such low resolution.
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
Re: What is a Copper Chunky2Planar?
« Reply #4 on: August 30, 2006, 05:40:35 PM »
Thanks a lot for your explanation! Chunky to copper don't give a high resolution graphics, but i'm learning asm and this method is easy to implement, i think that is enough for my first asm intro.

Quote

Doing chunky to planar may be as easy as using the WritePixelArray8() function in Kickstart 3 but it is typically patched by graphics card drivers so that it will be faster on a graphics card.


Yes, WritePixelArray8() is easiest method, it is funny develop your own chunky routines.
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 SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: What is a Copper Chunky2Planar?
« Reply #5 on: August 30, 2006, 05:53:05 PM »
You're welcome!  Feel free to look at http://aminet.net/ and search for "copper" to find editors, example source codes, and demos that use the copper to do special effects.
 

Offline DamageX

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
Re: What is a Copper Chunky2Planar?
« Reply #6 on: August 31, 2006, 05:14:37 AM »
Quote
As i understand with a copper c2p routine you have also all bitplanes to make more stuff.

You can't use bitplanes on the same lines as copper chunky modes because bitplanes would prevent the copper from copying pixels at full speed.
 

Offline balrogsoftTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2006
  • Posts: 186
    • Show only replies by balrogsoft
    • http://www.amigaskoolnet
Re: What is a Copper Chunky2Planar?
« Reply #7 on: August 31, 2006, 08:51:06 AM »
Quote

DamageX wrote:
You can't use bitplanes on the same lines as copper chunky modes because bitplanes would prevent the copper from copying pixels at full speed.


Then how to made things like this demo? (take a look to screenshots 3 and 5) These effects are like a chunky to copper, because have a big horizontal pixel size, and have bitmaps drawed on screen, but maybe is a chunky to planar:

http://ada.untergrund.net/showdemo.php?demoid=505
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 SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: What is a Copper Chunky2Planar?
« Reply #8 on: August 31, 2006, 05:29:57 PM »
With Copper Chunky there is only a limited amount of bandwidth that is available for copper lists while displaying bitplanes but on ECS it makes little difference since there is no additional bandwidth allocated for the copper lists when there are no bitplanes.

Walls1.7 takes advantage of this by displaying 3 bitplanes of screen images overlapping the copper chunky backdrop.  Any more than 3 bitplanes on the ECS chips will cause the blitter to steal DMA channels from the copper and ruin the copper-chunky effect.
 

Offline DamageX

  • Sr. Member
  • ****
  • Join Date: Jun 2005
  • Posts: 339
    • Show only replies by DamageX
    • http://www.hyakushiki.net/
Re: What is a Copper Chunky2Planar?
« Reply #9 on: September 01, 2006, 05:26:20 AM »
Quote
Walls1.7 takes advantage of this by displaying 3 bitplanes of screen images overlapping the copper chunky backdrop.

It doesn't look to me like a copper chunky backdrop, just a copper "rainbow"
Quote
Any more than 3 bitplanes on the ECS chips will cause the blitter to steal DMA channels from the copper and ruin the copper-chunky effect.

Uh oh, now I'm confused. I don't see how this could be possible. How many memory accesses are needed for each copper chunky pixel? One instruction and one data? Or can the copper have one instruction followed by a whole line worth of data? Does copper list DMA have priority over CPU access to chipmem?
 

Offline SamuraiCrow

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 2280
  • Country: us
  • Gender: Male
    • Show only replies by SamuraiCrow
Re: What is a Copper Chunky2Planar?
« Reply #10 on: September 01, 2006, 04:19:53 PM »
@DamageX

You must have an earlier version of the Walls demo.  The one I'm referring to had clouds in a copper chunky format.

The point I'm making is that only the AGA version of copper chunky requires all of the bitplanes be disabled because that is the only way to get the copper list to execute in 4x mode timing.

The ECS version of copper chunky has fixed timing for the copper not related to the bitplane usage therefore having some bitplanes active doesn't affect the copper as long as the blitter doesn't have problems accessing its own bandwidth independantly of the display DMAs.

The blitter has more priority over the DMAs than either the CPU or the Copper I think.  It can steal a DMA if there aren't enough for both the blitter and the display DMA.