English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. AMOS

 
 
Thread Tools
Old 22 July 2021, 17:25   #1
Total Eclipse
Registered User
 
Total Eclipse's Avatar
 
Join Date: May 2005
Location: Atherstone / UK
Age: 49
Posts: 161
Pallette changes

Are there any decent examples of how I can change some of my palette part way down the screen? RAINBOW is fine for raster bars, but I want to be able to change several colours at specific points.

I did consider going down the router of turning off the copper and writing a copper list, however that means I then have to do a lot more heavy lifting in other places.

There doesn't seem to be any examples of how to do this that I can see.
Total Eclipse is offline  
Old 23 July 2021, 21:40   #2
adrazar
Registered User
 
Join Date: Feb 2017
Location: Oslo
Posts: 90
The easiest way to change lots of colours at a specific scanline is to open a new screen! But you'd get a black line and a different bitmap in the process..
With Rainbows you can change colour 0-3 on a single scanline with I believe, but I suppose that's insufficient for your needs. I can think of no particularly good alternatives to the two I've already mentioned, but I have a few ugly ideas that just might work depending on how your display is set up.

The better one is as follows: Define a Rainbow and modify the generated copper list by changing which colour register the Rainbow puts its colour into. That way, if you define all four rainbows, a total of four arbitrary colour registers can be changed on a single scanline.

Another idea is to customise the end of the copper list entirely, but this puts a few limitations on what you can have below that point on the screen; no second screen and no amos-generated sprites. And you have to rush to complete the copper list while the copper is processing it.

To hack the generated copper list using one of the above two methods you need to do the following steps: First turn off Auto View to disable automatic copper list generation. From that point you generate new copper lists with the View command. To find the start address of the next generated copper list, you call Cop Logic before generating it with View. Then whenever a new list has been generated, you search through it for the places you wish to edit, and that's all there is to it really.

(However, if you're only going to have a single screen with neglectible sprite activity, I would perhaps recommend just using Copper Off, as setting up one screen with scrolling is a relatively cheap one-time investment, and after that it would be the easiest thing in the world to change the palette mid-screen.)
adrazar is offline  
 


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

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 09:54.

Top

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