![]() |
![]() |
#1 |
Registered User
Join Date: Oct 2009
Location: USA
Posts: 111
|
Copper color-changing restrictions?
What are the restrictions on the copper's ability to switch colors between scanlines? I know that it has to be in a gradient, but I don't know anything else.
|
![]() |
![]() |
#2 |
Needs a life
![]() Join Date: Jan 2008
Location: England
Posts: 1,707
|
No restrictions. It doesn't have to be in a gradient, either. And you can switch during a scanline - quite a lot of demos use this for a copper plasma effect...
|
![]() |
![]() |
#3 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
The copper can be used to change colours line to line and also within a line.
Within a line there's a limit on colour changes - if I remember correctly the limit is a change every 8 pixels - this is due to a limit on DMA. To change line to line, you wait for a line and change a colour, wait for the next line, change a colour, as follows: Code:
$2007,$fffe,color00,$0555 $2107,$fffe,color00,$0fff Code:
$2007,$fffe,color00,$0111 color00,$0222,color00,$0333 Bear in mind that if you do the second example you'll have to change the colours several times before you see the change on screen, either that or change the horizontal wait position - in this case you'd change the $07 in $2007 to something larger, say $35 and then you'll see the colour changes sooner. Any other questions, just shout. ![]() Last edited by pmc; 29 January 2010 at 20:20. Reason: Typos... |
![]() |
![]() |
#4 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
The copper can be used to change the contents of any of the custom chip registers, and this includes the color registers. The copper therefore isn't limited to changing colors, but can be used to setup whole displays for example. Or control sprites, or program the blitter, or... you get the picture
![]() The speed at which these copper moves happen is eight lowres pixels in the border area (without overscan you can set fifteen 12bit colors per scanline in the border), and eight pixels in the screen area for low color modes (16 colors or less). As said before, there aren't any restrictions, except for speed. |
![]() |
![]() |
#5 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Actually if you have nothing more than a lowres 16 color display then you have enough time to change all 16 colors each line. You can do at most 57 move instructions per line under the best circumstances.
|
![]() |
![]() |
#6 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
Do you mean that you can change all 16 between the end of one line and the start of another, or all 16 during the total length of the scanline?
Edit: Dur, didn't read the post above. 15 in the border. |
![]() |
![]() |
#7 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Sorry, I meant 16 color changes/move instructions between end of the line and start of the next yes, and I just noticed you can do 17 in fact.
|
![]() |
![]() |
#8 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Edit: You checked, and it's 17 moves during the border? |
|
![]() |
![]() |
#9 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
|
![]() |
![]() |
#10 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Yep. The blue color changes are the 17th and the 57th respectively here:
|
![]() |
![]() |
#11 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
WinUae is nice and all, but has anyone checked this with actual hardware?
|
![]() |
![]() |
#12 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
I haven't got my Amiga here so I can't test, but I trust WinUAE A500 CE mode to be accurate. I've attached the exe here, do you get the same result?
|
![]() |
![]() |
#13 |
TDI
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
|
|
![]() |
![]() |
#14 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
Yeah, if you add more bitplanes or disk, sprite or audio DMA then they will start stealing too many cycles from the copper. But let's hear from someone with a real Amiga hooked up first
![]() |
![]() |
![]() |
#15 | |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
![]() Off topic: I really wish some company would just buy all the cool old chip sets from Nes to Aga and make the ultimate retro machine. With all those emulators out there, there's probably a big market for a simple box that allows running software from old console and computer platforms. |
|
![]() |
![]() |
#16 | |
Moderator
Join Date: Nov 2004
Location: Eksjö / Sweden
Posts: 5,655
|
Quote:
Yes, I have. Don't have time to dig up my "little experiments", I'm gonna let Leffman supply the hard data in the meantime... From memory, Basically the copper, just like the CPU, can move a word in 4px clocks. Since the copper needs 2 words to change a color (registernumber, value), it can go no faster than 8px per color change. As you add bitplanes (why ruin the beautiful chunky pixel display... with stuff covering it??) bitplane DMA will steal cycles from the CPU (but not the copper) until you have 5 or 6 bitplanes on, then copper can change color every 12px and 16px resp, while the CPU is in trouble (and will concede priority to the copper ofc). So the CPU will be twice as fast in the hblanking, if you want to change palettes each scanline, so 32 colors are certainly possible with only a little overscan, you can increase overscan a smidgeon if you turn off sprite,disk,audio dma. So. Put simply, both copper and bitplane dma will compete with the CPU's ability to do palette changes, so don't use them "in overlapping raster time". On AGA it should be the same, only the pixelclock is twice as fast. |
|
![]() |
![]() |
#17 |
Amiga will never die!
|
Sorry this isn't going to help answer any technical questions, but if you'd like to play around with the Copper's ability to change colours all over the screen, give CopColEd a try. It lets you make gradients as well as full screen images with the Copper.
http://aminet.net/package/dev/moni/CopColEdV12 I quickly made this with it http://i50.tinypic.com/29w94ck.jpg |
![]() |
![]() |
#18 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
@ Photon - I'm sure I read somewhere that the copper gradient you used in Blitter Sweet used a trick that allows selection from a larger than 4096 colour palette. Is that correct? If so, care to give us an insight into how that's done?
|
![]() |
![]() |
#19 | |
Registered User
Join Date: Jun 2008
Location: somewhere else
Posts: 524
|
Quote:
|
|
![]() |
![]() |
#20 |
gone
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
|
Ah OK, that makes sense - thanks hitchhikr.
So maybe have two identical copper lists (obviously except for the colour changes...) and flip them sequentially? Wouldn't that lead to some kind of flicker though? A bit like what happens when colours are interlaced on the C64 in some graphics modes? |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Combining copper scrolling with copper background | phx | Coders. Asm / Hardware | 16 | 13 February 2021 12:41 |
Color Saturation and Color Tint/Hue | Retro-Nerd | support.WinUAE | 22 | 02 August 2018 10:38 |
Printing in color with WinUAE on color laser | source | support.Apps | 7 | 14 April 2013 00:32 |
Color difference | Leandro Jardim | support.WinUAE | 3 | 16 November 2012 08:51 |
ISO true color to 256 color algorithm | Lord Riton | Coders. General | 19 | 15 April 2011 17:49 |
|
|