Page 11 of 11

Re: Beyond Super Gold Card

Posted: Sat Mar 21, 2020 8:24 pm
by stevepoole
Hi Folks,

tofro wrote:
<< There's also the QPC_QLSCREMU -1 command that allows you to load QL screens even in arbitrary resolutions and colour depths - It simply emulates the QL screen in the top left of the QPC screen. >>

Yes, but I needed a routine to fill the whole screen, (in another program). I have now added a few code statements so the program (today post 10h49am) gets mode 4 colours right too. I may adapt it for different resolutions than the 512x256 QPC2 preset.

Thanks, Per, for the extra info in your listing, which will be very useful.

Regards,
Steve.

Re: Beyond Super Gold Card

Posted: Sun Mar 22, 2020 6:32 am
by stevepoole
Hi Tofro,

To get a full QL screen on QPC2 :

1 : Click on your QPC icon to load it.
2 : In the 'resolution boxes', type in 512 and 256.
3 : Hit OK.
4 : Click on the 'full screen' rectangle, (top right of QPC window).
5 : Done ...

6 : Repeat item 4 to reduce the screen again !

Best Wishes,
Steve.

Re: Beyond Super Gold Card

Posted: Mon Mar 23, 2020 12:36 am
by stevepoole
Hi All,

The QL to QPC2 screen transfer program is now finished, (in so much as are my requirements). Modes 4 and 8 are catered for.

There is no point in using SCR_XLIM or SCR_YLIM etc, as they return the size of the full QPC screen, irrespective of the actual size used.

I manipulate binary string$ instead of bitwise operators, as these are easier to prototype with... in basic !

So It easy to see how routines like RECOLOR could be written, so feel free to tweak as you wish.

Regards, Steve.

100 :
110 REMark zzMIX - Transfers SBYTEd QL screens to QPC2 via LBYTES.
120 REMark QPC2 screen resolution is 512x256, & 'full_screen' rectangle clicked.
130 :
140 WINDOW 512,256,0,0: OVER 0: PAPER 0: INK 7
150 s1=SCR_BASE: s2=ALCHP(32768): s3=ALCHP(32768)
160 LBYTES dos5_globe_pic,s3 : REMark Or whatever names you gave your files.
170 LBYTES dos5_spiral_pic,s2 : REMark Or whatever device you are using.
180 REMark demo to show mode 4 (and mode 8) treatments...
190 CLS: swapem s3,8: swapem s3,4: swapem s2,8: swapem s2,4
200 PAUSE 500: CLCHP: STOP
210 :
220 DEFine PROCedure swapem(ad,md)
230 st=1: IF md=8: st=2: REMark ad is address, md is MODE.
240 x=0: y=0: FOR f=0 TO 32766 STEP 2
250 REMark lookup pixel Words as binary :-
260 greens=PEEK(ad+f): reds=PEEK(ad+f+1)
270 green$=BIN$(greens,8): red$=BIN$(reds,8)
280 REMark Mask out the flash bits :-
290 IF md=8: FOR j=2 TO 8 STEP 2: green$(j)='9'
300 REMark find each binary pixel colour :-
310 pos=0: FOR bit=1 TO 8-(md=8) STEP st
320 IF md=4: pix$=green$(bit) & red$(bit): px=pix$
330 IF md=8: pix$=green$(bit) & red$(bit) & red$(bit+1): px=pix$
340 REMark Don't select on string variable$ :-
350 SELect px
360 =0 : ik= 0
370 =1 : ik= 1: IF md=4: ik=2
380 =10 : ik= 2: IF md=4: ik=4
390 =11 : ik= 3: IF md=4: ik=7
400 =100: ik= 1
410 =101: ik= 2
420 =110: ik= 3
430 =111: ik= 7
440 END SELect : REMark pos=position in byte , ik=INK , st=pixel width (step).
450 BLOCK st,1,x+pos,y,ik: pos=pos+st
460 END FOR bit
470 x=x+8: IF x>511: x=0: y=y+1
480 END FOR f
490 END DEFine
500 ::

Re: Beyond Super Gold Card

Posted: Mon Mar 23, 2020 1:06 pm
by pjw
Hi Steve,
Nice work :) I may not have understood you properly, but it appears to me that there is an issue with mode 8. If I take a mode 8 QL screen dump it doesnt appear to display correctly in your mode 8 recreation. For example, yellow gets lost in translation.

Re: Beyond Super Gold Card

Posted: Mon Mar 23, 2020 2:37 pm
by stevepoole
Hi per,

Yes, I have done a fix for this problem, in as much as I now get 256 colours.

But that still leaves a problem wuth QL stipples : If I tweak for these, the mode 4 then mode 8 screens are often offset by 1 pixel !

I will report back as soon as I understand the reason for this.....

Many thanks,

Steve.

Re: Beyond Super Gold Card

Posted: Tue Mar 24, 2020 10:46 am
by stevepoole
Hi per,

The program now appears to be correct with all QL and QPC2 MODE combinations.
Graphics ouput is OK with QPC2v3.31, but one pixel wrong with QPC2v4.02 !
I have tried pictures saved with and without SGC...
Regards,
Steve.
____________________
100 REMark zzSWAP
110 WINDOW 512,256,0,0: OVER 0: PAPER 0: INK 7: BORDER 0: CSIZE 3,1: CLS
120 s2=ALCHP(32768): s3=ALCHP(32768): LBYTES dos5_yourpic1,s2: LBYTES dos5_yourpic2,s3
130 FOR QPCmodes=4,8: MODE modes: swapem s2,QPCmodes,4: swapem s3,QPCmodes,8
140 CLCHP: INK 7: CSIZE 0,0: STOP
150 :
160 DEFine PROCedure swapem(ad,md,qm)
170 st=1: x=0: y=0: AT 7,1: PRINT 'ql MODE'!qm,'qpc MODE'!md
180 FOR byte=ad TO ad+32765 STEP 2
190 greens=PEEK(byte) : reds=PEEK(byte+1)
200 green$=BIN$(greens,8): red$=BIN$(reds,8): pos=0
210 IF md=4 THEN
220 FOR bit=1 TO 7 STEP 2
230 pix$= green$(bit) & red$(bit): px=pix$
240 SELect px: =0:ik= 0: =1:ik= 2: =10:ik= 4: =11:ik= 7
250 BLOCK 2,1,x+pos,y,ik: pos=pos+2
260 END FOR bit
270 ELSE
280 FOR bit=1 TO 7 STEP 2
290 pix$= green$(bit) & red$(bit) & red$(bit+1): ik=BIN(pix$)
300 BLOCK 2,1,x+pos,y,ik: pos=pos+2
310 END FOR bit
320 END IF : x=x+8: IF x>511: x=0: y=y+1
330 END FOR byte
340 END DEFine