Switching between low and medium resolution really not possible?

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Count
Atarian
Atarian
Posts: 7
Joined: Sat Sep 16, 2017 9:15 am

Switching between low and medium resolution really not possible?

Postby Count » Wed May 08, 2019 6:19 pm

As everybody knows, in ST colour mode you can switch between low and medium resolution from desktop without rebooting. Is it really impossible to do so within a GEM application? Is there no way to let VDI and AES reinitialize and get the information about the changed environment? Alternative desktops like Gemini or Teradesk do not provide any dialogue to change the display resolution. They would, if it was possible, wouldn't they?

I tried Setscreen(), but (as you can read in the Compendium as well as in the Profibuch) you run into trouble and bombs when making VDI or AES calls before returning to the resolution your application started with.

I was wondering about how the TOS desktop behaves in that particular situation when the user changes from medium to low resolution or vice-versa. To come to an answer I checked the EmuTOS sources.

EmuTOS does the following: After the user commited the resolution change by pressing the OK button of the dialogue, this information (resolution change requested) is stored in memory and the OS restarts the desktop application which results into a shortened warm reboot (without doing such boot stuff as showing the boot logo and loading programmes from the AUTO folder).

That is very frustrating to me, because I am in the situation where I would be glad to be able to switch from medium to low resolution to benefit from the 16 colours there rather than four. To explain this a little: The "application" consists of three separate modules (separate applications). One main application and two further ones which are being loaded on demand. The main and one of the other two cannot run in low resolution because they need at least 640 pixels in width, but the third one doesn't.

User avatar
dhedberg
Atari God
Atari God
Posts: 1013
Joined: Mon Aug 30, 2010 8:36 am
Contact:

Re: Switching between low and medium resolution really not possible?

Postby dhedberg » Wed May 08, 2019 10:02 pm

My knowledge of GEM and the VDI are limited but have you ever considered creating your own interface (GUI) for your application? If you do that you can switch freely between resolutions. You can even split the screen and use medium res in one part and low res in the other part.
Daniel, New Beat - http://newbeat.atari.org. Like demos? Have a look at our new Falcon030 demo MORE.

ThorstenOtto
Atari Super Hero
Atari Super Hero
Posts: 559
Joined: Sun Aug 03, 2014 5:54 pm

Re: Switching between low and medium resolution really not possible?

Postby ThorstenOtto » Thu May 09, 2019 12:57 am

Count wrote:Is it really impossible to do so within a GEM application?


Short answer: yes. At least not when you want to use AES. In MagiC and other MultiTOSses, there is a shel_write() mode to switch the resolution, but even that might not always work.

EmuTOS does the following: After the user commited the resolution change by pressing the OK button of the dialogue, this information (resolution change requested) is stored in memory and the OS restarts the desktop application


Original TOS does essentially the same. Accessories are reloaded on resolution switch, but not AUTO folder programs.

I tried Setscreen(), but (as you can read in the Compendium as well as in the Profibuch) you run into trouble and bombs when making VDI or AES


I think you should be able to use VDI after calling Setscreen(), but definitely not any AES calls. Maybe you have to adjust some Line-A variables. But this is also not very clean, and might not work when using other VDIs.

Count
Atarian
Atarian
Posts: 7
Joined: Sat Sep 16, 2017 9:15 am

Re: Switching between low and medium resolution really not possible?

Postby Count » Thu May 09, 2019 11:03 am

Thank you for your comments. Maybe I will play around with the Line-A variables. Writing an own GUI is no option for me as I want to use OS functionality as much as possible.

joska
Hardware Guru
Hardware Guru
Posts: 4329
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Switching between low and medium resolution really not possible?

Postby joska » Thu May 09, 2019 11:17 am

My suggestion would be to forget about this. GEM is not designed for on-the-fly resolution changes, and even if you manage to hack the VDI and AES to work after a resolution change it will almost certainly be a very OS-specific hack.

Since your application appears to be closely tied to ST hardware I think a custom GUI would be the most robust solution. Which programming language are you using? You might be able to benefit from existing solutions (like ZeST for FGA Basic).
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

Count
Atarian
Atarian
Posts: 7
Joined: Sat Sep 16, 2017 9:15 am

Re: Switching between low and medium resolution really not possible?

Postby Count » Fri May 10, 2019 12:29 pm

joska wrote:Which programming language are you using?

C99


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 4 guests