English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 12 April 2021, 19:01   #1
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
Quickest way to update the entire palette in Copperlist

What would be the nicest way to replace the complete palette in copperlist?

Actually I can achieve that by having two copperlist and change them with CopJumpL but I wonder if there are other ways, like having both palettes in copperlist and somehow change the pointers but I have no idea.

may use some help from experts
KONEY is offline  
Old 12 April 2021, 19:24   #2
DanScott
Lemon. / Core Design
 
DanScott's Avatar
 
Join Date: Mar 2016
Location: Tier 5
Posts: 1,209
It depends what you mean.. do you want to change the palette completely at various positions down the screen?

Or do you just want to change one palette?
DanScott is online now  
Old 12 April 2021, 20:56   #3
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
If I am not misunderstood you, you would like to avoid duplicating the copperlist after the palette setup.
Simply put the jump inside the copper list itself.

Code:
Copperlist:
color_setup1
setup_copper_pointer_to_'copper_common'
jmp
color_setup2
copper_common:
copper_end
ross is offline  
Old 13 April 2021, 00:48   #4
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
Quote:
Originally Posted by DanScott View Post
It depends what you mean.. do you want to change the palette completely at various positions down the screen?

Or do you just want to change one palette?
change at the same time every single color of 32 to a new one and then revert.
KONEY is offline  
Old 13 April 2021, 00:52   #5
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
Thanks! but sorry, I did not understand What do you mean with "jump" in copperlist?

And how would the switch be triggered?

Quote:
Originally Posted by ross View Post
If I am not misunderstood you, you would like to avoid duplicating the copperlist after the palette setup.
Simply put the jump inside the copper list itself.

Code:
Copperlist:
color_setup1
setup_copper_pointer_to_'copper_common'
jmp
color_setup2
copper_common:
copper_end
KONEY is offline  
Old 13 April 2021, 06:17   #6
Rotareneg
Registered User
 
Rotareneg's Avatar
 
Join Date: Sep 2017
Location: Kansas, USA
Posts: 324
http://amigadev.elowar.com/read/ADCD.../node0051.html
Rotareneg is offline  
Old 13 April 2021, 13:55   #7
KONEY
OctaMED Music Composer
 
KONEY's Avatar
 
Join Date: Jan 2009
Location: Venice - Italy
Age: 49
Posts: 666
Thanks, OK! this is what I had in mind with my initial solution.

Only one thing, docs says:

Quote:
COPJMP1/Restart Copper from address contained in COP1LC .
So copper will restart from COP1LC, not continue. Am I wrong?
KONEY is offline  
Old 13 April 2021, 15:54   #8
ross
Defendit numerus
 
ross's Avatar
 
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,468
Of course depends on how you are handling ramaining part of the copper list, but there are two ways:
1) set the second copper pointer and jump there
2) reset the first copper pointer to the initial address of the list before the end of the frame
ross is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Quickest way to add two colours Antiriad_UK Coders. Asm / Hardware 30 18 December 2020 12:29
Updating part of a CopperList's palette? (DisplayLibrary) earok Coders. Blitz Basic 3 29 August 2018 02:49
Quickest way to test collisions Shatterhand Coders. Blitz Basic 136 27 June 2018 23:51
Quickest code.... Galahad/FLT Coders. Asm / Hardware 10 01 January 2017 17:23
What is the quickest way Doc Mindie support.WinUAE 6 17 October 2007 21:15

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:43.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09028 seconds with 15 queries