Thanks both for your input!
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
230 adr = ALCHP(fl): LBYTES fnm$, adr
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 :
360 SBYTES_O fnmo$, adr, fl
370 RECHP adr
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
gggbbbbb rrrrrgg0
actually means
rrrrrgg0 gggbbbbb


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 gggbbbbbrrrrrgg0 appears (to my eye) to look cleaner than gggbbbbbrrrrrggW. Is that so wrong? ;)

BTW, when converting the translation to assembler, I found the following representation helpful:

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 %gggbbbbbrrrrrggW, 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

%ggWbbbbbrrrrrggg

Which is the same :)


_______________________________________________
QL-Users Mailing List


_______________________________________________
QL-Users Mailing List


.


_______________________________________________
QL-Users Mailing List


_______________________________________________
QL-Users Mailing List




_______________________________________________
QL-Users Mailing List

Reply via email to