===========================================================================
                    AMOS Updater Program - Information
===========================================================================

Mandarin/Francois Lionet have now released an updater program into the P.D.
that fixes many of the problems that users had reported and adds a few more
enhanced features... The updater program-disc is Public Domain and can be
got from your local PD library, or downloaded from the Newsflash BBS.

---------------------------------------------------------------------------
                      AMOS The Creator Version 1.2 updater
---------------------------------------------------------------------------

                               By Francois Lionet

                            (c) 1990 Mandarin / Jawx


                           Important copyright notes
                          ---------------------------

     The AMOS Basic 1.2 Updater is public domain. You can (and you
     are encouraged to) copy and distribute it freely. It does not mean
     AMOS Basic itself is public domain. Copyright remains on the
     interpreter, and on the updated version.
         You need AMOS Basic V1.1 to make the adaptation.


                 What's new in version 1.2 - by Francois Lionet
                ------------------------------------------------

     Although we have tested AMOS during many months before releasing it,
     we have missed a few bugs. Mandarin and I are also VERY concerned
     about the user's request, and we read ALL the letters you send us.

         AMOS version 1.2 is the first result of your bug reports and
     suggestions. We all hope you find this "public domain" way of
     releasing new versions convenient (mostly for your purse!).

         Now, let's go for the list of new things! First, the bugs:

         1 Nasty bugs!

           * HELP accessory crashed on the A500
           * Accessory calling also invited the guru with certain
             screen configurations
           * GARBAGE collection caused a crash if it occurred in the
             middle of a string expression, and if the collection could not
             get enough space to finish the evaluation. (baaaad bug, I tell
             ya man!)
           * GENLOCKed Amiga could not get a still picture
           * Global variables in procedure calls (I could not imagine
             people would actually DO that!)
           * CLOSE WORKBENCH used to crash if a window was opened on WB
             screen. Now this instruction is really closer to Commodore
             specifications, so the AMOS1_2.AMOS program had to change the
             Startup-Sequence of the language disc

             Note that CLOSE WORKBENCH will NOT work now if you have one
             CLI window opened. If you want to start AMOS and actually
             close the workbench, you must use the following CLI
             instructions:

               RUN >NIL: AMOS
               ENDCLI

         2 Other bugs.

         * LDIR now works properly
         * Y HARD now returns the right value
         * SCIN does not report hidden screens
         * VAL works with negative floating numbers!
         * PLOT works with large float expressions. In fact, the problem
           was in the "double float evaluation" routine. All instruction
           that required TWO parameters were affected.
         * INT is corrected
         * SQR(-2) and LOG(-1..) now returns an illegal function call error
         * Def Fn with float numbers does not report a type mismatch error
           any more
         * I SPRITE and I BOB are now tokenised
         * AMAL PLay instruction now works fine
         * AMPLAY too
         * AMAL OR is now understood by AMAL
         * ERRN reports the REAL error number (it used to add TWO to it!)
         * CONTROL+C now cuts the block under editor
         * CONTROL+S stores the block
         * You can now go from one label to another with ALT arrows
         * GET FONTS information used to be corrupted by a garbage
           collection - now this is fixed
         * MENU TO X,Y is now in the right order
         * DOUBLE BUFFERED , DUAL PLAYFIELD screens were not displayed,
           making it impossible to use bobs on dual playfield
         * UNPACK works fine with portions of screens
         * SET TAB now works in a program

         3 Manual bugs.

         Yes! A few mistakes in the manual made us think there were
         more bugs in AMOS. Here are the faulty instructions in the manual.

         * PRG FIRST needs a filter, like DIR FIRST: =PRG FIRST$("*.*")
         * COLOUR BACK $RGB is an instruction that sets the background
           colour of the screen, ie the colour OUTSIDE of all screens.
         * AMREG wants the CHANNEL number FIRST, and then the register
           number, and not the contrary as stated in the manual.

         Well, sorry for the bugs. Each time a user found a new one, I
     felt bad! Sorry for that, but you must realise that AMOS source code
     is over 1 Megabyte long! The most difficult thing in such big
     programs, is that when you change something at one corner, it may be
     creating a bug in a very far routine that you had almost forgotten!


                            New Features in AMOS 1.2
                           --------------------------

      1  The new improved File Selector

           Certainly a subject on which we had the most remarks and ideas!
           What's new then:

           * You can now type stuff, and click when the directory is
             loading.
               As a consequence, the directory is not sorted any more, but
             I have provided a SORT button. You can keep clicking on it if
             you cannot stand seeing the directory in a mess!
           * The up and down arrows are grouped in the top of the file
             list.
           * The PARENT button is just over the arrows, giving fast access
             to all three buttons.
           * No more device list on the right of the files! To have it,
             just do as in the ARP file  selector: click on the right mouse
             button. The device  REAL  names  (including  ASSIGNED devices)
             list will be displayed. Just click  on  the name to change the
             disc.
           * The requester is not disabled as it was before. If you ask for
             an non-existent disc, it will ask to insert it.
           * That's it. Some major changes that will (I hope) satisfy your
             needs. Note that the program selector has changed too. No
             kidding, how did you guess I was using the same routines?
           * The slider bar's display is now cleaner
           * Sequential files are now 3 times faster. I was really ashamed
             to be slower than Amiga Basic!
           * =DIR$ now returns the disc name, and not only the device
             reference.
           * AMOS is now even more multi-tasking. The editor and the direct
             mode do not do "busy" loops any more. You can normally run
             other tasks on the background. Of course, when a program is
             running, AMOS takes as much processor  time  as it can to have
             the best speed. See the  new  MULTI WAIT instruction below for
             more details.


      2 New instructions

         Yes, as a bonus, for no extra cost!

         * =DEV FIRST$("filter")
         * =DEV NEXT$

           Like DIR FIRST$ and DIR NEXT$, but for the device list.
           Note that you should remove the spaces with -" " to get the
           right name.

         * MULTI WAIT

           To make REAL multi-task programs, you must not grab all the
           processor time (as I used to do in V1.1), and leave some power
           to the other tasks. MULTI WAIT does a MULTI-TASK wait vbl. You
           should use it in your program's main loop, when you wait for
           example for a menu item to be selected.

           Note that you should not use this instruction to make accurate
           screen synchronisation. As it is designed to multi-task, this
           instruction is NOT ACCURATE AT ALL! It may skip many VBLs,
           depending on the number of running task at the moment.

           If you missed it in the manual, multitasking can be activated by
           pressing Amiga+A to flick between AMOS and the CLI or Workbench
           environments. This allows systems with at least 1 meg to run
           AMOS and programs like DPAINT III at the same time!


         * PRIORITY REVERSE ON
         * PRIORITY REVERSE OFF

           When I had finished AMOS, someone told me that I had made a
           really stupid mistake: the bob priority display order in AMOS
           was REVERSED to that in STOS. Silly me! It made it more
           difficult to port programs from STOS to AMOS - but not
           impossible! I had to correct this!

           PRIORITY REVERSE ON, as it says, reverses the entire bob's
           priority table. It means that bob number 1 will be first, in
           front of all other bobs, 2 will come in second etc... This
           priority list is compatible with STOS.

           This instruction has another really nice feature when you use it
           with PRIORITY ON. The bobs are not sorted from TOP to BOTTOM any
           more, but from BOTTOM to TOP! The highest bob on the screen will
           be displayed in front of the others - how to turn a mistake into
           a nice new feature!

         * Automatic sprite flipping - a very special feature - really
           crucial!

           In a great number of games, the main character needs to animate
           left to right, and up and down. Up to now, you were obliged to
           keep in the sprite bank reversed copies of small animation
           sequences for the main character. As  the  main  character
           usually has the best animation, you lose an enormous amount of
           space!

           For the game RanXerox (out now!), which I wrote a long time ago,
           I produced a nice flipping routine which allowed me to keep just
           one copy of the main character in the bank. I have grabbed and
           enhanced this routines for AMOS, and it is now a part of Version
           1.2.

           I had to be clever (who said I could not?) to find a way of
           including this feature and keep compatibility with older
           programs.

           How does it work? Let's imagine your character is walking to the
           left and then back to the right. You would only have in your
           bank the image of him walking to the right. To display this
           right image, you simply refer to the image number in the bank as
           usual.

           To display the image reversed in the X axis (left walking
           image), you set bit number 15 of the image number to 1. Don't
           panic, you can simply do it with:

             $8000+Image number

           So, BOB 1,160,100,1 will display your character walking right,
           and BOB 1,160,100,$8000+1 will display it walking left. The same
           principle is used for vertical reversing, for this, bit number
           14 is used. Add $4000 to the image number. To have a vertical
           and horizontal reversing, use $C000.

           The symmetry is a full symmetry: I also reverse the HOT SPOT of
           the bob. For example, if we had put the hot spot in X under the
           feet of our character, the reversed version would also have it
           under its foot. So be careful if you set the hot spot on the top
           left corner on a bob, the reversed image will be displayed at
           the top left!

           You might say that $8000 and $C000 is a bit weird to use. I
           have provided special functions to give a better AMOS interface:

             * =HREV(image), add $8000 to the image
             * =VREV(image), add $4000
             * =REV(image), add $C000

             Use them in place of the hex values:

               BOB 1,160,100,10
               BOB 1,160,100,HREV(10)
               BOB 1,160,100,VREV(10)
               BOB 1,160,100,REV(10)

           To allow easy use of the bob reverser in AMAL, I have
           implemented HEXADECIMAL evaluation. So you can use hex notation
           to refer easily to reversed bobs. If hex frightens you, just add
           $8000, $4000 or $C000 before all references in your AMAL
           strings.

           Example:

             Old AMAL string:

               "Anim 0,(1,2)(2,2)(3,2)(4,2)"

             New reversed string:

               "Anim 0,($8000+1,2)($8000+2)($8000+3)($8000+4)"
             or...

               "Anim 0,($8001,2)($8002,2)($8003,2)($8004,2)"

           If you use a register to calculate the image number, do not try
           to modify the calculation itself, but only when you assign the
           register to the image.

             Old AMAL string:

               For R0=1 To 10; Let A=R0; Next R0

             New one:

               For R0=1 To 10; Let A=C000+R0; Next R0

     How does the flip routine work?

         It is really important for you to understand how it works
         internally, so that you do not ask this system to do things it is
         not designed to.

         I'll make myself a little bit clearer. This reversing system is
         designed to increase memory before trying to be fast (although we
         would not mind if it was actually fast, would we?). I had to make
         concessions to have it at the same time fast, easy and powerful.

         The routine actually works right in the middle of the bank, and
         does not use any extra memory.

         The bobs are flipped during the UPDATE process, just before a bob
         is redrawn on the screen: I look to see if the image needs to be
         flipped in the bank. If it does, I do it and set a flag in the
         bank. On the next UPDATE, if the bob image has not changed, I will
         not need to flip it again, thus saving a lot of time.

         If you understand the above, you will also realise one BIG
         limitation: It is not wise to use more than one flipped bob
         pointing to the same image. Let's see the next example:

           Bob 1,160,100,1
           Bob 2,160,150,$8001
           Bob 3,20,20,$4001
           Bob 4,20,100,$C001
           Update

         During the UPDATE process, AMOS will first draw bob #1. No
         problem, it is in the right position. Then bob #2 - AMOS needs to
         reverse it in X. Bob #3 needs a Y and an X reversing (to put the
         bob back to normal in X!). Then bob #4 needs an X flipping.

         On the next update, providing the bob's image has not changed,
         to display bob #1, AMOS will have to flip it in X and Y, then bob
         #2...

         As you can see, for each UPDATE, ie every 50th of second, if the
         bobs move, they need to be reversed! This will work, but will take
         a lot of processor time, and the animation will be disastrous.

         So the golden rule is: Use the reversed bobs for objects alone
         on a screen (or be sure that normal and reversed images are not
         displayed at the same time on the screen). If you want, you can
         have two bobs like this - experiment!

         I told you before that this system was for use with BOBS. Yes, it
         is totally automatic with bobs. But as it directly affects the
         sprite bank, you can use it with sprites.

         When a hardware computed sprite is calculated, AMOS looks into the
         sprite bank and gets the image from it. If the image is
         reversed at that moment, the hardware sprite will display a
         reversed image. You can therefore have reversed hardware sprites
         using this method. But you cannot do for example:

           Sprite 1,200,200,$8001

         * Pasting flipped bobs

         PASTE BOB also accepts reversed images. A simple trick to
         reverse an image in the bank without having to display a bob is to
         PASTE the reversed image outside of the screen. Example:

           Paste Bob 500,500,$C000

         This will reverse image 4 in the bank, without any output (and
         quite fast).

         * Collision Detection

         This is an important point, and you have to be very careful when
         you detect collisions with reversed bobs!

         The collision detection uses the shapes in the bank at the very
         moment it is called. Let's see an example that will never work:

           Bob 1,160,100,1
           Do
             Bob 2,XScreen(XMouse),YScreen(YMouse),$8001
             Wait Vbl
             Exit if Bob Col(1)
           Loop

         Why doesn't it work? We have two reversed images of the same
         definition in the bank. After the updating process, the image in
         the bank is left reversed. So the Bob Col instruction will take
         bob shape 1, the reversed image, and this will not work!

         So remember what uncle Fran‡ois tells you:
         THOU SHALL NEVER USE COLLISION DETECTION WITH MORE THAN ONE
         REVERSED IMAGE ON THE SCREEN!

         How is it coded into the sprite bank?

         I use two bits in the Hot spot X definition of each image in the
         bank (at SPRITE BASE+6).

           Bit #15 for X: 0 if normal, 1 if reversed
           Bit #14 for Y:    " "             " "

         Before RUN and SAVE, the bank is restored to its normal state, so
         that it is still compatible with version 1.1...

      * Block Flipping

         Yes, I had a really nice routine, I had to use it for the blocks!
         Two new instructions:

         HREV BLOCK number, flips horizontally
         VREV BLOCK number, flips vertically

      * Bank Swapping

         A new and very needed instruction:

           Bank Swap number1,number2

         This instruction will swap the pointers of the two banks. Useful
         if you want to turn an icon bank into a sprite bank. Example:

           Bank Swap 1,2

         or have more than one music bank at the same time, for example:

           Bank Swap 3,5

         etc...

      3 New Programs

         The AMOS1_2.AMOS updater has also  saved  a  few new programs onto
         your disc:

         * CONFIG1_2.AMOS - the new configuration program. Note that the
           configuration file in the AMOS_System folder is not the same as
           the version 1_1 file.

         * MENU_EDITOR.AMOS - a new one, as AMOS had some annoying bugs in
           fonts handling and ERRN functions.

         * LOCK.AMOS program! Yes, now you can lock your procedures, as
           said in the manual. To proceed:

           1 Make a backup of your program, with OPENED procedures
           2 Close all the procedures you wish to definitely lock
           3 Load the LOCK.AMOS program, as an ACCESSORY
           4 Run LOCK.AMOS using the RUN OTHER Menu option from the editor

         Your procedures are now locked, and you cannot open them back.

         NB: Do not try to load a program with locked procedures in
             AMOS1_1 as it will crash the computer! Version 1_1 is designed
             to disappear quickly!

         I am offering a bottle of (GOOD) French champagne to the first one
         who will send me a program that unlocks another AMOS program, and
         the LOCK.AMOS program unlocked. I wish you some happy hours trying
         to find out how I did it! Hahaha!


                                AMOS Users Club
                               -----------------

         Issue 1 of the AMOS Newsletter is now available. The club has
     really taken off with over 700 members having joined - this is more
     than the STOS club did in a year!
         Adding a high score to Magic Forest, How I wrote Cartoon Capers,
     Public Domain Update, A500 Blues and an article on Sprites, form the
     main body of this first issue.
         Join now - you won't regret it and you'll get all the latest AMOS
     related news.


                                Soundtracker fix
                               ------------------

         If you've experienced problems with the Soundtracker to AMOS
     converter (found on the EXTRAS disc), then have a look at the listing
     and ensure that line 61 is the same as below:

         OF_MUSIC=$43C

     Without this change the music tended to play out of sequence on one of
     the channels.
                                 AMOS's future
                                ---------------

         A look to the future! In the next few months, I will program:

         * A COMMS extension, to handle all RS232 and parallel
           ports directly

         * An AREXX interface

         * The COMPILER!!! it is still time to send to Mandarin all your
           ideas and suggestions for this important product. We will read
           all the letters, as usual.

         I look forward to seeing what you have done in AMOS. Think about
         the PD library, and do not keep your masterpieces for yourself
         only! Send them to the club. I have already seen some amazing
         stuff...

         That's all folks! I wish you as much fun programming in AMOS
         as I had programming it!


     PS - Thanks to all these persons for their nice letters and
     intelligent remarks: J.M.Wright, Dr. Steve Hill, M. Radeley, T.W.
     Davies, Fred Potter (Canada!), Mike Laskey, Frederic Calendini, C.
     Savage, Michael Hawksworth, Richard A. Newbould, Robert Pirie, P.J.
     Hasell, Eric Sagon, R.P. Couzens, Paul Loraine, C.A. Thompson, Andrew
     Forrest, Rob Elsas, Matthew Clark, David Batty, Steve Bennett, David
     Spacey, E. Spooner, Michael Ashton, H. Gibbens, Adrian Milliner, Gary
     Field, C.J. Hoare, Peter Wade, Phillip Muldoon and all the ones I have
     forgotten!

