[comp.sys.amiga.programmer] 2.0 Programming Questions

griffith@eecs.cs.pdx.edu (Mars - God of War) (01/09/91)

glmwc@marlin.jcu.edu.au (Matt Crowd) writes:

>I am trying to get a program to work so that it will correctly
>open a screen that is 256 lines high when running under 2.0 on
>a PAL workbench.. but on an NTSC machine! (if you can understand
>that!)

>At the moment I am testing the DisplayModes flag, but this 
>only checks that hardwired jumper.  I have heard that the 2.0

I haven't had much experience using 2.0, but ever since 1.2 you have been
able to use GfxBase->NormalDisplayRows and GfxBase->NormalDisplayColumns to
get the height and width. However, I have no idea if this is set correctly
when running in PAL mode on an NTSC machine. (You can also use
GfxBase->MaxDisplayRows and GfxBase->MaxDisplayColumns to get the maximum
overscan values). I don't have a 1 meg. Agnus, so I can't even check that.


| Michael Griffith                     | If I had an opinion it certainly   |
| griffith@eecs.ee.pdx.edu             | wouldn't be the same one as        |
| ...!tektronix!psueea!eecs!griffith   | Portland State University anyways. |

peter@cbmvax.commodore.com (Peter Cherna) (01/10/91)

In article <1991Jan9.101407.11809@marlin.jcu.edu.au> glmwc@marlin.jcu.edu.au (Matt Crowd) writes:
>I am trying to get a program to work so that it will correctly
>open a screen that is 256 lines high when running under 2.0 on
>a PAL workbench.. but on an NTSC machine! (if you can understand
>that!)
>
>At the moment I am testing the DisplayModes flag, but this 
>only checks that hardwired jumper.  I have heard that the 2.0
>calls GetDisplayInfoData() in conjunction with DisplayInfo.PropertyFlags
>DIPF_IS_PAL or the LockPubScreen() call.  However, besides that
>I have absolutely no idea how to use the calls etc. (no manuals
>etc).  Can anybody help?  (parameters, return values etc)


Something like this:

	ULONG modeID = HIRES_KEY;	/* some reasonable default */
	struct Screen *wbscreen;

	if ( wbscreen = LockPubScreen( "Workbench" ) )
	{
		modeID = GetVPModeID( &wbscreen->ViewPort );
		UnlockPubScreen( NULL, wbscreen );
	}

	myscreen = OpenScreenTags( &mynewscreen,
		SA_DisplayID, modeID,
		TAG_DONE);

>Colin Adams

     Peter
--
     Peter Cherna, Software Engineer, Commodore-Amiga, Inc.
     {uunet|rutgers}!cbmvax!peter    peter@cbmvax.commodore.com
My opinions do not necessarily represent the opinions of my employer.
"Oh, PIN-compatible!  I thought you wanted me to make it IN-compatible!"