home *** CD-ROM | disk | FTP | other *** search
/ Computer Club Elmshorn Atari PD / CCE_PD.iso / mac / 0700 / CCE_0705.ZIP / CCE_0705.PD / GBELL10C / GBELL.MAN < prev    next >
Text File  |  1994-01-24  |  24KB  |  482 lines

  1. GBELL(1)          GEM action audio effect device          GBELL(1)
  2.  
  3. NAME
  4.      GBell v1.0c - GemBell v1.0c
  5.  
  6. IMPORTANT
  7.      Read  the segments titled MAILWARE,  DISCLAIMER and  HARDWARE 
  8.      REQUIREMENTS  before  using/copying this excellent  piece  of 
  9.      software  for your Atari STe/TT/Falcon.  If you're head of  a 
  10.      company,   please   read  the  NOTICE  TO   SOFTWARE/HARDWARE 
  11.      COMPANIES.
  12.  
  13. INDEX OF THIS FILE
  14.      Name, Important, Index of this file, Description, Background, 
  15.      Value,   Hardware  requirements,   Disclaimer,  Installation, 
  16.      System vectors,  Cookie jar,  Recurtion lock,  Configuration, 
  17.      Aes functions,  Future plans,  Up the sleeve, Bugs, Mailware, 
  18.      Notice  to software/hardware  companies,  Norwegian  symbols, 
  19.      Files,  Versions, Author, See also, Scriba is available from, 
  20.      Thanks to.
  21.  
  22. DESCRIPTION
  23.      GBell is a small and effective program which hooks up to  the 
  24.      GEM trap vector and looks for identifiable system calls, like 
  25.      window_open,  window_close, drag_bar and so on. When a system 
  26.      call has been identified,  an appropriate sample is selected, 
  27.      loaded (if not already present in memory) and replayed by the 
  28.      soundchip.
  29.  
  30.      Which  system call gives which sample is user defined in  the 
  31.      GBELL.INF file as explained below.
  32.  
  33. BACKGROUND
  34.      We are moving into an age where audio is just as important as 
  35.      video. The McIntosh has had the ability to play off different 
  36.      samples at different events for ages,  and not too long  ago, 
  37.      MS  Windows achieved the same thing.  Why shouldn't  this  be 
  38.      possible  on the ST?  Why should we have to look another  way 
  39.      when a McIntosh owner shows off his computer as he opens  the 
  40.      trash  can  and  the trash can goes "Bring  out  your  dead!" 
  41.      (Monty Python quote).
  42.  
  43.      It  is  close  to assume that the best  reason  that  such  a 
  44.      program  hasn't been made is the fact the original ST  didn't 
  45.      have  a  soundchip advanced enough to do  this,  and  so,  no 
  46.      standard  for  sound  handling really showed  up  in  the  ST 
  47.      operating  system.  Most  audio programs go directly  on  the 
  48.      hardware  and therefore,  it is easy to crash with the  other 
  49.      programs.
  50.  
  51.      Another interesting thing is how the system would slow  down. 
  52.      That is, unless you actually use the DMA for replay. And that 
  53.      is exactly what has been done in GBell.  GBell checks if  the 
  54.      soundchip is busy.  If it is,  the it drops the whole  sound, 
  55.      thereby saving us for both time and unwanted interruptions in 
  56.      the soundtrack you were replaying.  If the soundchip is free, 
  57.      then  load  sample if necessary and simply set  the  chip  to 
  58.      replay  that sound from a buffer which cannot be  overwritten 
  59.      by other programs.
  60.  
  61.      And  where does the name GBell come from?  Well,  it  started 
  62.      with  myself downloading NewBell from  atari.archive,  and  I 
  63.      soon  came to realize that changing _only_ the bell  was  far 
  64.      too  little.  Especially when the program didn't make use  of 
  65.      the DMA, thus halting the system every time there was a bell. 
  66.      Thereby the name 'bell'.  I must admit that the original  'G' 
  67.      has something to do with my name,  but it fits good as  "Gem" 
  68.      as well,  and that is exactly what this program listens  for; 
  69.      GEM functions!
  70.  
  71. VALUE
  72.      What's  the  real purpose of this program,  I hear  you  ask? 
  73.      Well,  to the average user,  it's just pure vanity and has no 
  74.      real value other than that it _feels_ nicer. You dare to turn 
  75.      on the stereo while you're using your computer, and no Mac or 
  76.      Amiga  owner  will need to ask you why they  never  hear  any 
  77.      sounds  from your computer?  This is the same reason why  you 
  78.      love the 3d-look AES, too.
  79.  
  80.      For  the GEM programmer,  however,  this can become  a  handy 
  81.      tool,  too.  Hooking different samples on different functions 
  82.      can  make  debugging easier.  You can actually _hear_  if  an 
  83.      invisible function is called or not.  Very handy  indeed,  if 
  84.      you're programming something multitasking,  like an accessory 
  85.      or MiNT application that communicates with other  accessories 
  86.      or applications.
  87.  
  88. HARDWARE REQUIREMENTS
  89.      GBell  will  only work with Atari computers that  run  a  TOS 
  90.      compatible operating system and has DMA sound  available.  As 
  91.      of this date,  this indicates a STe,  TT or Falcon.  GBell is 
  92.      preferred run from harddisk, but nobody said you couldn't use 
  93.      it with floppies...
  94.  
  95. DISCLAIMER
  96.      Even  though I can't seem to find any bugs that  will  affect 
  97.      the  reliability  of  your system,  usage  of  this  software 
  98.      package is totally your own responsibility. Thereof, risks of 
  99.      damage or loss of data are completely your own,  and can  not 
  100.      be blamed on the programmer.  But it helps to have the newest 
  101.      update...  8*)
  102.  
  103. INSTALLATION
  104.      Put GBell in auto folder,  as early as  possible.  Preferably 
  105.      before MiNT,  which should be the second program in the  auto 
  106.      folder.
  107.  
  108.      Create a folder on you harddisk for samples. Move all samples 
  109.      into this folder. The create GBELL.INF as instructed later in 
  110.      this file.  GBELL.INF should be put in the root directory  of 
  111.      the boot device.
  112.  
  113. SYSTEM VECTORS
  114.      GBell bends two vectors.  One is the BIOS, trap #13, to catch 
  115.      the  ROM when it installs GEM,  so that GBell's other  vector 
  116.      bending,  trap  #2,  doesn't  disappear  after  boot.  It  is 
  117.      preferred  to  put  GBell as early as possible  in  the  auto 
  118.      folder,  so that it is the last program to install itself  on 
  119.      the  GEM  trap,  thus becoming the first to receive  the  GEM 
  120.      function  call  from the program.  This will allow  GBell  to 
  121.      catch  virtually  any function,  despite of the  presence  of 
  122.      function library replacements,  like file  selectors,  let'em 
  123.      fly and MiNT.
  124.  
  125.      The trap #2 bending is the most interesting one.  This is the 
  126.      part  that  catches the function call,  compares  it  to  the 
  127.      function/sample  table  given  in  the  GBELL.INF  file,  and 
  128.      replays a sample if a match has been found.  Notice, however, 
  129.      that the entire test will be skipped if the soundchip is busy 
  130.      doing something else.
  131.  
  132.      The vector bending follows the XBRA standard,  with the  XBRA 
  133.      ID "GBel".
  134.  
  135. COOKIE JAR
  136.      As   any   other  resident  application  which   alters   the 
  137.      achievements of your STe/TT/Falcon, GBell has its own cookie. 
  138.      The Cookie ID is the same as the XBRA ID,  "GBel". The Cookie 
  139.      data  is a pointer to a GBell variable table,  which  is  the 
  140.      same  kind  of  variable  library  used  in  Scriba  Communis 
  141.      Responsi  for communication between the program and the  menu 
  142.      data. In practice, it is very much like a cookie jar in every 
  143.      way,  except that the NULL cookie does not tell you how  many 
  144.      cookies there are room for.  The point of this is that if the 
  145.      variable  system is expanded or altered,  it shouldn't  cause 
  146.      any application that reads these variables to crash.
  147.  
  148.      Variables for GBell v1.1 are:
  149.           VARIABLE  VALUE
  150.           !"MAGI"     24892 (Magic number to make sure it's GBell)
  151.           !"_VER"     version number
  152.            "BUFF"     *sample buffer (see info on GBELL.INF)
  153.           !"SIZE"     sample buffer size
  154.            "TABL"     *action table (what to do when)
  155.           !"TSIZ"     Size   of  allocates  action   table   block 
  156.                       including sample names.
  157.           !"PATH"     *path name where samples are located
  158.            "LOCK"     Recurtion lock. Set while GBell is loading a 
  159.                       sample,   thus  preventing  recursive  self-
  160.                       activition.  Only the first word is  altered 
  161.                       by Gbell itself,  but the entire longword is 
  162.                       tested,  so  setting the  least  significant 
  163.                       word  to  non-zero will let you  "turn  off" 
  164.                       GBell.
  165.            "FALC"     Falcon detection. ASCII "TRUE" when a Falcon 
  166.                       has  been detected,  and  certain  soundchip 
  167.                       init routines need to be executed. Otherwise 
  168.                       zero.
  169.            "STAK"     Amount   of  data  pushed  on   stack   when 
  170.                       executing a trap.  6 for a 68000 and 8 for a 
  171.                       68030.
  172.           !"LAST"     *Full path and name of last loaded sample.
  173.           !"PROG"     *Actual program block.
  174.           !"PSIZ"     Size of resident program block.
  175.                 0 (end of table)
  176.  
  177.      Variables marked with a '*' are pointers.
  178.  
  179.      Variables  marked with a '!' are informative  variables  that 
  180.      will not change the program's performance if changed. Strings 
  181.      that are pointed at,  however, will alter program performance 
  182.      if tempered with.  Some of these,  however, are due to change 
  183.      to actual real pointers in a future version, so you shouldn't 
  184.      touch these unless you have a good reason to do so.
  185.  
  186.      The longword before the table,  the cookie/XBRA ID is present 
  187.      to identify the correctness that this _is_ the GBell variable 
  188.      area.
  189.  
  190.      During  installation,  if  there is not enough  cookie  slots 
  191.      left,  GBell will allocate a cookie jar which is twice as big 
  192.      and move all cookies to the new space.
  193.  
  194. RECURTION LOCK
  195.      Since GBell needs to load the samples from disk whenever they 
  196.      are not in the buffer, this does in itself cause a minimum of 
  197.      three GEMDOS calls.  In future versions,  these can be caught 
  198.      by GBell,  resulting a dead loop,  eventually corrupting  all 
  199.      memory from the supervisor stack and down.  There is a chance 
  200.      for this to happen even on this version,  if an error occures 
  201.      during  loading,  causing a GEM alert  error  message,  which 
  202.      _can_ be caught in this version of GBell. For this reason, as 
  203.      soon as GBell has found a match and starts loading a  sample, 
  204.      this  flag is set,  causing GBell to ignore all  new  matches 
  205.      for  as  long as it already is busy loading  another  sample. 
  206.      After loading,  the sample being played will in itself  cause 
  207.      GBell  to ignore function calls,  and so the flag is  dropped 
  208.      immediately after the replay has started.
  209.  
  210. CONFIGURATION
  211.      Everything  that  can  be configured  is  configured  in  the 
  212.      GBELL.INF  file.  Keep in mind that the GBELL.INF  file  will 
  213.      only be backward compatible,  not forward.  I.e.,  an unknown 
  214.      command  will  cause the parsing to  break,  and  the  entire 
  215.      installation will be skipped, rather than just the line (this 
  216.      is  true  for  version 1.1.  It might  be  altered  in  later 
  217.      versions.)  The GBELL.INF file should be located in the  root 
  218.      directory of the boot device.
  219.  
  220.      The  GBELL.INF  file contains ASCII commands to  easily  make 
  221.      your own setup of sounds and functions. The file is loaded at 
  222.      boot  time,  so  altering  it will  not  change  the  current 
  223.      settings before next reboot.
  224.  
  225.      All lines have in common the following synopsis:
  226.  
  227.           <command> <parameters>
  228.  
  229.      The  last  parameter  is always  followed  immediately  by  a 
  230.      new  line.  Spaces  behind the last parameter  will  cause  a 
  231.      parsing error. (v1.1)
  232.  
  233.      Parameter descriptions are as follows:
  234.           <string> - a text string as in BASIC.  Must be contained 
  235.                      in quotation marks due to possible spaces  in 
  236.                      quote.  To quote a quotation mark, use double 
  237.                      quotation marks.
  238.           <integr> - a 16 bit unsigned integer.
  239.           <byte>   - an 8 bit unsigned integer.
  240.           <spec>   - a   filename  or  path,   not  contained   in 
  241.                      quotation marks,  since spaces don't give any 
  242.                      nice filenames.
  243.           <sample> - <byte> <byte> <spec>, where the first byte is 
  244.                      replay speed, which is one of the following:
  245.                          0 = 6.26 kHz (Falcon=off)
  246.                          1 = 12.52 kHz
  247.                          2 = 25.04 kHz
  248.                          3 = 50.07 kHz
  249.                      The second byte is sample type,  which can be 
  250.                      one of the following supported:
  251.                          0 = signed 8-bit mono sample
  252.                          1 = unsigned 8-bit mono sample
  253.                      The filespec is the filename of the sample to 
  254.                      replay, relative to the path name given.
  255.      So far, the following commands are supported:
  256.           PATH <spec>
  257.             Sets path to find samples.
  258.           BUFFER <long int>
  259.             Sets size of sample buffer. The samples will be loaded 
  260.             into  this buffer and then replayed.  The same  sample 
  261.             will not load twice in a row,  as GBell keeps track of 
  262.             which  sample is already in the buffer,  and which  is 
  263.             not.  At the time being,  the buffer will only contain 
  264.             one  sample at a time,  meaning that the  buffer  size 
  265.             should  be  the same as the largest  sample  to  load. 
  266.             Defaults to 70000 if command not included in script.
  267.           AES <integr> <sample>
  268.             Activates sample when AES function <integr> is called. 
  269.             See section AES TABLE for a list of AES functions.
  270.           ALERT <string> <sample>
  271.             Activates  sample  when form_alert is  called  with  a 
  272.             string whose beginning is alike the given string.
  273.           ALERTEXT <string> <sample>
  274.             Same as ALERT, but string compare begins at the actual 
  275.             text, thereby skipping the symbol used in the box.
  276.           WINAME <string> <sample>
  277.             Activates sample when a window's name is set. Usually, 
  278.             this  happens  before the window is  opened,  so  this 
  279.             sample  should  normally  supress  your  open   window 
  280.             sample.  Check  out  how  nice it  is  to  go  through 
  281.             directories with MiNT,  when you put different samples 
  282.             on different directory names...
  283.      The tests will be performed in the same order as the commands 
  284.      appear in the GBELL.INF file, and as soon as a match has been 
  285.      found,  the rest is skipped.  Thus,  the exceptions should be 
  286.      entered before the rules.
  287.  
  288. AES FUNCTIONS (just a few of them)
  289.      Application initiation/termination
  290.           10   appl_init           19   appl_exit
  291.      Event requests
  292.           20   evnt_keybd          24   evnt_timer
  293.           21   evnt_button         25   evnt_multi
  294.           22   evnt_mouse          27   evnt_dclick
  295.           23   evnt_mesag
  296.      Menu fixes/events
  297.           30   menu_bar            33   menu_tnormal
  298.           31   menu_icheck         34   menu_text
  299.           32   menu_ienable        35   menu_register
  300.      Object functions and events
  301.           42   objc_draw           53   form_error
  302.           50   form_do             55   form_keybd
  303.           51   form_dial           56   form_button
  304.           52   form_alert (see commands ALERT and ALERTEXT)
  305.      Graphical effects and events
  306.           70   graf_rubberbox      74   graf_shrinkbox
  307.           71   graf_dragbox        75   graf_watchbox
  308.           72   graf_movebox        76   graf_slidebox
  309.           73   graf_growbox        78   graf_mouse
  310.      Fileselector
  311.           90   fsel_input          91   fsel_exinput
  312.      Window events
  313.          100   wind_create        102   wind_close
  314.          101   wind_open          103   wind_delete
  315.  
  316. FUTURE PLANS (FOR THIS PIECE OF SOFTWARE)
  317.      Future versions of this program will probably contain one  or 
  318.      more of the following items that are on my todo-list:
  319.           o    OBJECT-command - recognizes when you draw an object 
  320.                which contains a string given as a parameter.
  321.           o    Static buffer - if internal buffer is too small for 
  322.                sample,   allocate  memory  for  whole  sample   if 
  323.                possible and get rid of it afterwards.
  324.           o    Multi-buffer - if there's room,  keep more than one 
  325.                sample in the buffer at a time, reducing load-time.
  326.           o    GEMDOS-command - recognizes GEMDOS function calls.
  327.           o    EXEC/LAUNCH  - recognizes the launch of a  specific 
  328.                program.
  329.           o    FOPEN - recognizes file handling to a specific file 
  330.                or  file  pattern (like yelling for help  when  you 
  331.                write  to a .PRG file as indication of  a  possible 
  332.                link-virus?)
  333.           o    XBIOS - recognizes XBIOS function calls.
  334.           o    Static  table - possibility to  change  recognition 
  335.                table without resetting.
  336.           o    ASCII 7 (bell) interception.
  337.           o    DATE/TIME  commands,   allowing  you  to  have  the 
  338.                computer automatically play "Happy Birthday to you" 
  339.                on  your  birthday!  *grin* Thanks to Kai  for  the 
  340.                idea! ;-)
  341.           o    Sample  editor  to  alter  samples  to  fit  replay 
  342.                speeds.
  343.  
  344. UP THE SLEEVE (coming soon)
  345.      Flexible use of the buffer,  meaning more than one sample  in 
  346.      the  buffer at a time will be the next addition  for  version 
  347.      1.1.  The reason this will be added first is a problem  about 
  348.      loading  stuff  when calling the BIOS (don't ask me  why)  at 
  349.      times,  causing the computer to crash totally.  And since one 
  350.      of  the most important bell-checks is in the  BIOS  trap,  it 
  351.      would  probably be 'ok' to have the  bell-replacement  sample 
  352.      ready in the buffer at any time. This would give you a 'free' 
  353.      buffer of 'buffer length - bell sample'.  More about this  in 
  354.      the 1.1 release MAN file.
  355.  
  356.      After  this,  the  BELL and GEMDOS commands  should  be  just 
  357.      around the corner, together with object recognition.
  358.  
  359. BUGS
  360.      No known bugs (I hope).
  361.  
  362. MAILWARE
  363.      This  program is mailware.  This means that it can be  copied 
  364.      freely all over the world,  as long as all  files,  including 
  365.      this one,  are all intact and follow the package, and nothing 
  366.      is  charged for the copy other than the expenses of  actually 
  367.      copying it,  shipping it and whatever you had to pay for  the 
  368.      disk you copied it onto.
  369.  
  370.      But this is not all.  Because if you enjoy this program  just 
  371.      as much as I do, then some kind of communication is in order. 
  372.      Preferably  snailmail.  Preferably with a photo of  yourself, 
  373.      your  sister,  girl  friend,  mother  or  any  other  female. 
  374.      Alternatively,  you could sample her whisper something to me. 
  375.      Or you could just send her over (if she's not too old or  too 
  376.      young,  of course).  Money donations,  postcards,  valentines 
  377.      cards,   flowers,   air  tickets,   free  holidays,   holiday 
  378.      invitations,  pen  pals,  free  disks,  free  TV  sets,  free 
  379.      computer  upgrades,   free  software,  interviews,  fame  and 
  380.      fortune are all, of course, also appreciated.
  381.  
  382.      The  programmer's address is,  and will remain so until  June 
  383.      1995, as follows:
  384.           Gard Eggesb\oe Abrahamsen,
  385.           PO Box 5061, Larsg\aarden,
  386.           6021 \Aalesund,
  387.           Norway
  388.  
  389.      After that, mail can be redirected through this address:
  390.           Gard Eggesb\oe Abrahamsen,
  391.           PO Box 71,
  392.           6092 Eggesb\oenes,
  393.           Norway
  394.  
  395.      Electronic mail is valid as long as the \Aalesund address:
  396.           Gard.Abrahamsen@mrih.no
  397.  
  398.      Telephonically, these numbers are currently valid:
  399.           7015 5497 (if you're in Norway) Usually after 21:20
  400.           +47 7015 5497 (overseas)      as I'm logged in as long
  401.                                               as possible.
  402.           7008 8812 (if you're in Norway) During the odd weekend
  403.           +47 7008 8812                 or holiday, when I decide
  404.                                                to go home.
  405.  
  406. NOTICE TO SOFTWARE/HARDWARE COMPANIES
  407.      If you think the programmer is doing a great job,  and wishes 
  408.      to put him on your staff, don't hesitate to get in touch. The 
  409.      programmer  is  just a poor student who is  sleeping  through 
  410.      classes  to get papers telling him that he can do the  things 
  411.      he can.  Right now,  this is just above half way through  the 
  412.      bachelor  degree of computer science/engineering (some  crazy 
  413.      mix  of  the two - ask for details).  The programmer  has  10 
  414.      years of programming experience, ranging from Sinclair BASIC, 
  415.      Z80a assembler to C-programming on the PC, GEM programming on 
  416.      the ST as well as a _lot_ of MC680x0 programming.
  417.  
  418.      If you want to pay my education, which so far has put me in a 
  419.      NOK  100'000 (GBP 10'000) debt,  please feel free to  do  so. 
  420.      *grin*
  421.  
  422.      If  you wish to take me up for an interview,  don't  hesitate 
  423.      getting in touch. See my addresses/phone numbers above.
  424.  
  425.      Internet  users:  finger ga@samson.mrih.no or mail me for  my 
  426.      .plan file.
  427.  
  428. NORWEGIAN SYMBOLS                                           ,
  429.      The \oe is written as an 'o' with a slash across it: (/)
  430.                                                           '
  431.                                                            .
  432.      The \aa is written as an 'a' with a circle above it:  A
  433.  
  434. FILES
  435.      GBELL.PRG - The actual program
  436.      GBELL.INF - The GBell sample info script
  437.      GBELL.MAN - This file
  438.           The following samples are to "get you started"
  439.      HALELUJA  - "Halleluja"
  440.      DOING     - A "doing" sound.
  441.      CHORDS    - Frequently heard Mac sampling.
  442.  
  443. VERSIONS (Official release dates)
  444.      1.21.1994 : Version 1.0beta
  445.           Supported GBELL.INF  file,  PATH,  BUFFER,  AES,  ALERT, 
  446.           ALERTEXT, cookie jar.
  447.      1.24.1994 : Version 1.0c
  448.           Added  WINAME.  Recurtion lock.  Fixed bug  for  Falcon, 
  449.           where I forgot to save registers before using the  XBIOS 
  450.           to init chip, resulting in some rather ugly noise when I 
  451.           wrote  the  registers - now with false values -  to  the 
  452.           soundchip.   More  variables  exposed  through   cookie. 
  453.           Expanded MAN file.
  454.  
  455. AUTHOR
  456.      Gard Eggesb\oe Abrahamsen, (MAILWARE) January 1994
  457.  
  458. SEE ALSO (Softography)
  459.      Scriba Communis Responsi diskmagazine
  460.      Reverse - the better reversi? (definitely not,  but the  user 
  461.                                    interface is nice...)
  462.      Memorized - Classic concentration type game.
  463.      Catchup - short, quick, effective nntp reader (HPUX/Bash).
  464.      PinuP - Pinup Is Not Unlike Pine, email-file reader for ST.
  465.  
  466. SCRIBA IS AVAILABLE FROM
  467.      atari.archive.umich.edu
  468.           ~atari/Magazines/Diskmags/Scriba
  469.      src.doc.ic.ac.uk
  470.           computing/systems/atari/umich/Magazines/Diskmags/Scriba
  471.      ftp.uni-kl.de
  472.           pub/atari/diskmagazines
  473.  
  474. THANKS TO
  475.      Kai Trygve Holst,  co-editor of Scriba Communis Responsi  and 
  476.      programmer  of AntiDote - probably the best virus  killer  on 
  477.      the ST/STe/TT/Falcon, for testing this software on the Falcon 
  478.      and coming up with ideas of things that could be done  better 
  479.      as well as good support during development of this software.
  480.  
  481.  
  482.