Welcome, Guest. Please login or register.

Author Topic: How to open a P96 screen?  (Read 8666 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show only replies by 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 tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show only replies by 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

  • Jr. Member
  • **
  • Join Date: Feb 2002
  • Posts: 90
    • Show only replies by 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 tonywTopic starter

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 553
    • Show only replies by 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