[GEM Development] Apricot GEM: Screenshots and bugs

John Elliott jce at seasip.demon.co.uk
Mon Dec 19 16:21:15 PST 2011


I wrote:

>   I need to find out more about Activity. Among other things, it seems to be
> device-independent, using GSX drivers for all its drawing. Except that the
> only driver I've looked at so far had a handful of GEM functions in there 
> as well (vr_recfl(), v_show_c() ) plus some escapes I didn't see anywhere 
> else.

  I've now had a closer look at Activity, or at least the way it interacts
with GSX. The Activity drivers have half-a-dozen extra functions whose 
numbers match the ones in GEM (for example, function 114 is vr_recfl()). 
But, just to be difficult, they don't take the same parameters. Again 
taking vr_recfl() as an example, the drawing mode (replace, transparent,
XOR) is passed in, rather than the system default being used.

  There are also places where Activity goes through hoops to do things 
that would be easy in GEM, because the functions aren't there. To draw a 
bitmap, for example, it has to break it into 16x16 squares, load each 
square as a custom pattern with vsf_udpat(), and then paint that square. 
And without GEM's mouse callbacks, it has to read the mouse by polling, 
using two GSX calls: one to find out if the mouse has been moved (which
forces the pointer to the centre of the screen), and another to put the 
pointer back where it belongs.

  The extra functions used by Activity seem to be:

* vsf_perimeter() -- behaves as in GEM.
* vsc_form() -- cursor shape is passed in using the 'ptr1' pointer, 
               whereas in GEM the 'intin' array is used. If the 'ptr2' 
               pointer is nonzero, the previous cursor shape is copied
               to where it points.
* vsf_udpat() -- as with vsc_form(), the pattern is passed using 'ptr1',
               and the previous pattern is returned through 'ptr2'. 
               Also, the pattern is preceded by three words, probably
               the plane count and the foreground and background colour.
* vr_recfl() -- Drawing mode is passed in 'intin'. Perimeter is never drawn.

  Activity drivers also provide:
* v_show_c() }
* v_hide_c() } which appear to match the normal GEM API.
* vq_mouse() }

  and four extra escape functions:

 0. Rreturns the driver ID as an ASCII string in INTOUT.
51. I don't know, but it looks as if it may be some kind of bit blit. 
52. Set a user-defined line pattern. 'intin' holds the pattern.  
54. Gets or sets a single pixel. 'ptsin' holds coordinates. 'intin' 
   holds 0 to read pixel, 1 to write it.

  Oh, and regarding *that* screenshot:

> > On Tue, 13 Dec 2011, Ben A L Jemmett wrote:
> > 
> > > On Tue, December 13, 2011 11:02 pm, John Elliott wrote:
> > >> <http://www.seasip.info/Gem/History/activity.png>
> > 
> > Some things cannot be un-seen. *cringes*

  It's a bit calmer in 16 colours. 

<http://www.seasip.info/Gem/History/activity2.png>

  (No, that's not done using any of the drivers that Apricot supplied :-) )

-- 
John Elliott


More information about the gem-dev mailing list