Q68 SMSQ/E Screen modes
-
- Font of All Knowledge
- Posts: 4793
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Q68 SMSQ/E Screen modes
Hi,
I have been asked how to determine the screen mode or a Q68 screen, which SMSQ/E has a function: RMODE
RMODE seems to work only in QPC2 and SMSQmulator.
On a Q68 RMODE returns 0 in all Q68 screen modes.
What is the best way to find the Q68 screen mode?
My rough solugion is to use the screen resolution with SCR_XSIZE, SCR_YSIZE and set a variale based on my knowledge of the Q68 screen mode.
I have been asked how to determine the screen mode or a Q68 screen, which SMSQ/E has a function: RMODE
RMODE seems to work only in QPC2 and SMSQmulator.
On a Q68 RMODE returns 0 in all Q68 screen modes.
What is the best way to find the Q68 screen mode?
My rough solugion is to use the screen resolution with SCR_XSIZE, SCR_YSIZE and set a variale based on my knowledge of the Q68 screen mode.
Regards, Derek
- janbredenbeek
- Super Gold Card
- Posts: 685
- Joined: Wed Jan 21, 2015 4:54 pm
- Location: Hilversum, The Netherlands
- Contact:
Re: Q68 SMSQ/E Screen modes
I've found out that the Q68's mode register at $FF000018 can be PEEKed for the current mode set by DISP_MODE. However this is an undocumented feature.Derek_Stewart wrote: Tue Jul 23, 2024 8:07 pm I have been asked how to determine the screen mode or a Q68 screen, which SMSQ/E has a function: RMODE
RMODE seems to work only in QPC2 and SMSQmulator.
On a Q68 RMODE returns 0 in all Q68 screen modes.
What is the best way to find the Q68 screen mode?
It would be better if RMODE would be fixed to return the correct screen mode.
* note to self: RMODE should be implemented in the next Minerva4Q68 release *
Re: Q68 SMSQ/E Screen modes
RMODE is not an SMSQ/E but a QPTR keyword. So if those extensions are not loaded it's just an empty variable.Derek_Stewart wrote: Tue Jul 23, 2024 8:07 pm Hi,
I have been asked how to determine the screen mode or a Q68 screen, which SMSQ/E has a function: RMODE
RMODE seems to work only in QPC2 and SMSQmulator.
On a Q68 RMODE returns 0 in all Q68 screen modes.
When loaded it will return the correct mode, even on the Q68.
According to the official SMSQ/E Keyword Database there is also an RMODE function in the tool FN_ext.
But I know nothing about that one.
BSJR
-
- Font of All Knowledge
- Posts: 4793
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Q68 SMSQ/E Screen modes
Hi Bob,BSJR wrote: Wed Jul 24, 2024 11:27 am RMODE is not an SMSQ/E but a QPTR keyword. So if those extensions are not loaded it's just an empty variable.
When loaded it will return the correct mode, even on the Q68.
According to the official SMSQ/E Keyword Database there is also an RMODE function in the tool FN_ext.
But I know nothing about that one.
BSJR
Thank you for reminding about QPTR RMODE, which when QPTR Toolkit is loaded the Q68 reports:
DISP_MODE 0: 8
DISP_MODE 1, 4: 4
DISP_MODE 3,6,7: 33
DISP_MODE 5: 16
This being the screen mode.
I suppose that RMODE coupled with the SCR_XLIM/SCR_YLIM will give the appropriate DISP_MODE the Q68 is in.
Maybe could do with a function like DISP_MODE$:
Code: Select all
DEFine FuNction DISP_MODE$
RETurn PEEK($FF000018)
END DEFine DISP_MODE$
Regards, Derek
Re: Q68 SMSQ/E Screen modes
Not at home to check. Could the DISP_TYPE function be used? It is implemented in Q68 SMSQ/E (one of the few DISP_xxx extensions implemented) but I'm not sure if it returns the exact type of information you are looking for.
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
Re: Q68 SMSQ/E Screen modes
According to SuperBasic Manual DISP_TYPE returns only:dilwyn wrote: Wed Jul 24, 2024 1:04 pm Not at home to check. Could the DISP_TYPE function be used? It is implemented in Q68 SMSQ/E (one of the few DISP_xxx extensions implemented) but I'm not sure if it returns the exact type of information you are looking for.
0 Original ST QL Emulator, QL Hardware (either of these two may support MODE 8) plus QXL and QPC. All of these (except the original ST QL emulator) may support higher resolutions.
1 Extended Mode 4 Emulator (either 512x256 or 768x280 pixel screen)
2 QVME Mode 4 Emulator
4 Monochrome display (only two colours)
Re: Q68 SMSQ/E Screen modes
I'll fire up the Q68 to check when I get home this evening.
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com
-
- Font of All Knowledge
- Posts: 4793
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Q68 SMSQ/E Screen modes
Hi,
unless there has been a change DISP_TYPE does nothing, as with the DISP_XXX functions.
I asked Wolfgang about a while back, confirmed, maybe it has been implemented.
unless there has been a change DISP_TYPE does nothing, as with the DISP_XXX functions.
I asked Wolfgang about a while back, confirmed, maybe it has been implemented.
Regards, Derek
Re: Q68 SMSQ/E Screen modes
I hoped that at least DISP_SIZE worksDerek_Stewart wrote: Wed Jul 24, 2024 7:13 pm Hi,
unless there has been a change DISP_TYPE does nothing, as with the DISP_XXX functions.
I asked Wolfgang about a while back, confirmed, maybe it has been implemented.

I was relying on it to set the screen size for Pitman.
Re: Q68 SMSQ/E Screen modes
Just tried DISP_TYPE now on Q68. It does work (SMSQ/E only, not Minerva), but the function returns the usual SBASIC values for the high colour modes in addition to the values listed earlier for MODE 4 and MODE 8:
16=MODE 16 (the 8-bit 256-colour mode)
33=MODE 33 (the 16-bit colour mode, like a Q40/Q60)
These values are not the same as the mode numbers used in the DISP_MODE command though. And you can't use DISP_TYPE to check screen resolution, you'd need to use SCR_XLIM and SCR_YLIM for that.
As I thought earlier, DISP_TYPE is the only one of the DISP_xxx set of extensions (apart from DISP_MODE) to work on Q68's SMSQ/E
16=MODE 16 (the 8-bit 256-colour mode)
33=MODE 33 (the 16-bit colour mode, like a Q40/Q60)
These values are not the same as the mode numbers used in the DISP_MODE command though. And you can't use DISP_TYPE to check screen resolution, you'd need to use SCR_XLIM and SCR_YLIM for that.
As I thought earlier, DISP_TYPE is the only one of the DISP_xxx set of extensions (apart from DISP_MODE) to work on Q68's SMSQ/E
--
All things QL - https://dilwyn.theqlforum.com
All things QL - https://dilwyn.theqlforum.com