Page 1 of 1
Extended Resolution
Posted: Sun Oct 25, 2020 4:03 pm
by Andrew
The SuperBasic Reference manual says:
The syntax for WINDOW keyword is
WINDOW [#ch,] x, y, posx, posy or
WINDOW [#ch,] x, y, posx, posy [\border] (Minerva v1.79+, THOR XVI)
This command redefines the given screen window (default #1) by specifying the new size and position of the window. The values must all be calculated in the pixel co-ordinate system, which means that x and posx can be in the range 0…XLIM (in both MODE 4 and MODE 8), provided that x+posx<=XLIM and y and posy can be in the range 0..YLIM, provided that y+posy<=YLIM.
But on QPC2, set to any resolution higher than 512x256, when I try
Window scr_xlim, scr_ylim,0,0
I get: Value out of range
Even if the resolution is set to 640x480 or 1024x768 or anything else larger than 512x256, it is not possible to create a window larger than 512x256.
So - under SMSQE, extended resolution, how can I create a window larger than that, in SBasic?
Re: Extended Resolution
Posted: Sun Oct 25, 2020 4:36 pm
by Derek_Stewart
Hi Andrew,
You need to use the DISP_SIZE command.
DISP_SIZE 800,600
Usually QPC2 rexolution is setup in the startup console.
Re: Extended Resolution
Posted: Sun Oct 25, 2020 4:38 pm
by tofro
Andrew wrote:The SuperBasic Reference manual says:
The syntax for WINDOW keyword is
WINDOW [#ch,] x, y, posx, posy or
WINDOW [#ch,] x, y, posx, posy [\border] (Minerva v1.79+, THOR XVI)
This command redefines the given screen window (default #1) by specifying the new size and position of the window. The values must all be calculated in the pixel co-ordinate system, which means that x and posx can be in the range 0…XLIM (in both MODE 4 and MODE 8), provided that x+posx<=XLIM and y and posy can be in the range 0..YLIM, provided that y+posy<=YLIM.
But on QPC2, set to any resolution higher than 512x256, when I try
Window scr_xlim, scr_ylim,0,0
I get: Value out of range
Even if the resolution is set to 640x480 or 1024x768 or anything else larger than 512x256, it is not possible to create a window larger than 512x256.
So - under SMSQE, extended resolution, how can I create a window larger than that, in SBasic?
That's very probably caused by the Pointer Environment. The first Window that's been opened for a job (here: SBASIC #0) is the primary window of the job - This cannot grow larger than the outline (window area) of the job. If you want to make it larger, you first need to extend the outline of the job (which is, in principle, the amount of screen real estate the job can occupy, and also the area of screen that will be saved and restored by the window manager when you switch jobs)- so
Code: Select all
100 OUTLN #0,SCR_XLIM, SCR_YLIM, 0, 0 : REMark Extend outline of SBASIC
110 WINDOW #0,<whatever you like>
120 OUTLN : REMark Shrinks outline again to maximum extent of currently open windows (depending on whatever you did in line 110)
(Of course, if you already know how large your job's window is going to be, you can set the outline of the job to that amount exactly, without first extending it to the full screen and then shrinking it again, which will save you a bit of flickering)
This behaviour is BTW not caused by SMSQ/E, but rather by the PE - If you run PE on a BBQL without SMSQ/E, it will be exactly the same.
Re: Extended Resolution
Posted: Sun Oct 25, 2020 4:54 pm
by EmmBee
I believe I've had this problem myself.
It's to do with using OUTLN in my BOOT file.
So, I no longer use OUTLN.
The question is how to recover the normality after using this command.
EmmBee
Re: Extended Resolution
Posted: Sun Oct 25, 2020 5:13 pm
by tofro
EmmBee wrote:I believe I've had this problem myself.
It's to do with using OUTLN in my BOOT file.
So, I no longer use OUTLN.
The question is how to recover the normality after using this command.
EmmBee
OUTLN with now parameters
shrinks the outline to the minimum currently occupied by all of the S*BASIC job's curreltly open windows. If you want to make it larger, you obviously need to tell the system
how large, and you do that by specifying width, height, xpos and ypos (just like WINDOW. You have two additional optional parameters if you want to draw a shadow around your window).
Re: Extended Resolution
Posted: Sun Oct 25, 2020 6:31 pm
by Andrew
Thank you Tofro and EmmBee -
Yes, I had Outln in my boot file
OUTLN #0,SCR_XLIM, SCR_YLIM, 0, 0 is the solution.
Re: Extended Resolution
Posted: Sun Oct 25, 2020 8:20 pm
by Derek_Stewart
Hi,
Sorry for the confusion, I did not read the question correctly.
But saying that, I do not use OUTLN in the boot file and can open windows that are larger than the Primary Sbseic windows. Which means they are unmanaged.
Any programme I write, has the outline set explicitly.
Maybe I doing this all wrong...