Author Topic: Where is the colour information stored ?  (Read 602 times)

0 Members and 1 Guest are viewing this topic.

Offline SkulleateR

  • CPC6128
  • ****
  • Posts: 207
  • Country: de
  • Liked: 117
  • Likes Given: 69
Where is the colour information stored ?
« on: 16: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 ?

Offline SkulleateR

  • CPC6128
  • ****
  • Posts: 207
  • Country: de
  • Liked: 117
  • Likes Given: 69
Re: Where is the colour information stored ?
« Reply #1 on: 18: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 ?

Online reidrac

  • Supporter
  • 6128 Plus
  • *
  • Posts: 881
  • Country: gb
  • Trying to gamedev!
    • index.php?action=treasury
    • usebox.net
  • Liked: 1620
  • Likes Given: 873
Re: Where is the colour information stored ?
« Reply #2 on: 20: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)
Released The Return of Traxtor, Golden Tail, Magica, The Dawn of Kernel and Kitsune`s Curse for the CPC.

If you like my games and want to show some appreciation, you can always buy me a coffee.

Offline SkulleateR

  • CPC6128
  • ****
  • Posts: 207
  • Country: de
  • Liked: 117
  • Likes Given: 69
Re: Where is the colour information stored ?
« Reply #3 on: 21: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  :(

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.497
  • Liked: 1036
  • Likes Given: 257
Re: Where is the colour information stored ?
« Reply #4 on: 21:31, 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.

Offline SkulleateR

  • CPC6128
  • ****
  • Posts: 207
  • Country: de
  • Liked: 117
  • Likes Given: 69
Re: Where is the colour information stored ?
« Reply #5 on: 22: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 ...  ???

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.497
  • Liked: 1036
  • Likes Given: 257
Re: Where is the colour information stored ?
« Reply #6 on: 22:36, 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 ...  ???
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
Basic table only store the actual register content ie 0x0A.

Offline SkulleateR

  • CPC6128
  • ****
  • Posts: 207
  • Country: de
  • Liked: 117
  • Likes Given: 69
Re: Where is the colour information stored ?
« Reply #7 on: 22:44, 03 September 19 »
Oh okay, thx a lot  :)