### Re: [Ql-Users] Mode 33 to 32

```
Thanks :)
On 16/12/2017 19:36, Peter Graf via Ql-Users wrote:

The least significant of the 6 green bits.

Am 16.12.2017 um 19:12 schrieb pjwitte via Ql-Users:

Sorry for yanking your chain again so soon but, on going the other
way, ie from mode 32 to 33, what is the best value for W? g6, 0, 1..?

Per

On 16/12/2017 18:13, pjwitte via Ql-Users wrote:

Aah! Perfect! Thanks Marcel, youre a star!

So in fact I interpreted the input wrong. It should have been:

GGGggRRR rrBBBbbW <- input

and
ggWBBBbb RRRrrGGG -> output

Seems so obvious now ;)

Per

On 16/12/2017 15:30, Marcel Kilgus via Ql-Users wrote:

320 c\$ = c\$(4 to 5) & c\$(16) & c\$(11 to 15) & c\$(6 to 10) & c\$(1 to 3)

___
QL-Users Mailing List

___
QL-Users Mailing List

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```The least significant of the 6 green bits.

Am 16.12.2017 um 19:12 schrieb pjwitte via Ql-Users:
> Sorry for yanking your chain again so soon but, on going the other
> way, ie from mode 32 to 33, what is the best value for W? g6, 0, 1..?
>
> Per
>
> On 16/12/2017 18:13, pjwitte via Ql-Users wrote:
>> Aah! Perfect! Thanks Marcel, youre a star!
>>
>> So in fact I interpreted the input wrong. It should have been:
>>
>> GGGggRRR rrBBBbbW <- input
>>
>> and
>> ggWBBBbb RRRrrGGG -> output
>>
>> Seems so obvious now ;)
>>
>> Per
>>
>> On 16/12/2017 15:30, Marcel Kilgus via Ql-Users wrote:
>>> 320 c\$ = c\$(4 to 5) & c\$(16) & c\$(11 to 15) & c\$(6 to 10) & c\$(1 to 3)
>>
>>
>> ___
>> QL-Users Mailing List
>>
>>
>>
>
> ___
> QL-Users Mailing List
___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```Sorry for yanking your chain again so soon but, on going the other
way, ie from mode 32 to 33, what is the best value for W? g6, 0, 1..?

Per

On 16/12/2017 18:13, pjwitte via Ql-Users wrote:

Aah! Perfect! Thanks Marcel, youre a star!

So in fact I interpreted the input wrong. It should have been:

GGGggRRR rrBBBbbW <- input

and
ggWBBBbb RRRrrGGG -> output

Seems so obvious now ;)

Per

On 16/12/2017 15:30, Marcel Kilgus via Ql-Users wrote:

320 c\$ = c\$(4 to 5) & c\$(16) & c\$(11 to 15) & c\$(6 to 10) & c\$(1 to 3)

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```
Aah! Perfect! Thanks Marcel, youre a star!

So in fact I interpreted the input wrong. It should have been:

GGGggRRR rrBBBbbW <- input

and
ggWBBBbb RRRrrGGG -> output

Seems so obvious now ;)

Per

On 16/12/2017 15:30, Marcel Kilgus via Ql-Users wrote:

320 c\$ = c\$(4 to 5) & c\$(16) & c\$(11 to 15) & c\$(6 to 10) & c\$(1 to 3)

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```pjwitte via Ql-Users wrote:
> With
>
> 290  REMark GGGBBBbb RRRrrgg0
> 300  c\$ = c\$(3 TO 5) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(1 TO 2) & '0'
>
> I got the best results. While, with 300 REMarked out and 320 un-REMarked:
>
> 310  ggWBBBbb RRRrrGGG -> RRRrrGGG ggWBBBbb in big-endian
> 320  c\$ = c\$(1 TO 2) & c\$(16) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(3 TO 5)

Try

320 c\$ = c\$(4 to 5) & c\$(16) & c\$(11 to 15) & c\$(6 to 10) & c\$(1 to 3)

Marcel

___
QL-Users Mailing List
```

### Re: [Ql-Users] Mode 33 to 32

```
However, Wolfgang, Im having trouble with your suggestion. Perhaps Ive
interpreted wrongly?

Heres how I got on:

100 REMark Convert screens mode 33 to 32
110 REMark POC, pjw, December 16th 2017
120 :
140 fnm\$ = 'ram2_dmp1024x768_scr'
150 :
160 t = DATE
170 ERT ScrCv33to32(fnm\$, fnm\$ & '_32')
180 PRINT DATE - t
190 :
200 DEFine FuNction ScrCv33to32(fnmi\$, fnmo\$)
210 ch = FOP_IN(fnm\$): IF ch < 0: RETurn ch
220 fl = FLEN(#ch): CLOSE#ch
240 :
250 REMark 12345678 9ABCDEFG (in string coordinates)
260 REMark ggGGGRRR rrBBBbbW <- input
270 FOR a = adr TO adr + fl - 2 STEP 2
280  c\$ = BIN\$(PEEK_W(a), 16)
290  REMark GGGBBBbb RRRrrggW:
300  c\$ = c\$(3 TO 5) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(1 TO 2) & c\$(16)
310  REMark ggWBBBbb RRRrrGGG -> RRRrrGGG ggWBBBbb in big-endian:
320  remark c\$ = c\$(1 TO 2) & c\$(16) & c\$(11 TO 15) & c\$(6 TO 10) &
c\$(3 TO 5)

330  POKE_W a, BIN(c\$)
340 END FOR a
350 :
380 RETurn 0
390 END DEFine ScrCv33to32
400 :

With

290  REMark GGGBBBbb RRRrrgg0
300  c\$ = c\$(3 TO 5) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(1 TO 2) & '0'

I got the best results. While, with 300 REMarked out and 320 un-REMarked:

310  ggWBBBbb RRRrrGGG -> RRRrrGGG ggWBBBbb in big-endian
320  c\$ = c\$(1 TO 2) & c\$(16) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(3 TO 5)

(which is how I understood your suggestion) BGIMAGE
"ram2_dmp1024x768_scr" went psychedelic!

On 16/12/2017 11:59, Wolf via Ql-Users wrote:

Hi Per,

The PC switches the bytes around.

So
gggb rgg0
actually means
rgg0 gggb

In other words, you're switching the third highest byte for green on
or off.

If you sure that's what you want, then that's fine.

Wolfgang

On 16/12/2017 11:43, pjwitte via Ql-Users wrote:
I havent tested your suggestion yet, Wolfgang, but what I found so
far was that gggbrgg0 appears (to my eye) to look cleaner
than gggbrggW. Is that so wrong? ;)

BTW, when converting the translation to assembler, I found the

GGGggRRR rrBBBbbW = mode 33
gggBBBbb RRRrrGGG = mode 32
gggBBBbb RRRrrGGW = mode 32 translated

Per
On 16/12/2017 10:55, Wolf via Ql-Users wrote:
No, not the same as %gggbrggW, as suggested in the
original post.

Wolfgang

On 16/12/2017 10:18, Peter Graf via Ql-Users wrote:

Wolfgang Lenerz via Ql-Users wrote:

I'd do it this way

%ggWbrggg

Which is the same :)

___
QL-Users Mailing List

___
QL-Users Mailing List

.

___
QL-Users Mailing List

___
QL-Users Mailing List

___
QL-Users Mailing List
```

### Re: [Ql-Users] Mode 33 to 32

```pjwitte via Ql-Users wrote:
> I havent tested your suggestion yet, Wolfgang, but what I found so far
> was that gggbrgg0 appears (to my eye) to look cleaner than
> gggbrggW. Is that so wrong? ;)

It is right, because gggbrggW has the W at the wrong bit. It
must be the least significant green, which is what Wolfgang an me wrote.

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```
Oops! That should be:
GGGBBBbb RRRrrgg0 = mode 32 translated
P
On 16/12/2017 11:43, pjwitte via Ql-Users wrote:
I havent tested your suggestion yet, Wolfgang, but what I found so far
was that gggbrgg0 appears (to my eye) to look cleaner than
gggbrggW. Is that so wrong? ;)

BTW, when converting the translation to assembler, I found the

GGGggRRR rrBBBbbW = mode 33
gggBBBbb RRRrrGGG = mode 32
gggBBBbb RRRrrGGW = mode 32 translated

Per
On 16/12/2017 10:55, Wolf via Ql-Users wrote:
No, not the same as %gggbrggW, as suggested in the original
post.

Wolfgang

On 16/12/2017 10:18, Peter Graf via Ql-Users wrote:

Wolfgang Lenerz via Ql-Users wrote:

I'd do it this way

%ggWbrggg

Which is the same :)

___
QL-Users Mailing List

___
QL-Users Mailing List

.

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```
Hi Per,

The PC switches the bytes around.

So
gggb rgg0
actually means
rgg0 gggb

In other words, you're switching the third highest byte for green on or off.
If you sure that's what you want, then that's fine.

Wolfgang

On 16/12/2017 11:43, pjwitte via Ql-Users wrote:
I havent tested your suggestion yet, Wolfgang, but what I found so far
was that gggbrgg0 appears (to my eye) to look cleaner than
gggbrggW. Is that so wrong? ;)

BTW, when converting the translation to assembler, I found the following

GGGggRRR rrBBBbbW = mode 33
gggBBBbb RRRrrGGG = mode 32
gggBBBbb RRRrrGGW = mode 32 translated

Per
On 16/12/2017 10:55, Wolf via Ql-Users wrote:

No, not the same as %gggbrggW, as suggested in the original post.

Wolfgang

On 16/12/2017 10:18, Peter Graf via Ql-Users wrote:

Wolfgang Lenerz via Ql-Users wrote:

I'd do it this way

%ggWbrggg

Which is the same :)

___
QL-Users Mailing List

___
QL-Users Mailing List

.

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```But the same as my proposal :)

Wolf via Ql-Users wrote:
> No, not the same as %gggbrggW, as suggested in the original post.
>
> Wolfgang
>
> On 16/12/2017 10:18, Peter Graf via Ql-Users wrote:
>> Wolfgang Lenerz via Ql-Users wrote:
>>> I'd do it this way
>>>
>>> %ggWbrggg
>>
>> Which is the same :)

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```
No, not the same as %gggbrggW, as suggested in the original post.

Wolfgang

On 16/12/2017 10:18, Peter Graf via Ql-Users wrote:

Wolfgang Lenerz via Ql-Users wrote:

I'd do it this way

%ggWbrggg

Which is the same :)

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```Wolfgang Lenerz via Ql-Users wrote:
> I'd do it this way
>
> %ggWbrggg

Which is the same :)
___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```
I'd do it this way

%ggWbrggg

Regards

Wolfgang

On 15/12/2017 18:51, pjwitte via Ql-Users wrote:
I want to convert a mode 33 screen (Qxx) to mode 32 (QPC2) and visa
versa. I got this far with 33 to 32, but Im not sure this is the best
translation:

rem %grbw = mode 33
rem %gggbrggg = mode 32

c\$ = BIN\$(PEEK_W(a), 16)
c\$ = c\$(3 TO 5) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(1 TO 2) & c\$(16): rem
= %gggbrggw

What do I do with 'w' in either case for best results?

Per

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```
Thanks guys :)

On 16/12/2017 00:30, Peter Graf via Ql-Users wrote:

What do I do with 'w' in either case for best results?

I would just use the RGB0 bit of mode 33 as G0 Bit of mode 32, which is

There is no perfect translation, since mode 33 has 64 clean grey levels,
while mode 32 has only 32. There will be a minimal green tint in mode 32
where RGB0 of mode 33 was set, but almost not noticeable.

___
QL-Users Mailing List

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```> What do I do with 'w' in either case for best results?

I would just use the RGB0 bit of mode 33 as G0 Bit of mode 32, which is

There is no perfect translation, since mode 33 has 64 clean grey levels,
while mode 32 has only 32. There will be a minimal green tint in mode 32
where RGB0 of mode 33 was set, but almost not noticeable.

___
QL-Users Mailing List

```

### Re: [Ql-Users] Mode 33 to 32

```33->32 the W would be the least significant bit of G, and that bit would be
a copy of the most significant bit of G such that a full black pixel will
be full black and a full green pixel will be full green so white can be
white and not have a magenta tinge. This would cause a likely imperceptible
green boundary line from 0 to 1 (which would be 10001).

IMHO.

On Fri, Dec 15, 2017 at 11:51 AM, pjwitte via Ql-Users <
ql-users@lists.q-v-d.com> wrote:

> I want to convert a mode 33 screen (Qxx) to mode 32 (QPC2) and visa versa.
> I got this far with 33 to 32, but Im not sure this is the best translation:
>
> rem %grbw = mode 33
> rem %gggbrggg = mode 32
>
> c\$ = BIN\$(PEEK_W(a), 16)
> c\$ = c\$(3 TO 5) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(1 TO 2) & c\$(16): rem =
> %gggbrggw
>
> What do I do with 'w' in either case for best results?
>
> Per
>
> ___
> QL-Users Mailing List
>

--
Dave Park
d...@sinclairql.com
___
QL-Users Mailing List

```

### [Ql-Users] Mode 33 to 32

```I want to convert a mode 33 screen (Qxx) to mode 32 (QPC2) and visa
versa. I got this far with 33 to 32, but Im not sure this is the best
translation:

rem %grbw = mode 33
rem %gggbrggg = mode 32

c\$ = BIN\$(PEEK_W(a), 16)
c\$ = c\$(3 TO 5) & c\$(11 TO 15) & c\$(6 TO 10) & c\$(1 TO 2) & c\$(16):
rem = %gggbrggw

What do I do with 'w' in either case for best results?

Per

___
QL-Users Mailing List

```