[comp.sys.atari.st] switching res

sslee@polyslo.CalPoly.EDU (Steven Lee) (01/05/91)

Does anyone know of a legal or illegal way to switch resolution without
going through the desktop?  This would be convenient to write low res
programs while running in medium res (such as using Laser C).  I have
TOS 1.0 but I suppose I could check the TOS version and use differenct
methods if necessary.

The only thing that remotely comes close to what I wanted was in a
program called AVS.PRG (Audio-Visual Player by Jim Kent, released by
STart).  For example, if you were in medium res and wanted to be in
low res...

	char *ainit=(char *)a_init;  /* Line A call, $A000 */
	Setscreen(-1L,-1L,0);
	*((int *)(aline-692))=319;   /* Mouse X limit */
	*((int *)(aline-690))=199;   /* Mouse Y limit */
	*((int *)(aline-666))=16;    /* # of bitplanes */

Apparently, that works in setting the boundaries for moving the mouse
cursor.  It also shows the correct colors.  Unfortunately, it does not
center dialog boxes correctly, does not clear the area under the drop-down
menus, and some VDI functions (such as drawing ellipses) do not work as
expected.

I know using Line A is not recommended in the TTs but this is for my own
personal use.

Steven Lee

sslee@polyslo.CalPoly.EDU (Steven Lee) (01/10/91)

I didn't get much response the first time, so this is somewhat of a repost.
Since it is confirmed that there is no legal way to switch res without 
going through the desktop, how would you do this illegally for my own
personal use.  This would be convenient to write low res
programs while running in medium res (such as using Laser C).  I have
TOS 1.0 but I suppose I could check the TOS version and use differenct
methods if necessary.

The only thing that remotely comes close to what I wanted was in a
program called AVS.PRG (Audio-Visual Player by Jim Kent, released by
STart).  For example, if you were in medium res and wanted to be in
low res...

	char *ainit=(char *)a_init;  /* Line A call, $A000 */
	Setscreen(-1L,-1L,0);
	*((int *)(aline-692))=319;   /* Mouse X limit */
	*((int *)(aline-690))=199;   /* Mouse Y limit */
	*((int *)(aline-666))=16;    /* # of bitplanes */

Apparently, that works in setting the boundaries for moving the mouse
cursor.  It also shows the correct colors.  Unfortunately, it does not
center dialog boxes correctly, does not clear the area under the drop-down
menus, and some VDI functions (such as drawing ellipses) do not work as
expected.

I think I can trick GEM into changing res if I know where it stores the
VDI parameters when it opens a virtual workstation.

Steven Lee

apratt@atari.UUCP (Allan Pratt) (01/11/91)

sslee@polyslo.CalPoly.EDU (Steven Lee) writes:
>	char *ainit=(char *)a_init;  /* Line A call, $A000 */
>	Setscreen(-1L,-1L,0);
>	*((int *)(aline-692))=319;   /* Mouse X limit */
>	*((int *)(aline-690))=199;   /* Mouse Y limit */
>	*((int *)(aline-666))=16;    /* # of bitplanes */

Setscreen() fills in the line-A variable space with correct values for
the new resolution, so you don't have to do it yourself. This is the
right way to change rez, if you want to do that. Since you already know
you're going "behind AES's back" in doing this, I won't lecture you on
the implications.  As long as you Setscreen() back to the old rez
before you make any AES calls, this works.

============================================
Opinions expressed above do not necessarily	-- Allan Pratt, Atari Corp.
reflect those of Atari Corp. or anyone else.	  ...ames!atari!apratt