View Full Version : How to open a P96 screen?
11-23-2002, 12:33 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?
11-23-2002, 02:08 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.
11-23-2002, 05:27 AM
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"
3) the first one is TAG_USER, SA_LikeWorkbench
4) the second one is TAG_END, 0
5) I put &Ext_tags 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.
11-23-2002, 05:57 AM
3) the first one is TAG_USER,
This must be SA_LikeWorkbench, TRUE
11-23-2002, 07:33 PM
Thanks, Georg and Thomas, it works a treat now.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.