How can I get a pixel color?

Anything QL Software or Programming Related.
User avatar
BSJR
Trump Card
Posts: 222
Joined: Sun Oct 18, 2015 12:53 pm
Location: Amsterdam
Contact:

Re: How can I get a pixel color?

Post by BSJR »

dilwyn wrote: Mon Nov 07, 2022 12:05 pm I haven't got a mode 33 display system to compare the results, ...
To complete the picture I did some tests on the Q68 and PEEKing the screen memory confirmed no byte swapping is going on there. It's exactly as the expected: gggggrrr.rrbbbbbw.

One interesting observation though:
:COLOUR_QL: PAPER 4: CLS
:PRINT HEX$(PEEK_W(scr_adr),16)
This gave $F700 (11110001.00000000) and not $F800 (11111000.00000000) as expected.
Thus a smidgen of red was put in to make QL green a bit darker.

BSJR


User avatar
Peter
Font of All Knowledge
Posts: 2451
Joined: Sat Jan 22, 2011 8:47 am

Re: How can I get a pixel color?

Post by Peter »

BSJR wrote: Thu Nov 03, 2022 10:47 am
Peter wrote:
tofro wrote:(I think it also works in 8-bit palette mode, but am not 100% sure).
Is there an 8 bit palette on any QL style machine? I was just aware of the fixed 8 bit Aurora mode.
SMSQ/E features a palette of 256 colours which can be referenced with an 8-bit value.
The reference were display modes (hardware). The OS can not implement a hardware palette.
BSJR wrote: Thu Nov 03, 2022 10:47 am The 8-bit Aurora mode 16 is a true RGB colour with 3 bits for G and 2 for R & B each, the last bit is a combined R & B bit.
I implemented this mode on the Q68 also, but it still is no 8-bit palette mode.


User avatar
tofro
Font of All Knowledge
Posts: 3125
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: How can I get a pixel color?

Post by tofro »

Peter wrote: Fri Nov 18, 2022 12:30 pm
BSJR wrote: Thu Nov 03, 2022 10:47 am
Peter wrote: Is there an 8 bit palette on any QL style machine? I was just aware of the fixed 8 bit Aurora mode.
SMSQ/E features a palette of 256 colours which can be referenced with an 8-bit value.
The reference were display modes (hardware). The OS can not implement a hardware palette.
BSJR wrote: Thu Nov 03, 2022 10:47 am The 8-bit Aurora mode 16 is a true RGB colour with 3 bits for G and 2 for R & B each, the last bit is a combined R & B bit.
I implemented this mode on the Q68 also, but it still is no 8-bit palette mode.
Well, Peter, you're nitpicking here. I agree my choice of words wasn't exactly helpful as it can be misleading. No, there's technically no mode in Q68 that uses hardware indexed colours. But there are very well palettes in SMSQ/E.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Peter
Font of All Knowledge
Posts: 2451
Joined: Sat Jan 22, 2011 8:47 am

Re: How can I get a pixel color?

Post by Peter »

That software pallette can only be correctly displayed in 16 bit highcolor modes (even true color if I was actually nitpicking). Those are not 8 bit, hence massively slower and more memory intensive.


Post Reply