Minerva dual screens

Anything QL Software or Programming Related.
User avatar
Gold Card
Posts: 424
Joined: Tue Jul 17, 2018 9:10 pm

Minerva dual screens

Postby Andrew » Sun Nov 22, 2020 12:01 pm

Can someone share an example on how to work with Minerva dual screen?
Like - write a text and draw something on first screen (displayed screen) - then open a window and write a text and draw something on second screen then swap screens?
What are the limitations for working with second screen (the not-displayed one)
Thank you

User avatar
Trump Card
Posts: 239
Joined: Thu Dec 23, 2010 1:40 pm

Re: Minerva dual screens

Postby dex » Sun Nov 22, 2020 12:44 pm

You can
1) press ALT+TAB to switch screens manually,

2) MODE 96,-1 - see https://superbasic-manual.readthedocs.io/en/latest/M/mode.html

Font of All Knowledge
Posts: 2062
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: Minerva dual screens

Postby Derek_Stewart » Sun Nov 22, 2020 12:48 pm


Make sure you enable the second screen, the system variables move.

If you read page 20 of the Minerva manual, which details the extended MODE command:
Minerva Manual wrote:MODE

MODE now allows you to use both screens. The original one-parameter call is exactly as before. The new form is: MODE screen_mode,display type
Screen mode accepts the normal 4, 8, etc, but with a few additions (see below). Display_type is simple, 0 for monitor, 1 for 625-line TV, and 2 for 525-line TV, or (usually) to leave the display type alone. Very little software uses the display type record, as old versions of SuperBASIC smashed it!
Screen_mode is very complex... The two screens are known as Screen0 and Screen1. Each screen may be in 4-colour mode or 8-colour mode, or blank. Each job now has a default screen on which any windows will be opened - it can change this default to have windows open in both screens. The screen which is not the default for the current job (the one calling the new MODE) is the other screen. Note that it is not necessarily the case that the default screen for a job is the same one the user is looking at (the displayed screen).
Oh, and the user can’t necessarily see the displayed screen, it might be blank. Your head hurt yet?

Toggling: MODE 64+n, -1

MODE 64+n, -1 toggles various attributes of the display, where:

n Toggles...
1 other screen from visible to blank
2 default screen from visible to blank
4 other screen from 4-colour to 8-colour
8 default screen from 4-colour to 8-colour
16 displayed screen from Screen0 to Screen1
32 default screen from Screen0 to Screen1
You can add together the various values for n to combine effects, so n=12=8+4 will toggle the colour modes of both screens. Note: a change to the default screen takes place before any of the others. Also, none of these calls do the “forced re-draw” imposed by the oneparameter version of the MODE call.
0 ... 1 ... 257
sets or resets display attributes. The values of n are as above. k
MODE -16384+128+k*n+c, -1 Sets...
to the from column above to the to column above
toggles, as above
Values of k can’t be combined. The c portion controls which screen is force re-drawn: c
-16384 other screen 32768
default screen

You can add the c values to re-draw both screens. So...
MODE 80, -1 toggles the displayed screen (80=64+16)
MODE 96, -1 makes subsequent OPENs happen on what was the other screen (96=64+32)
MODE 112 ,-1. does both the above simultaneously
MODE 16560,-1 sets default to Screen1, displays it in 4-colour mode, and force re-draws all windows in it (16560=16384+128+1 (32+1 6)+32768)

See attached manual.
Minerva Manual
(485.82 KiB) Downloaded 7 times


User avatar
Gold Card
Posts: 424
Joined: Tue Jul 17, 2018 9:10 pm

Re: Minerva dual screens

Postby Andrew » Sun Nov 22, 2020 2:37 pm

Thank you Dex and Derek - I have already read Minerva manual but still did not got right :) Programatically, I mean.
And the difference between visible and displayed screen is not yet clear for me.
I ill try to play a liitle more with some Superbasic and see if I can get it right.
A small example code would have helped a lot.

User avatar
Brittle Membrane
Posts: 122
Joined: Sat Jan 29, 2011 1:55 am

Re: Minerva dual screens

Postby M68008 » Sun Nov 22, 2020 6:48 pm

Here is some code from the TwoScreens Q-emulator demo:

Code: Select all

100 MODE 4
190 OPEN#4,con_512x236a0x20
210 MODE 68, -1 : REMark Set SCREEN 1 to MODE 8
220 MODE 96, -1 : REMark Set SCREEN 1 as default
230 OPEN#5,con_512x236a0x20

Now screen 0 is in MODE 4 and screen 1 in MODE 8. From now on, printing to #4 will show on screen 0 and printing to #5 on screen 1. The user can switch between the two with Ctrl+Tab.

RWAP Master
Posts: 2738
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom

Re: Minerva dual screens

Postby RWAP » Sun Nov 22, 2020 6:56 pm

I seem to remember putting a fair bit about this in the SBASIC/SuperBASIC Reference Manual - Mode command and Appendix A1 (reminds me - is anyone struggling with the index on the left hand side not scrolling?)

Other helpful keywords are:

https://superbasic-manual.readthedocs.i ... t-scr.html
https://superbasic-manual.readthedocs.i ... creen.html

User avatar
Forum Moderator
Posts: 1226
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK

Re: Minerva dual screens

Postby NormanDunbar » Sun Nov 22, 2020 7:54 pm

Hi Rich,

the index on the left should be showing the various chapters plus the Keywords_A through Keywords_Z in a closed manner. Clicking a chapter/Keywords entry should open it to display sections/sub-sections or the various keywords.

It's working fine for me -- I just checked.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals - https://www.amazon.co.uk/Arduino-Softwa ... 1484257898, https://www.apress.com/gb/book/9781484257890

Who is online

Users browsing this forum: No registered users and 3 guests