Page 5 of 6

Re: sQLux Foibles

Posted: Sat Oct 30, 2021 2:58 pm
by NormanDunbar
So I came in, from walking the dog, to a strange brown envelope on the door mat. Turns out that because I subscribe to MagPi Magazine, they sent me a freebie. I'm now the owner of a brand new, 4 core 64bit Raspberry Pi Zero 2W. Great I thought, let's see how much faster sQLux will run on this beastie.

First pull the latest source:

Code: Select all

cd SourceCode/sQLux
git pull
Umm, where's the Makefile gone? Checks github and sees we need cmake now.

Code: Select all

sudo apt install cmake
Now for the build:

Code: Select all

mkdir linux
cd linux
cmake ..
make
That worked fine. Next, set up a sym-link to the parent directory where all the config files are:

Code: Select all

cd ..
ln -s linux/sqlux ./sqlux

And off we go:

Code: Select all

./sqlux
...
Release 2021-04-14
Using Minerva ROM
...
Video driver RPI xres 1280 yres 1024
SDL_CreateWindow Error: Window is too large.
Bummer! All of the above is in the command line. If I "startx" and execute the sqlux executable, it works fine. However, in that mode, it is using the "x11" screen driver -- I can see this when running it from a terminal session.

I think the problem might be the video driver being set to "SDL_WINDOW_FULLSCREEN_DESKTOP" at line 90 in SDL2screen.c. Given that the driver name is RPI and not one of those others listed -- "x11", "cocoa" or "windows".

I'm not an SDL developer, so I'm not sure what to do to fix this here.


Cheers,
Norm.

Re: sQLux Foibles

Posted: Sat Oct 30, 2021 6:22 pm
by XorA
I think the problem might be the video driver being set to "SDL_WINDOW_FULLSCREEN_DESKTOP" at line 90 in SDL2screen.c. Given that the driver name is RPI and not one of those others listed -- "x11", "cocoa" or "windows".
I think you over thought that, looks like w,h variables are not initialised in non windowing system mode. Oooops!

Re: sQLux Foibles

Posted: Sat Oct 30, 2021 9:13 pm
by NormanDunbar
Well, if there's an easy or s difficult solution to a problem, mine is usually the latter!

Thanks.

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 10:59 am
by NormanDunbar
This works!

Code: Select all

w = sdl_mode.w;
h = sdl_mode.h;
Added just above:

Code: Select all

printf("Video Driver %s xres %d .....", ....);
Whether or not it's the correct solution remains to be seen! I could have added a check for the RPI driver, I suppose?

Mind you, in this mode, there's no escape from the program -- at least, there wasn't until "extras" listed the "kill_uqlx" command. Phew! :D

Cheers,
Norm.

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 11:58 am
by Silvester
NormanDunbar wrote:So I came in, from walking the dog, to a strange brown envelope on the door mat. Turns out that because I subscribe to MagPi Magazine, they sent me a freebie. I'm now the owner of a brand new, 4 core 64bit Raspberry Pi Zero 2W. Great I thought, let's see how much faster sQLux will run on this beastie..
How much faster? I received one yesterday, I wasn't thinking of using it for QL emulation, but what's the chance of getting access to GPIO ? Prefer Peter's Q68 zero, but be nice to tinker.

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 12:31 pm
by NormanDunbar
A lot faster!

This beastie has 4 cores compared to the original Pi Zero's single core. Updating and upgrading the entire OS takes a lot less time.

Compiling sQLux is much faster (or at least, seems to be) although I have yet to try running a full rebuild with the -j 4 option to use 4 cores.

Some tests I've seen online (YouTube, Explaining Computers is a good one) show huge improvements in various test suites from over 180 seconds with one core to about 50 with 4. (Rough figures as I'm "quoting" from memory!

Also, Elektor Magazine have a number of "useful projects for the Pi Zero 2", one of which is to set it up tio run PiHole and serve as your DNS server. I'm currently using a Pi 3B+ for this but getting rid of internet adverts with a zero would be better -- less power for a start.

HTH

Cheers,
Norm.

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 4:12 pm
by XorA
XorA wrote:
I think the problem might be the video driver being set to "SDL_WINDOW_FULLSCREEN_DESKTOP" at line 90 in SDL2screen.c. Given that the driver name is RPI and not one of those others listed -- "x11", "cocoa" or "windows".
I think you over thought that, looks like w,h variables are not initialised in non windowing system mode. Oooops!
The correct fix is now in the git repo, I have not had time to actually test it on a Pi though!

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 5:40 pm
by NormanDunbar
Thanks. Works perfectly as far as I can see. The UQLX_RELEASE$ is still showing "2021-04-14" though. In case that's a problem?

Much obliged, thanks.

If anyone is interested in speed, building sQLux with a 4 core Pi Zero takes 18.952 seconds (make -j 4). With a one core Zero it's 52.219 seconds.


Cheers,
Norm.

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 5:42 pm
by XorA
NormanDunbar wrote:Thanks. Works perfectly as far as I can see. The UQLX_RELEASE$ is still showing "2021-04-14" though. In case that's a problem?
No, its just not automated yet!

Re: sQLux Foibles

Posted: Sun Oct 31, 2021 10:22 pm
by XorA
Peter wrote:
XorA wrote:Interesting question is on a BBQL are the pixels always square? (also this goes for the clones).
No they are not. In 512x256 QL MODE 4, I double horizontally and triple vertically for VESA standard 1024x768 on 4:3 monitor.
That roughly provides the QL aspect ratio seen on CRT historically.
Thanks I implemented that in sQLux now with the FIXASPECT option in sqlux.ini