[comp.sys.atari.st] Switching resolutions without rebooting.

juancho@dgp.toronto.edu (John Buchanan) (11/21/88)

I am trying to develop a lowrez program, the problem is that i hate 40
column screens.  What I tried to do this morning was to write two quick
hacks.  The first low.c was to switch me into low resolution and the other
medium was to switch me into medium resolution.  Needless to say( otherwise
I would not be posting this)  I did not achieve my goals.  

	I tried changing the values at 0x44c and 0x44a (No visible change)
and the register at 0xff8260.  The later changed things but did not
completely set up the hardware.

/* this is a copy of my program so far */

#include <osbind.h>
#define REZHOLDER0 ((short *) 0xFF8260L)
#define REZHOLDER1 ((short *) 0x44CL)
#define REZHOLDER2 ((short *) 0x44AL)

main()
	{
	long save_ssp;
	save_ssp = Super(0L);
	* REZHOLDER0 = (*REZHOLDER0
& 0xFFFFFCL) ;
	Super(save_ssp);
	}
/* any help will be appreciated, and paid for by the society for the
prevention of cruelty to dodo's */
                        *
(* question.  If the NDP does win the canadian election, will the CIA ensure
that this leftist govt. so close to the USA is toppled?  Hmmm. *)

* New Democratic Party  is the left most main stream party in CANADA

John W. Buchanan                  Dynamic Graphics Project
               			  Computer Systems Research Institute
				  University of Toronto
(416) 978-6619			  Toronto, Ontario M5S 1A4

BITNET:		juancho@explorer.dgp.utoronto
EAN:		juancho@explorer.dgp.toronto.cdn
UUCP:		...!mcvax!explorer.dgp.toronto.edu!juancho

soohoo@cory.Berkeley.EDU (Ken Soohoo) (11/23/88)

In article <8811211837.AA23186@explorer.dgp.toronto.edu> juancho@dgp.toronto.edu (John Buchanan) writes:
>I am trying to develop a lowrez program, the problem is that i hate 40
>column screens.  What I tried to do this morning was to write two quick
>hacks.  The first low.c was to switch me into low resolution and the other
>medium was to switch me into medium resolution.  Needless to say( otherwise
>I would not be posting this)  I did not achieve my goals.  
>
>
>John W. Buchanan                  Dynamic Graphics Project
>               			  Computer Systems Research Institute

John,
If you're trying to change resolutions and use GEM with the 'new' res,
it can't be done without a reboot (well, desktop isn't happy, but some
things do work). If all you want to do is write your program in 80 columns,
then have the program switch you into low res to run, and then switch back
out when you're finished -- and as long as you don't mind dealing with a
slightly confused GEM, all you've gotta do is use Setscreen(-1l, -1l, 0);
to get into low res, and then Setscreen(-1l, -1l, 1); to get back!

--Kenneth Soohoo	(soohoo@cory.Berkeley.Edu)
  Atari 400/800/600xl/800xl/1200/130xe/65xe, 1040ST hacker
  Sometime Berkeley Student, othertimes...
  My opinions are my OWN, not necessarily Atari's