Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: How to open a P96 screen?  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

Offline tonyw

How to open a P96 screen?
« on: November 23, 2002, 07:33:52 AM »
I know it's probably a silly question, but I'm trying to update an old prog to use P96. How do I open a screen using a Picaso96 mode? I've tried various modes in struct NewScreen, but I can only get PAL hi/lo res, interlaced or not.

What do I have to do to use the other screen modes?

tony
 

Offline Thomas

Re: How to open a P96 screen?
« Reply #1 on: November 23, 2002, 09:08:09 AM »

The mode field in NewScreen (16 bits) is not sufficient to take an entire mode id (32 bits). You have to use OpenScreenTags() instead of OpenScreen() and add the tag SA_DisplayID with the correct mode id. You can also use OpenScreen() with the ExtNewScreen structure and NS_EXTENDED flag set and add the Tags to the ExtNewScreen.Extension field.

You should let the user configure the desired mode id either in tooltypes or parameters or some config file. To get the mode id you can use the program GetModeID which is in the Visage archive on Aminet.

There is also a very useful tag SA_LikeWorkbench which clones the Workbench screen's mode and dimensions. Read intuition/screens.h and intuition autodocs for more information.

Bye,
Thomas

Offline tonyw

Re: How to open a P96 screen?
« Reply #2 on: November 23, 2002, 12:27:29 PM »
Thanks, Thomas, that's a great help. Although I haven't got it working yet, I think I understand what's needed--
1) I set the Type flag NS_EXTENDED (only)
2) I make up an array of Tags "Ext_tags[2]"
3) the first one is TAG_USER, SA_LikeWorkbench
4) the second one is TAG_END, 0
5) I put &Ext_tags[0] into the Extended field in ExtNewScreen

I call OpenScreen((struct NewScreen *)ns_ext), having to cast the ExtNewScreen struct to a NewScreen struct.

As I said, I've got that far and it still opens a lo-res screen, not a Workbench clone, but I'll persist for a while yet.

tony
 

Offline Georg

Re: How to open a P96 screen?
« Reply #3 on: November 23, 2002, 12:57:17 PM »
Quote
3) the first one is TAG_USER,
SA_LikeWorkbench


This must be SA_LikeWorkbench, TRUE

 

Offline tonyw

Re: How to open a P96 screen?
« Reply #4 on: November 24, 2002, 02:33:36 AM »
Thanks, Georg and Thomas, it works a treat now.

tony