[comp.sys.amiga.programmer] I need help with 2.0 screens

hollnbgh@coral.bucknell.edu (04/22/91)

     I am programing a graphing utility in C, and would like to know
how to get the new ECS resolutions (640x480, 640x960, 1280x200, 1280x400).

     How do I actually open the screens with those resolutions, and how
can I make my program recognize whether or not there is an ECS Denise,
and AmigaDOS 2.0 present in the system.

Thanks in advance.

Dale Hollenbaugh
hollnbgh@coral.bucknell.edu

spence@cbmvax.commodore.com (Spencer Shanson) (04/23/91)

In article <1991Apr21.205546.3138@coral.bucknell.edu> hollnbgh@coral.bucknell.edu writes:
>
>     I am programing a graphing utility in C, and would like to know
>how to get the new ECS resolutions (640x480, 640x960, 1280x200, 1280x400).
>
>     How do I actually open the screens with those resolutions, and how
>can I make my program recognize whether or not there is an ECS Denise,
>and AmigaDOS 2.0 present in the system.

Last question first - all libraries in KickStart 2.0 have a version number of
36 or 37 (the switch to V37 was made at about the beginning of this year), so you
should open a library, and check it's actual version number when it is opened. 

Now, assuming you are running under V36 or V37, you will be able to open the
graphics.library, and check the GfxBase->ChipRevBits0 to see if
GFXF_HR_DENISE is set. If it is, then the machine has an ECS Denise in it. However,
for opening your screens, you should not need to know that. All you need to do
is pass the required modeID to Intuition's OpenScreenTags(). If the mode is
not available (because there is no ECS Denise), then the OpenScreen() will
fail. 

>
>Thanks in advance.
>
>Dale Hollenbaugh
>hollnbgh@coral.bucknell.edu


-- 
---------------------------------------------------------------------------
Spencer Shanson - Amiga Software Engineer     | email: spence@commodore.COM
                                              | or uunet!cbmvax!spence
All opinions expressed are my own, and do not | "You know my methods. Apply
(necessarily) represent those of Commodore.   | them" -- Sir Arthur Conan
                                              | Doyle - 'The Sign of Four'

spence@cbmvax.commodore.com (Spencer Shanson) (04/24/91)

In article <20882@cbmvax.commodore.com> spence@cbmvax.commodore.com (Spencer Shanson) writes:
>for opening your screens, you should not need to know that. All you need to do
>is pass the required modeID to Intuition's OpenScreenTags(). If the mode is
>not available (because there is no ECS Denise), then the OpenScreen() will
>fail. 
>
Furthermore, you can also find out from intuition why the screen did not
open using the SA_ErrorCode tag:

ULONG errorcode;

mysc = OpenScreenTags(...,
	...,
	SA_ErrorCode, &errorcode,
	...,
	);

Then you can compare errorcode against several values in screens.h.
In particular:

OSERR_NOCHIPS - installed rev. of custom chips don't support this mode
OSERR_NOMONITOR - User doesn't have the monitor needed for this mode.

-- 
---------------------------------------------------------------------------
Spencer Shanson - Amiga Software Engineer     | email: spence@commodore.COM
                                              | or uunet!cbmvax!spence
All opinions expressed are my own, and do not | "You know my methods. Apply
(necessarily) represent those of Commodore.   | them" -- Sir Arthur Conan
                                              | Doyle - 'The Sign of Four'