Re: [ql-users]GD2 again

2001-02-07 Thread P Witte

Whats the best way for programs to test for GD2? Suggestions for both 
SBasic and assembler welcome!

Ie,

>   IF VER$(1) >= '2.98' THEN
> r = $FF0028: g = $FF64: w = $F0
> PALETTE_QL 0, 0, 0, r, r, g, g, w, w  <---  error
>   END IF
>
falls down if QL-colour mode is selected. (Stupid idea anyway, but couldnt
think of anything else at the time)

Per






Re: [ql-users]GD2 again

2001-02-07 Thread Timothy Swenson

Isn't there a way to check to see if a Keyword is available?  In DJTK there is
the CHECK command, that looks to see if a PROC/FN is available.  I'm guessing
this will work for the GD2 commands, like PALETTE_QL.  Have not tried it
myself, but it's worth a look.  Get DJTK from Dilwyn's page on the Other
Sofware page.

Tim Swenson



Re: [ql-users]GD2 again

2001-02-07 Thread Marcel Kilgus

P Witte wrote: 
> Whats the best way for programs to test for GD2? Suggestions for both
> SBasic and assembler welcome!

DISP_TYPE returns 0 for QL mode, 32 for QPC/QXL 16bit and 33 for Q40
16bit.

In assembler the same function is available through the display driver
thing.

Marcel





Re: [ql-users]GD2 again

2001-02-08 Thread P Witte


Timothy Swenson writes:

> Isn't there a way to check to see if a Keyword is available?  In DJTK
there is
> the CHECK command, that looks to see if a PROC/FN is available.  I'm
guessing
> this will work for the GD2 commands, like PALETTE_QL.  Have not tried it
> myself, but it's worth a look.  Get DJTK from Dilwyn's page on the Other
> Sofware page.

Its probably the surest way, though somewhat gawky, dont you find? The Thing
list is probably the one to use in these situations, but then there doesnt
appear to be a GD2 Thing or anything related. An alternative might be to
read the mode, though that is a rather indirect way of doing things, and not
necessarily unambiguous with regard to the presence of the keyword in
question. The keyword is directly related to certain capabilities of the OS,
and it is those capabilities that I really want to test for. Are there no
new keys in the sys vars to indicate the presence of GD2, like in the
display mask (sys_mdsp) ? (Apparently not.)

Just tested: Called  iow.papp  on a pre-colour SMSQ/E (this is the key for
the first of the new traps). It didnt return NI, as might be expected, but
BP (or is this a genuine BP error from some undocumented trrap?). Still, a
utility or keyword to test for this might be a possible solution. Anyone
know anything to the contrary?

Later:

Yes, I do! I wrote a SB keyword as described above. It worked as expected in
various pre-colour versions of SMSQ/E, and on 2.98 in hi-colour mode - but
not in 2.98 QL-colour mode - there the trap seems to work - ie no errors -
although it isnt implemented! :((  Do we call this a "feature" or what?

Other suggestions?

Per




Re: [ql-users]GD2 again

2001-02-08 Thread Marcel Kilgus

P Witte wrote: 
> The Thing list is probably the one to use in these situations, but
> then there doesnt appear to be a GD2 Thing or anything related.

Of course there is! It's called QVME. Function TYPE is the one you
want.

> Other suggestions?

DISP_TYPE / QVME & TYPE.

Marcel





Re: [ql-users]GD2 again

2001-02-08 Thread Dilwyn Jones



>P Witte wrote:
>> Whats the best way for programs to test for GD2? Suggestions for
both
>> SBasic and assembler welcome!
>
>DISP_TYPE returns 0 for QL mode, 32 for QPC/QXL 16bit and 33 for Q40
>16bit.
>
>In assembler the same function is available through the display
driver
>thing.
>
>Marcel

No good for QDOS. I suspect Per wants to give a program a chance to be
able to look for GD2 and take appropriate action if not there.
DISP_TYPE is only in SMSQE

--
Dilwyn Jones
[EMAIL PROTECTED]
http://www.soft.net.uk/dj/index.html




Re: [ql-users]GD2 again

2001-02-08 Thread Marcel Kilgus

Dilwyn Jones wrote:
> No good for QDOS. I suspect Per wants to give a program a chance to be
> able to look for GD2 and take appropriate action if not there.
> DISP_TYPE is only in SMSQE

No problem, then just check for SMSQE beforehand (VER$).

Marcel





Re: [ql-users]GD2 again

2001-02-08 Thread P Witte

Marcel Kilgus writes:

> DISP_TYPE returns 0 for QL mode, 32 for QPC/QXL 16bit and 33 for Q40
> 16bit.
>
> In assembler the same function is available through the display driver
> thing.

Well, that solves that. Thank you ! :) Perhaps youd care to update the
manual: QPC2v2 supplement p13, states just that "..DISP_TYPE 
always returns 0." so naturally I didnt check.

Per










Re: [ql-users]GD2 again

2001-02-09 Thread Marcel Kilgus

P Witte wrote: 
> Perhaps youd care to update the manual:

Needs to be done, yes...

Marcel