CPCWiki forum

General Category => Programming => Topic started by: SkulleateR on 14:12, 03 September 19

Title: Where is the colour information stored ?
Post by: SkulleateR on 14:12, 03 September 19
So lets assume you have ink 1,24 and ink 3,6 and whatever.


Where are these informations stored and can you read it out in Basic ?
Title: Re: Where is the colour information stored ?
Post by: SkulleateR on 16:46, 03 September 19
Ok, on my research I found this page -> http://www.cpcwiki.eu/index.php/File:AWMG_page43.jpg


Colour Table 1 : B1EA - B1FA
Colour Table 2 : B1D9 - B1E9


Are those colour values stored on that mem addresses ? If so, how can I read them out ?
Title: Re: Where is the colour information stored ?
Post by: reidrac on 18:56, 03 September 19
Peek?

http://www.cpcwiki.eu/index.php?title=Locomotive_BASIC#PEEK_.28.3Caddress_expression.3E.29

(I'm not really into basic, I guess you could scan that page for tips)
Title: Re: Where is the colour information stored ?
Post by: SkulleateR on 19:05, 03 September 19
tried that already ... only got "83" for &B1EA ... rest are all "00" ... so the colour information seem to be stored somewhere else  :(
Title: Re: Where is the colour information stored ?
Post by: gerald on 19:31, 03 September 19
Quote from: SkulleateR on 19:05, 03 September 19
tried that already ... only got "83" for &B1EA ... rest are all "00" ... so the colour information seem to be stored somewhere else  :(
&B1EA is the correct address for the 464, but not for a 6128 where 83 is expected and is not a color  ;)
Information you're looking for can be found in the firmware guide available on http://www.cantrell.org.uk/david/tech/cpc/
Look at page 16 in the PDF version.
Title: Re: Where is the colour information stored ?
Post by: SkulleateR on 20:10, 03 September 19
Yeah I just downloaded the firmware guide as PDF and saw the difference between 464 and 6128  :picard:


Thx for the reminder ... but anyway, if I make a PEEK on &B7D6 (which should be Pen 1) I get a "10"


That's good because in Hex it´s "0A" and that's the HW Number as described in the firmware guide. BUT when I go here -> http://www.cpcwiki.eu/index.php/CPC_Palette I see a HW number of "4Ah" ?!? I'm a bit confused ...  ???
Title: Re: Where is the colour information stored ?
Post by: gerald on 20:36, 03 September 19
Quote from: SkulleateR on 20:10, 03 September 19
Yeah I just downloaded the firmware guide as PDF and saw the difference between 464 and 6128  :picard:


Thx for the reminder ... but anyway, if I make a PEEK on &B7D6 (which should be Pen 1) I get a "10"


That's good because in Hex it´s "0A" and that's the HW Number as described in the firmware guide. BUT when I go here -> http://www.cpcwiki.eu/index.php/CPC_Palette (http://www.cpcwiki.eu/index.php/CPC_Palette) I see a HW number of "4Ah" ?!? I'm a bit confused ...  ???
The 4Ah in wiki table also include the Gate Array address bits 6 and 7 that select the proper register and 0x40 point to the pen register.
http://www.cpcwiki.eu/index.php/Gate_Array#Register_1_-_Palette_Data_.28Colour_selection.29 (http://www.cpcwiki.eu/index.php/Gate_Array#Register_1_-_Palette_Data_.28Colour_selection.29)
Basic table only store the actual register content ie 0x0A.
Title: Re: Where is the colour information stored ?
Post by: SkulleateR on 20:44, 03 September 19
Oh okay, thx a lot  :)
Powered by SMFPacks Menu Editor Mod