News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_freemac

CPC+ color palette

Started by freemac, 15:30, 29 August 25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

What CPC plus games retro compatible in CPC 6128 you prefer ?

Prehistoric II
0 (0%)
Super Cauldron
1 (50%)
Saboteur
1 (50%)

Total Members Voted: 2

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 16:34, 29 August 25Then 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. 

arnoldemu

Do you want to hack a CPC game to give it Plus palette on Plus?

Do you want to give CPC extra colours without making Plus implementation in FPGA?

What is your goal?

GUNHED

Hey guys, don't want to be nitpicking, but please call the two computers either CPC464/CPC6128 or 464plus/6128plus. Or simply CPC or Plus if you prefer. There is no CPCplus or such a thing.  :)
http://futureos.de --> Get the revolutionary FutureOS (Update: 2024.10.27)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

ZorrO

There is no Gunhed or such a thing.  :P
CPC+PSX 4ever

freemac

How do I create a forum vote ?

I think around retro-compatible game (ones running on Amstrad CPC 6128 and also CPC 6128 plus)
I think super cauldron is this case, and also Prehistorik.
Here I want just a list of game retro-compatible. And vote for just one of them.

ZorrO

Select section in which you want to post survey and instead of [NEW TOPIC] button, just click [NEW POLL].
CPC+PSX 4ever

freemac

or else a C64 palette  :)

andycadley

I'm confused by the poll, Super Cauldron and Saboteur weren't ever Plus games, whereas Prehistorik II was (although I'd argue it was a CPC game with some extra bolt on Plus features, rather than a Plus game downgraded to the older models)

arnoldemu

Freemac are you planning hardware enhancement for all CPC or only for your CPC in a FPGA?

Is it an enhancement for all Gate-Array or only palette?

Would it be compatible with Plus? 

Is the palette fixed and I can choose a theme (e.g. CPC standard, Orange, C64) or fully programmable? 

is it like these but for CPC?

https://zxdesign.itch.io/ulaplus



Is it a special mode for CPC like in Aleste 520EX which can give 64 colours?
https://www.cpcwiki.eu/index.php/Aleste_520EX

Or do you ask for some games to have Plus palettes added to enhance the games?

If you do see this list here of games already done:

https://www.cpcwiki.eu/index.php/Converted_GX4000_Software

Most have had controls updated for gamepads and 2 buttons, many also have new palettes.





freemac

In fact I have a 4th VGA palette mode free (color, green, orange, <another ?>)
First I think a special fixed palette for only one game

But then I think now that C64 palette shall unlock more games (adapted from C64 (16 colors, perhaps I have just to "cut" 3 wires for doing that easy))

I think (color, green, orange, C64) shall be cool 

arnoldemu

Quote from: freemac on 12:19, 06 September 25In fact I have a 4th VGA palette mode free (color, green, orange, <another ?>)
First I think a special fixed palette for only one game

But then I think now that C64 palette shall unlock more games (adapted from C64 (16 colors, perhaps I have just to "cut" 3 wires for doing that easy))

I think (color, green, orange, C64) shall be cool
It would be interesting to see how that would work and if it would work for multiple games. I think best for that is to convert each 27 colour to similar on c64. There will be repeats but no program would need to be changed. Maybe this works well maybe not and good to experiment I guess.

Another might be to take the 27 colours and adjust how vibrant they are and maybe reduce colour a bit, that could work with lots of games.

You may find a fixed palette per game is best choice and gives the best look, again this would be at the gate-array in your FPGA where one of the 27 colours chooses a colour in your special palette :)


freemac

Please remarks that Palette is 3 states so A,B,B,C

Define here in Code area :
- PALETTE_RGB:T_PALETTE
- eaten by C64_SCREEN_RED:T_C64, C64_SCREEN_GREEN:T_C64, C64_SCREEN_BLUE:T_C64
--https://www.cpcwiki.eu/index.php/CPC_Palette
--Firmware Number Hardware Number Colour Name R % G % B % Hexadecimal RGB values Colour
--0 54h Black 0 0 0 #000000 0/0/0
--1 44h (or 50h) Blue 0 0 50 #000080 0/0/128
--2 55h Bright Blue 0 0 100 #0000FF 0/0/255
--3 5Ch Red 50 0 0 #800000 128/0/0
--4 58h Magenta 50 0 50 #800080 128/0/128
--5 5Dh Mauve 50 0 100 #8000FF 128/0/255
--6 4Ch Bright Red 100 0 0 #FF0000 255/0/0
--7 45h (or 48h) Purple 100 0 50 #FF0080 255/0/128
--8 4Dh Bright Magenta 100 0 100 #FF00FF 255/0/255
--9 56h Green 0 50 0 #008000 0/128/0
--10 46h Cyan 0 50 50 #008080 0/128/128
--11 57h Sky Blue 0 50 100 #0080FF 0/128/255
--12 5Eh Yellow 50 50 0 #808000 128/128/0
--13 40h (or 41h) White 50 50 50 #808080 128/128/128
--14 5Fh Pastel Blue 50 50 100 #8080FF 128/128/255
--15 4Eh Orange 100 50 0 #FF8000 255/128/0
--16 47h Pink 100 50 50 #FF8080 255/128/128
--17 4Fh Pastel Magenta 100 50 100 #FF80FF 255/128/255
--18 52h Bright Green 0 100 0 #00FF00 0/255/0
--19 42h (or 51h) Sea Green 0 100 50 #00FF80 0/255/128
--20 53h Bright Cyan 0 100 100 #00FFFF 0/255/255
--21 5Ah Lime 50 100 0 #80FF00 128/255/0
--22 59h Pastel Green 50 100 50 #80FF80 128/255/128
--23 5Bh Pastel Cyan 50 100 100 #80FFFF 128/255/255
--24 4Ah Bright Yellow 100 100 0 #FFFF00 255/255/0
--25 43h (or 49h) Pastel Yellow 100 100 50 #FFFF80 255/255/128
--26 4Bh Bright White 100 100 100 #FFFFFF 255/255/255

type T_PALETTE is array (0 to 63) --(15 downto 0)
        of integer;

constant PALETTE_RGB:T_PALETTE :=
( 0, -- 00 00 00
  1,-- 00 00 01
  1,-- 00 00 >10< trou
  2,-- 00 00 11
 
  9,-- 00 01 OO
  10,-- 00,01,01
  10,-- 00,01,>10< trou
  11,-- 00,01,11
 
  9, -- 00,>10<,00 trou
  10, -- 00,>10<,01 trou
  10, -- 00,>10<,>10< trou
  11, -- 00,>10<,11 trou

  5, --  00,11,00
  4, --  00,11,01
  4, --  00,11,>10< trou
  5,--  00,11,11
 
  3, -- 01,00,00 fixe x cyan
  4, -- 01,00,01 fixe x purple
  4, -- 01,00,>10< trou
  5, -- 01,00,11
 
  12, -- 01,01,00
  13, -- 01,01,01
  13, -- 01,01,>10< trou
  14, -- 01,01,11
 
  6, -- 01,>10<,00 trou
  7, -- 01,>10<,01 trou
  7, -- 01,>10<,>10< trou
  8, -- 01,>10<,11 trou
 
  15, -- 01,11,00
  -- bouclage de couleurs
  1, -- 01,11,01
  1, -- 01,11,>10< trou
  2, -- 01,11,11
 
  12,  -- >10<<,00,00 trou
  13, -- >10<,00,01 trou
  13, -- >10<,00,>10< trou
  14, -- >10<,00,11 trou

  12, -- >10<,01,00 trou
  13, -- >10<,01,01 trou
  13, -- >10<,01,10 trou
  14, -- >10<,01,11 trou
 
  12, -- >10<,>10<,00 trou
  13, -- >10<,>10<,01 trou
  13, -- >10<,>10<,10 trou
  14, -- >10<,>10<,11 trou
 
  --0,0,0,0,
  12, -- >10<,11,00 trou
  13, -- >10<,11,01 trou
  13, -- >10<,11,>10< trou
  14, -- >10<,11,11 trou
 
  6, -- 11,00,00 ok
  7, -- 11,00,01
  7, -- 11,00,>10< trou
  8, -- 11,00,11
 
  15, -- 11,01,00
  -- rebouclage de couleurs
  1, -- 11,01,01
  1, -- 11,01,>10< trou
  2, -- 11,01,11
 
  9, -- 11,>10<,00
  10, -- 11,>10<,01
  10, -- 11,>10<,>10< trou
  11, --  11,>10<,11
   
  5, -- 11,11,00
  4, -- 11,11,01
  4, -- 11,11,>10< trou
  5 -- 11,11,11
);


[font=Verdana, Arial, Helvetica, sans-serif]type T_C64 is array (0 to 15) --(15 downto 0)[/font]
        of STD_LOGIC_VECTOR(5 downto 0);
constant C64_SCREEN_RED:T_C64 :=
("000000", --black 00
"111111", --white 3F
"101011", --red 2B
"011000", --cyan 18
"101100", --purple 2C
"010010", --green 12
"001101", --blue 0D
"111001", --yellow 39
"101101", --orange 2D
"011010", --brown 1A
"111010", --pink 3A
"010011", --d. gray 13
"100001", --gray 21
"101001", --l. green 29
"101001", --l. blue 1C
"101101" --l. gray 2D
);

constant C64_SCREEN_GREEN:T_C64 :=
("000000", --black 00
"111111", --white 3F
"001010", --red 0A
"110110", --cyan 36
"001111", --purple 0F
"110001", --green 31
"001110", --blue 0E
"111011", --yellow 3B
"010110", --orange 16
"001110", --brown 0E
"011101", --pink 1D
"010011", --d. gray 13
"100001", --gray 21
"111110", --l. green 3E
"011111", --l. blue 1F
"101101" --l. gray 2D
);

constant C64_SCREEN_BLUE:T_C64 :=
("000000", --black 00
"111111", --white 3F
"001010", --red 0A
"110011", --cyan 33
"101101", --purple 2D
"010010", --green 12
"110001", --blue 31
"010011", --yellow 13
"000111", --orange 07
"000010", --brown 02
"011011", --pink 1B
"010011", --d. gray 13
"100001", --gray 21
"100111", --l. green 27
"111001", --l. blue 39
"101101" --l. gray 2D
);

Code (RED_in & GREEN_in & BLUE_in are entry VGA
canal_red<= C64_SCREEN_RED(PALETTE_RGB(conv_integer(RED_in(5 downto 4) & GREEN_in(5 downto 4) & BLUE_in(5 downto 4))));
canal_green<= C64_SCREEN_GREEN(PALETTE_RGB(conv_integer(RED_in(5 downto 4) & GREEN_in(5 downto 4) & BLUE_in(5 downto 4))));
canal_blue<= C64_SCREEN_BLUE(PALETTE_RGB(conv_integer(RED_in(5 downto 4) & GREEN_in(5 downto 4) & BLUE_in(5 downto 4))));

So... using basic CPC I have for sample :
border 3 is C64 cyan
border 4 is C64 purple

Now I have to found old games converted from C64 without CPC Palette mapped correctly (I've got no idea) 

andycadley

The C64 doesn't have a consistent palette, it varies between different revisions of the VIC II chip (and also between PAL and NTSC). Which is why there are seemingly endless debates about what the "right" colours are 

Powered by SMFPacks Menu Editor Mod