********************************************************************** ****************************** The *********************************** ********** ____ ____ ______ ************ ********** /\ _`\ /\ _`\ /'\_/`\ /'\_/`\/\ _ \ ************ ********** \ \ \L\_\ \ \L\_\/\ \/\ \ \ \L\ \ ************ ********** \ \ \L_L\ \ _\L\ \ \__\ \ \ \__\ \ \ __ \ ************ ********** \ \ \/, \ \ \L\ \ \ \_/\ \ \ \_/\ \ \ \/\ \ ************ ********** \ \____/\ \____/\ \_\\ \_\ \_\\ \_\ \_\ \_\ ************ ********** \/___/ \/___/ \/_/ \/_/\/_/ \/_/\/_/\/_/ ************ ********** ************ *************************** Project ********************************* ********************* FREQUENTLY ASKED QUESTIONS ********************* ********************************************************************** ************** The GEMMA project details by Paul Jones *************** ******* Graphic Environment Manager Multiple Advantages system ******* *************** "The Power Of GEM In The Power Of STOS" ************** ********************************************************************** ½ Copyright to PJCO & the GEMMA programming team 1997. All rights reserved. The offical GEMMA FAQ. This FAQ can go on any diskmagazines/magazines/CD ROM or any form of software distribution only with the concent of Paul Jones. Address details below at end of the file. This FAQ may change without prior notice. Updated reguarly. Special Atari Computing edition! Topics covered... 1) What's GEMMA and how can I install it? 2) What's this GEMMA group? 3) What can you do with GEMMA? 4) What commands are available? 5) Surely GEM in STOS is impossible!? 6) Tell me more about the start of GEMMA! 7) High Level Language Extensions (HLLE) 8) G.E.M - V.D.I - D.I.Y? 9) How is GEMMA going to be released? 10) Is that all? 11) What's the GEMMA logo? 12) What's this GEMMA pack? -------------------------------------------------------------------------- 1) What's GEMMA and how can I install it? -------------------------------------------------------------------------- The GEMMA project is about getting GEM in STOS, but really it's more then just that. Everyone on the GEMMA team thinks that STOS never got its just deserts as a programming language. GEMMA is more then just GEM in STOS, in some ways it's going to create a totally new programming language, combatible with STOS, but will use GEM, with a real sourcecode editor with built in compiler/interpreter commands. At the moment, GEMMA is an extension for STOS BASIC which allows you to use GEM in STOS (hence the name). GEMMA is like any other extension; all you have to do copy the extension to the STOS folder. Once this is done GEM is available for you to use. However, since STOS was programmed for non-GEM use, a special version of STOS (known as GEMMA STOS) is being programmed. Check out "Surely GEM in STOS is impossible!?" for more details. -------------------------------------------------------------------------- 2) What's this GEMMA group? -------------------------------------------------------------------------- The GEMMA group is responcible for the programming of the extension in 68000 assembly machine code. The team includes... 1) Paul "Mr GEMMA" Jones, Programmer 2) Michael "I've got something to show you" Wensley, Programmer/beta tester 3) Simon "Sounds interesting..." Walton, Document creater 4) Anthony "disassemble everything!" Jacques, Programmer/STOSfixer/beta tester/high level extension writer (You don't do too much!) 5) Phantom "Spooky",STOSfixer 6) Oliver Heun, German distributor 7) Scott Stringer, GEMMA Programmer -------------------------------------------------------------------------- 3) What can you do with GEMMA? -------------------------------------------------------------------------- Every GEM command available is coded. This means that it is fully possible for you to program window dialogs, with menus and colour icons. All the other extension that use STOS can also be used in conjunction with GEMMA. Resource files, windows etc. can all be used. Everything that you see in GEM programs can be used. By using the GEM commands, you can use and write the command line. This means that you could use archievers, such as STZIP. This means QWK viewers, shells etc. could be written. With the command line alone you could write such things as HTML creators. The window commands along with disk commands and fileselector could let you create desktops shells (!). That's only three commands I've just mentioned, put this together with the HLLE's and, window dialogs etc. are all yours! GEMMA can now handle Falcon resolutions! The alert box ALERT2.GIF was created in STOS with GEMMA v1.35... in 256 colours! That's what GEMMA can do for you! -------------------------------------------------------------------------- 4) What commands are available? -------------------------------------------------------------------------- The AES commands appl_init appl_read appl_write appl_find appl_tplay appl_trecord appl_search appl_exit evnt_keybd evnt_button evnt_mouse evnt_mesag evnt_timer evnt_multi evnt_dclick menu_bar menu_icheck menu_ienable menu_tnormal menu_text menu_register menu_popup menu_attach menu_istart menu_settings objc_add objc_delete objc_draw objc_find objc_offset objc_order objc_edit objc_change objc_sysvar form_do form_dial form_alert form_error form_center form_keybd form_button graf_rubberbox graf_dragbox graf_movebox graf_growbox graf_shrinkbox graf_watchbox graf_slidebox graf_handle graf_mouse graf_mkstate scrp_read scrp_write fsel_input fsel_exinput wind_create wind_open wind_close wind_delete wind_get wind_set wind_find wind_update wind_calc wind_new rsrc_load rsrc_free rsrc_gaddr rsrc_saddr rsrc_obfix rsrc_rcfix shel_read shel_write shel_get shel_put shel_find shel_envrn appl_getinfo The VDI commands vst_load_fonts vst_unload_fonts vs_clip v_pline v_pmarker v_gtext v_fillarea v_contourfill vr_recflv_bar v_arc v_pieslice v_circle v_ellarcv_ellpie v_ellipse v_rbox v_rfbox v_justified vswr_mode vs_color vsl_type vsl_udsty vsl_width vsl_color vsl_ends vsm_type vsm_height vsm_color vst_height vst_point vst_rotation vst_font vst_color vst_effects vst_alignment vst_interior vsf_style vsf_color vsf_perimeter vsf_updat vro_cpyfm vst_cpyfrm v_get_pixel v_show_c v_hide_c vsc_form vq_mouse vq_key_svq_extnd vq_color vql_attributes vqm_attributes vqf_attributes vqt_attributes vqt_extent vqt_width vqt_name vqt_fontinfo -------------------------------------------------------------------------- 5) Surely GEM in STOS is impossible!? -------------------------------------------------------------------------- The old problem: Many people thought like this for awhile, even some started laughing at me when I said it was possible! Many of the commands in the table above can be used with STOS v2.06. However, commands like 'rsrc_load' use GEMDOS to get memory. Since STOS has nicked this memory a special version of STOS is being created. This problem might not happen with compiled versions of programs, I state might since we don't know what STOS gets up to! This is where GEMMA STOS comes in, programmed by our expert "STOS fixers". They rewrite the sourcecode to STOS, so that GEMMA and STOS work perfectly together. If you download a copy of GEMMA037.ZIP and try it you'll see that the STOS arrow destroys everything in it's path. GEMMA STOS will have this problem fixed, as well as other things such as STOS hogging up all memory, which in GEM programming is "dirty". Of course, your favourite extensions will still work with this version of STOS, and other extensions you hate too! Like everything, it's not perfect. The major problems at the moment are that the mouse isn't drawn correctly, programs cannot be resolution indepent, and the memory problem. All the errors in STOS should hopefully be fixed in the forthcoming versions of GEMMA STOS. Until then, however, you are very much limited to the number of commands you can use. "Although the idea of GEM inside STOS may be appealing to some, there are several outstanding major issues which have not yet been address. I am still dubious as to whether these can be overcome... Also, adding the ability to use GEM will not improve compatibility due to the existing problems caused by STOS." - Anthony Jacques, April 1997 Now: Since the last FAQ many things have happened: all the GEM commands have been programmed and nearly all the problems have been removed. I created the "GEMMA accessory", which is a way to avoid the problems for the time being. This accessory reserves some memory on start up and copies the system variables into it's own memory. When STOS runs, it overwrites these system ones, so in STOS we overwrite it's own ones with the orginal system ones. Still with me? Using this method we have given GEM as much memory as the user wants, fixed the mouse problem, and the resolution. You can now go into 256 colours on a Falcon, run STOS, and the autostarting GEMMA program will put STOS into 256 colours so you can view GEM objects in 256 colours perfectly. The image WINDOW.GIF is a window, created in GEMMA with STOS, in 256 colours - the first of its kind! Using GEM in STOS is pretty freaky, and when I first saw a 256 colour window on the screen... I thourght I was in HBASIC with the desktop... it's that realistic. -------------------------------------------------------------------------- 6) Tell me more about the start of GEMMA! -------------------------------------------------------------------------- How did the project start? Well... It was a dark, wet, winter afternoon near Christmas 1996. Michael Wensley took his coat and shoes off having just arrived at Paul's house. "Paul? I've got something to show you," said the 2nd GEMMA member, before GEMMA had been invented, "it's something to do with STOS." Michael loaded up this program into STOS... 1 mode 1 10 rem attempts to set colours to be like those of the desktop 20 if mode<2 then for A=0 to (4^(2-mode))-1 : read C : colour A,C : next A 30 data $777,$700,$70,$770,$7,$707,$77,$666,$444,$500,$50,$550,$5,$505,$55,$0 31 if mode=1 then colour 3,$0 40 hide 50 rem ************************** 80 rem Run STOS from the desktop 90 rem Run this program in the resolution 100 rem that STOS was run in from the desktop. 120 rem 130 palette $777,$700,$70,$0 140 rem we need to reserve lots of banks for the aes_param 150 reserve as work 7,5*2 : rem control ds.w 5 160 fill start(7) to start(7)+length(7),0 170 reserve as work 8,14*2 : rem global ds.w 14 180 fill start(8) to start(8)+length(8),0 190 reserve as work 9,16*2 : rem int_in ds.w 16 200 fill start(9) to start(9)+length(9),0 210 reserve as work 10,7*2 : rem int_out ds.w 7 220 fill start(10) to start(10)+length(10),0 230 reserve as work 11,3*4 : rem addr_in ds.l 3 240 fill start(11) to start(11)+length(11),0 250 reserve as work 12,1*4 : rem addr_outds.l 1 260 fill start(12) to start(12)+length(12),0 270 reserve as work 13,6*4 : rem aes_param 280 rem aes_params dc.l control,global,int_in,int_out,addr_in,addr_out> 290 rem *** 300 rem now fill out aes_param with adresses of other banks 310 rem *** 320 for A=0 to 5 : loke start(13)+A*4,start(7+A) : next A 330 rem **************************** 340 rem * Congratulations programmer !!! 350 rem * we've set up our aes controls 360 rem * now we can start the program proper 370 rem **************************** 380 reminder 7=control,8=global,9=int_in,10=int_out,addr_in,addr_out 390 rem code to call welcome alert box 391 gosub 590 400 A$="[1][This program is written in STOS][This is a REAL alert]"+chr$(0) 410 loke start(11),varptr(A$) : rem move.l alertstring$_addr,addr_in 420 doke start(9),1 : rem move.w #1,int_in 430 doke start(7),52 : rem move.w #52,control form_alert 440 doke start(7)+2,1 : rem move.w #1,control+2 450 doke start(7)+4,1 : rem move.w #1,control+4 460 doke start(7)+6,1 : rem move.w #1,control+6 470 doke start(7)+8,0 : rem move.w #0,control+8 480 dreg(1)=start(13) : rem move.l #aes_params,d1 490 dreg(0)=$C8 : rem move.w #$C8,d0 (why?!?) AES magic number!!!!!!! 500 rem * 510 trap 2 : rem Trap 2 accesses GEM 520 rem * 530 print deek(start(10)) : rem move.w int_out,d0 540 reminder 7=control,8=global,9=int_in,10=int_out,addr_in,addr_out 550 end 590 doke start(7),10 : rem move.w #52,control form_alert 600 doke start(7)+2,0 : rem move.w #1,control+2 610 doke start(7)+4,1 : rem move.w #1,control+4 620 doke start(7)+6,0 : rem move.w #1,control+6 630 doke start(7)+8,0 : rem move.w #0,control+8 640 dreg(1)=start(13) : rem move.l #aes_params,d1 650 dreg(0)=$C8 : rem move.w #$C8,d0 (why?!?) AES magic number!!!!!!! 660 rem * 670 trap 2 : rem Trap 2 accesses GEM 680 rem * 690 INIT=deek(start(10)) : rem move.w int_out,d0 691 print "!";INIT 700 return ...and ran it. "Michael, is what I'm seeing possible?" "You can see it can't you?" That was start of the project. Once Michael had convinced Paul it was possible, he set about the start of the GEMMA extension, which at the time didn't have a name. GEMMA got its name from GEM, obviously. However, it did take some time to think of what the MA in GEMMA would stand for, and later GEMMA became a acronym for "Graphic Environment Manager Multiple Advantages" system. Nothing happened for awhile, since the source to a STOS extension was not available to both of them. The only thing that happened was a discussion about the fact that it was possible for GEM in STOS was possible on the NeST (Network ST). This is where Simon Walton came in. He was the only one who took interest on the project on NeST. We soon decided he would write the documentation. About a month later the wheels started rolling for GEMMA. Paul got Internet access and accidently stubbled onto Anthony Jacques' homepage. What did they contain? The sourcecode to a STOS extension. Anthony was very interested in the project. Paul then joined the STOS mailing list, ran by Anthony himself (then). At first, everyone doubted it. After awhile though, since of a few comments about ridding of the STOS fileselector, people soon realised what GEMMA meant, and what it could do for them...! -------------------------------------------------------------------------- 7) High Level Language Extensions (HLLE) -------------------------------------------------------------------------- Using the basic commands on their own are fine to say the least, but many wouldn't like to even start making a GEM program, having to check for system messages etc. This is where the High Level Language Extensions (HLLE) come in. The GEMMA ones are specially created by Anthony for you to use. For example, instead of trying to figure out how to wait for a system event, and gosub such as "GEMMAloop" can be created. These are going to be supplied with the GEMMA extension, and will save you time in creating message loop, window dialogs and resource files. Instead of numerous commands to bring up a window dialog, "OpenFormWindow ()" can be used, all of which can be included with your STOS programs with no extra charges. -------------------------------------------------------------------------- 8) G.E.M - V.D.I - D.I.Y? -------------------------------------------------------------------------- The GEM system has two main features: the AES, the Application Environment Services, deals with the windows, icons, resource files, dialogs, menus and pointers. The Virtual Device Interface deals with the 'primative' parts of the graphic system, ie drawing circles, lines, plotting, area filling and drawing text. If you wanted to bring up a dialog box, for example, the AES part would be used, and if you wanted to draw a circle, the VDI part would be used. Both parts of the GEM system are programmed in GEMMA. COLSHOW.GIF is an example of the VDI. The program listing is: 10 dummy=vsf_interior(1,1) 20 for A=0 to 256 30 vsf_colr 1,A 40 v_bar 1,X1,Y1,X1+10,Y1+10 50 X1=X1+10 : if X1>320 then X1=0 : Y1=Y1+10 60 next This as you can see displays all 256 colours in a 256 colour Falcon rez - in STOS! -------------------------------------------------------------------------- 9) How is GEMMA going to be released? -------------------------------------------------------------------------- By vote of the GEMMA team (we are so democratic on the GEMMA team!), that GEMMA is now going to be released totally as donationware, which means it will be totally free. If you want to send contributions to the GEMMA team, then please do so. Comments, of course, are always welcome (depending if they are good or bad!). The compiler version will also be donationware, to let the extension spread as much as possible and encourage other people to use it. -------------------------------------------------------------------------- 10) Is that all? -------------------------------------------------------------------------- By all means no! Every version of GEMMA contains documents on each of the programmed commands. GEMMA also has a expertly programmed built in help system on every function with examples included in the help function! Examples are included as ASC files too for convience. The whole list of commands programmed can be displayed (with syntax) using "gemcomlist" and help on any GEM command (with syntax and explaination) with "gemhelp ", where is the command! Simple, but effective... -------------------------------------------------------------------------- 11) What's the GEMMA logo? -------------------------------------------------------------------------- The GEMMA logo (GEMMA.JPG) is pictured at the top of this HTML file. The picture of the model (Lenna) was taken from the "STe Power CD Volume 1" from a JPG viewer program, which was PD, and so this picture is also PD. Using TrueImage, GEMview and ImageCopy 4CD, this was converted to the specific size and pasted onto the orginal GEMMA logo. All pictures of GEMMA examples were all made with GEMMA in STOS with my Falcon030. -------------------------------------------------------------------------- 12) What's this GEMMA pack? -------------------------------------------------------------------------- GEMMA, as discussed earlier is being released as donationware. In the GEMMA achieve (known as the GEMMA pack when finished) will be: * The latest version of GEMMA * Technical documents containing command syntaxs * The latest copy of the GEMMA FAQ in HTML format * Examples of, if not all, most commands * A detailed background of GEMMA * The latest version of GEMMA STOS * The latest constants file (all the numbers in the command documentaion) * HASC - a program to convert .H file produced by a resource editor into .ASC which you may merge with in STOS! When GEMMA and the forthcoming GEMMA STOS are finished, you will be able to find copies of the GEMMA pack(s) from the GEMMA download site. Last updated: 02/07/1997 Comments to: paulat.jones@zetnet.co.uk 7 Coppice Close Droitwich Worcester WR9 9JD England United Kingdom ½ GEMMA is a copyright to PJCO and the GEMMA team 1997. All rights reserved.