SCREEN1 = SYSVAR @ JSROM
- janbredenbeek
- Super Gold Card
- Posts: 666
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: SCREEN1 = SYSVAR @ JSROM
Also bear in mind that the pixels of the original QL screen are not square-shaped. The original QL screen was made for a 4:3 television screen (the actual aspect ratio was about 3:2, which caused the horizontal overscan on TVs). However, the X/Y pixel ratio in MODE 4 is 2:1 (indeed, QDOS also assumes 512 logical pixels across in MODE 8). The graphics coordinate system compensates for this so that, say, 50 units in the system correspond to the same distance in both X and Y direction... on the original QL screen!
But now take an emulator on a PC, with modern 16:9 screen and 1920x1080 resolution. You see that 1920/1080 is exactly 16:9, so the pixels are square-shaped. A 512x256 emulated QL screen will now have an aspect ratio of 2:1, so wider than the original 3:2. Thus, a circle drawn in QDOS will look like an ellipse in QPC2.
(actually, Qemulator squeezes the QL screen horizontally so it retains the 3:2 ratio, and SMSQ/E has a system variable in which you can set the aspect ratio so you will get perfect circles again).
Jan.
But now take an emulator on a PC, with modern 16:9 screen and 1920x1080 resolution. You see that 1920/1080 is exactly 16:9, so the pixels are square-shaped. A 512x256 emulated QL screen will now have an aspect ratio of 2:1, so wider than the original 3:2. Thus, a circle drawn in QDOS will look like an ellipse in QPC2.
(actually, Qemulator squeezes the QL screen horizontally so it retains the 3:2 ratio, and SMSQ/E has a system variable in which you can set the aspect ratio so you will get perfect circles again).
Jan.
Re: SCREEN1 = SYSVAR @ JSROM
And how do you start this?janbredenbeek wrote:SMSQ/E has a system variable in which you can set the aspect ratio so you will get perfect circles again.
7000 4E75
- janbredenbeek
- Super Gold Card
- Posts: 666
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: SCREEN1 = SYSVAR @ JSROM
It's a float PT_ASPRT at offset $14a in the CON linkage block pointed to by the system variable SYS_CLNK at $280c4.Ralf R. wrote:And how do you start this?janbredenbeek wrote:SMSQ/E has a system variable in which you can set the aspect ratio so you will get perfect circles again.
So you can read it out using PEEK_F(!$c4!$14a) and set using POKE_F !$c4!$14a,X where X is the pixel aspect ratio.
If you have a screen resolution with square-shaped pixels, then POKE_F !$c4!$14a,1 will get you a perfect circle.
(POKE_F !196!330,1 might be a bit more readable

Jan.
Re: SCREEN1 = SYSVAR @ JSROM
POKE_F !196!330,1 (and also POKE_F !$c4!$14a,1) gives ERR.BP in QPC2.
7000 4E75
- janbredenbeek
- Super Gold Card
- Posts: 666
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: SCREEN1 = SYSVAR @ JSROM
That's interesting. Which version are you using? (the aspect ratio POKE is only supported from SMSQ/E 3.00 onwards, and not in QDOS/Minerva anyway).Ralf R. wrote:POKE_F !196!330,1 (and also POKE_F !$c4!$14a,1) gives ERR.BP in QPC2.
It does work in SMSQmulator too (even with no extensions from BOOT file loaded).
Jan
- mk79
- QL Wafer Drive
- Posts: 1349
- Joined: Sun Feb 02, 2014 10:54 am
- Location: Esslingen/Germany
- Contact:
Re: SCREEN1 = SYSVAR @ JSROM
Turbo extension comes with its own POKE_F that doesn't have quite as many features as the SMSQ version, so try not loading that.Ralf R. wrote:POKE_F !196!330,1 (and also POKE_F !$c4!$14a,1) gives ERR.BP in QPC2.
Re: SCREEN1 = SYSVAR @ JSROM
Ah, that is the reason, why. I have loaded Turbo toolkit for Cash Trader. I should probably take that out.mk79 wrote:Turbo extension comes with its own POKE_F that doesn't have quite as many features as the SMSQ version, so try not loading that.
7000 4E75
-
- Aurora
- Posts: 957
- Joined: Tue Dec 17, 2013 1:17 pm
Re: SCREEN1 = SYSVAR @ JSROM
There's a program here http://www.dilwyn.me.uk/graphics/g_ratio.zip that corrects circles in QPC2. I assume it does the POKE.
Re: SCREEN1 = SYSVAR @ JSROM
Hi Jan,
As I count 0,1,2..256 pixels in mode 8, I unified the code, using now ellipse for circles as well. For mode 8, I just halve the ellipse width (a - excentricity). Actually, now thinking more general to also halve x coordinates as Tobias pointed out.
Tomas
I believe it is mode 8, that has wider pixels across.However, the X/Y pixel ratio in MODE 4 is 2:1
As I count 0,1,2..256 pixels in mode 8, I unified the code, using now ellipse for circles as well. For mode 8, I just halve the ellipse width (a - excentricity). Actually, now thinking more general to also halve x coordinates as Tobias pointed out.
Tomas
-
- Font of All Knowledge
- Posts: 4639
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: SCREEN1 = SYSVAR @ JSROM
Here is the DISA disassembley of the G_RATIO extension:Martin_Head wrote:There's a program here http://www.dilwyn.me.uk/graphics/g_ratio.zip that corrects circles in QPC2. I assume it does the POKE.
Regards,
Derek
Derek