News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_freemac

CPC+ color palette

Started by freemac, Today at 15:30

Previous topic - Next topic

dxs and 1 Guest are viewing this topic.

freemac

Hi,

In CPC 6128 we have "only" 27 colors
I ask about using more color in CPC+, does it just change a 27 colors palette ?
In other way can I theoricaly hack for sample super cauldron ?
~in this way I can hack only one CPC+ game, show me the best choice :)

andycadley

It doesn't change the 27 colours in the "old" palette. If you set any colour using the "old" palette mechanism it re-writes that to the relevant fixed RGB value and stores it in the ASIC palette registers.

To select from any of the 4096 colours available you have to use the "new" method instead, which is basically:

Page in the ASIC registers at #4000
Write the relevant values to the appropriate ASIC register
(Optionally) Page out the ASIC registers again

How difficult that is to patch into any given game depends a lot on how it works. If the code is running (or has to access data) from #4000 to #7fff then you may have to relocate it or use a springboard function elsewhere so that the ASIC doesn't get in the way. In addition you're going to need at around twice as many bytes to store colours (unless they're fixed throughout).

For anything that changes the palette dynamically you also need to consider that changes to the Plus palette registers are (unfortunately) not atomic so you will potentially see a glitched colour if you change it at the point where that colour is on-screen.

robcfg

The CPC classic has a palette of 27 colours, of which it can show 16 on Mode 0, 4 on Mode 1, and 2 on Mode 2. Any of the 27 can be used as border colour.

Now, the CPC+ have a palette of 4096 colours while having the same limitations per Mode. Then you have the sprites which I don't remember if they use their own palette entries.

What is it exactly you are trying to do?

andycadley

Quote from: robcfg on Today at 16:34Then you have the sprites which I don't remember if they use their own palette entries.

Yes, the sprites have a separate palette of 15 possible colours. 

Powered by SMFPacks Menu Editor Mod