English Amiga Board

Go Back   English Amiga Board > Main > Retrogaming General Discussion

Thread Tools
Old 10 August 2022, 01:18   #1
J.M.D - Bedroom Musician

Join Date: Apr 2014
Location: los angeles,ca
Posts: 2,842
[what if] localized CLUT change

Am still not a programmer, and i doubt will be one at this level for a long while, but i sometimes wonder if is possible to have the copper point to a different CLUT per sprite according to location on the screen horizontally, so to have same sprite but different palette used - even though that might produce color clash. I remember Ross saying that the CLUT pointer change procedure takes too much raster time to be useful, but am double checking.
saimon69 is online now  
Old 10 August 2022, 10:04   #2
Registered User
thomas's Avatar
Join Date: Jan 2002
Location: Germany
Posts: 6,733
There is no CLUT pointer. The CLUT is always at the same address, $DFF0180 IIRC. In order to change colors you have to change each CLUT entry.

Given that the sprite only uses four colors, it might be possible. If you don't need the copper for other tricks.
thomas is offline  
Old 10 August 2022, 13:52   #3
Lemon. / Core Design

DanScott's Avatar
Join Date: Mar 2016
Location: Tier 5
Posts: 1,128
Sprite actually only uses 3 colours as colour 0 is transparent.

With up to 4 bitplanes active, it would take 24 lo-res pixels to change all 3 colour entries.
DanScott is offline  
Old 10 August 2022, 19:17   #4
J.M.D - Bedroom Musician

Join Date: Apr 2014
Location: los angeles,ca
Posts: 2,842
That makes it sound useless, will miss the sprite coords by 8 pixels -_-
saimon69 is online now  
Old 10 August 2022, 21:31   #5
Registered User
saimo's Avatar
Join Date: Aug 2010
Location: Italy
Posts: 556
On AGA you can (kind of) do what you're after with a single write to BPLCON4 - check it out.
saimo is offline  
Old 11 August 2022, 19:32   #6
Registered User

Join Date: Dec 2014
Location: germany
Posts: 375
An idea I haven't tested myself:

The sprites are planar, so you could achieve a similar effect by using some planes as an offset to the CLUT. For example: Use attached sprites and organize them as 4 banks with 4 colors each. Then writing a bitplane mask with the copper in SPRxDATA and/or SPRxDATB of one of the attached sprites switches between those "banks". Needs max 2x register write for a bank switch, the copper is able to perform a write every 8 pixels (when not using more than 4 bitplanes), so you can switch a bank every 16 pixels. If you switch the banks always in the same order (e.g. 0-1-3-2), you can get away with one copper write per bank switch.

Does only work with 16 pix wide sprites, but on AGA you have better options anyway, as saimo wrote.

Last edited by chb; 11 August 2022 at 19:43.
chb 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
Localized Sierra games malko support.Games 3 26 March 2021 09:56
Typeface - Can't edit some fonts to add localized characters + more questions ancalimon support.Apps 0 03 August 2020 15:56
My (MAI) list of non english or special localized games mai request.Old Rare Games 27 23 September 2016 23:45
Indexed image (CLUT) programming resources Unch Coders. General 2 27 January 2008 17:17
change the cd-rom unit number(sorry wrong place if a moderator can change) turrican3 support.OtherUAE 19 05 May 2007 00:27

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 06:56.

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