Switching between low and medium resolution really not possible?

GFA, ASM, STOS, ...

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

Post Reply
User avatar
Count
Atari maniac
Atari maniac
Posts: 81
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

Switching between low and medium resolution really not possible?

Post by Count »

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: 1200
Joined: Mon Aug 30, 2010 8:36 am
Contact:

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

Post by dhedberg »

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 It's that time of the year again, or click here to feel the JOY.
ThorstenOtto
Atari God
Atari God
Posts: 1196
Joined: Sun Aug 03, 2014 5:54 pm

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

Post by ThorstenOtto »

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.
User avatar
Count
Atari maniac
Atari maniac
Posts: 81
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

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

Post by Count »

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: 4731
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

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

Post by joska »

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
User avatar
Count
Atari maniac
Atari maniac
Posts: 81
Joined: Sat Sep 16, 2017 9:15 am
Location: Germany

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

Post by Count »

joska wrote:Which programming language are you using?
C99
Post Reply

Return to “Coding”